The short answer
Section 1231 gain or loss is the gain or loss on selling, exchanging or involuntarily converting real property or depreciable property used in a trade or business and held more than one year, after depreciation recapture is carved out. Under section 1231(a), if your section 1231 gains for the year exceed your section 1231 losses, the net is treated as long-term capital gain; if not, the net is an ordinary loss. A five-year lookback can convert some of a net gain back into ordinary income.
At a glance
| Property | Real or depreciable property used in a trade or business and held more than one year |
|---|---|
| Net gain | Treated as long-term capital gain |
| Net loss | Treated as an ordinary loss |
| Lookback | Net gain is ordinary to the extent of net section 1231 losses from the five prior years not yet recaptured |
The term comes from section 1231, and rental property is generally inside it.
Section 1231(b)(1) defines property used in the trade or business as depreciable property and real property used in a trade or business and held more than one year, excluding inventory and property held primarily for sale to customers. Publication 544 adds that property held for the production of rents or royalties is generally considered used in a trade or business, which is why rental buildings and their land usually produce section 1231 gain.
Recapture comes first. Publication 544 says to determine any ordinary income under the depreciation recapture rules before counting section 1231 gain, so only gain above the recapture amount enters the netting. Dealer property never enters it.
Worked example: a prior loss turns part of today's gain into ordinary income.
Under section 1231(c), a net section 1231 gain is ordinary income to the extent of non-recaptured net section 1231 losses from the five most recent preceding years. Hypothetical: in 2023 you sold a small commercial lot at a $30,000 net section 1231 loss and deducted it as ordinary. In 2026 you sell a rental building at a $200,000 section 1231 gain after recapture, with no other section 1231 transactions.
The first $30,000 of the 2026 net gain is ordinary income, recapturing the earlier loss, and the remaining $170,000 is long-term capital gain. Publication 544 applies prior losses beginning with the earliest year in the five-year window. Had the 2023 sale come six or more years earlier, it would have aged out and the full $200,000 would be long-term capital gain. Keep the earlier Forms 4797 so the lookback can be computed. Run your own numbers with your CPA.
Where it bites: timing several sales and the 25% layer.
Because the netting is annual, selling a loss property and a gain property in the same year offsets them, while selling the loss property first gives an ordinary deduction that the lookback later claws back. The Form 4797 instructions report section 1231 transactions in Part I and apply the nonrecaptured losses at line 8.
The net section 1231 gain also caps the 25% layer: section 1(h)(6)(B) limits unrecaptured section 1250 gain from section 1231 property to the year's net section 1231 gain. Gain deferred in a section 1031 exchange is not recognized, so it stays out of the netting; only recognized boot counts. For the full rate picture on a rental sale, see capital gains tax on rental property.
Related questions
Is the land under a rental section 1231 property?
Yes, if it is used in the rental activity and held more than one year. Section 1231(b)(1) includes real property used in a trade or business, not only depreciable property.
Does a casualty count?
It can. Publication 544 includes casualty and theft gains and losses on business, rental and investment property held over a year, but if casualty and theft losses exceed those gains, neither enters the section 1231 computation.
What happens to depreciation recapture?
It is figured first and taxed as ordinary income under section 1245 or section 1250. Only the remaining gain is section 1231 gain.
Sources
Checked against these publications on September 30, 2026. Rules and figures change; confirm the current version with your CPA or attorney before you act. This page is general information, not tax or legal advice.
