What Character Is the Gain? §1231 and the Five-Year Lookback

Before you compute the tax on a sale, settle the character of the gain, because rental real estate does not produce ordinary capital gain — it produces something better. A building held more than a year and used in a trade or business falls under IRC §1231, “Property used in the trade or business”, which grants the most favorable asymmetry in the Code: net gains are taxed as long-term capital gain, while net losses are fully deductible as ordinary losses against any income, with no $3,000 cap (section “Portfolio and Investment Income”).

Two conditions ride along, and both are routinely missed:

Recapture comes out first

The §1245 slice from any cost-segregated components returns as ordinary income and the straight-line building depreciation as unrecaptured §1250 gain at up to 25%. Only what remains gets §1231 treatment. On a property you cost-segregated and bonus-depreciated, “remains” can be a small fraction of the headline gain.

The five-year lookback

IRC §1231(c) recharacterizes net §1231 gain as ordinary income to the extent you claimed ordinary §1231 losses in the prior five years. Sell a building at a loss in one year and another at a gain three years later, and the second gain is taxed at 37% rather than 20% up to the amount of the earlier loss. It exists precisely to stop you from harvesting both sides of the asymmetry, and it is tracked on your return whether or not you noticed. Sequence dispositions with the lookback in view: take gains before losses where you have a choice, not after.