Real estate gains are more complex than stock gains. You must account for the primary residence exclusion, depreciation recapture taxed at a different rate, and potential NIIT. This guide explains each layer for 2026.
Primary Residence: The § 121 Exclusion
The most powerful real estate tax benefit is the primary residence exclusion under IRC § 121. If you owned and used the home as your principal residence for at least 24 months within the 5-year period ending on the sale date, you can exclude up to $250,000 of gain (single) or $500,000 (MFJ). Gain above the exclusion is long-term if you held the property over a year. The exclusion is not available for vacation homes or properties primarily held for investment, and gain attributable to depreciation claimed after May 6, 1997 (for example, a home office or a period as a rental) is not excludable.
Rental Property: Depreciation Recapture
When you own rental property, the IRS requires you to depreciate the building (not land) over 27.5 years for residential or 39 years for commercial. Each year of depreciation reduces your adjusted cost basis. When you sell, the gain is split into: (1) unrecaptured § 1250 gain — the portion attributable to prior depreciation deductions, taxed at a maximum of 25%; and (2) remaining long-term gain, taxed at the standard 0%/15%/20% rates.
Example (simplified, ignoring the mid-month convention): You bought a rental for $300,000 (building $250,000 + land $50,000). After 10 years, you've taken $90,909 in depreciation ($250,000 ÷ 27.5 × 10). Your adjusted basis is $209,091. If you sell for $400,000, your gain is $190,909. Of that, $90,909 is unrecaptured § 1250 gain (max 25%), and $100,000 is standard long-term gain (0%/15%/20%).
The § 1250 Recapture Rate
Unrecaptured § 1250 gain is taxed at a maximum of 25% — not your ordinary income rate, but also not the standard long-term preferential rate. It is a special category that sits between ordinary income and long-term gain. Taxpayers in the 10%, 12%, 22% or 24% ordinary bracket pay their ordinary rate on this gain (25% or less). Taxpayers in the 32% or higher brackets are capped at 25%.
1031 Exchange: Deferring the Tax
A § 1031 like-kind exchange allows you to defer all capital gains tax — including depreciation recapture — on the sale of investment property, provided you reinvest in a qualifying replacement property. You must: (1) identify the replacement property within 45 days of closing, and (2) complete the exchange within 180 days (or by your return due date, if earlier). Boot received (cash not reinvested) is taxable. The basis in the replacement property is reduced by the deferred gain, so the tax is deferred — not eliminated.
State Tax on Real Estate Gains
Most states follow the federal treatment with one important difference: no state provides a § 1250 recapture rate — they simply tax all real estate gains as ordinary state income. California taxes all gains at ordinary CA rates (up to 13.3%). New York does the same. The federal § 121 exclusion is honored by most states, though California has its own version with the same dollar limits.
NIIT on Real Estate Gains
Gain from a primary residence is excluded from NIIT to the same extent it is excluded from income under § 121. Gain above the exclusion — and all gain from investment/rental property — is subject to the 3.8% NIIT if your MAGI exceeds $200,000 (single), $250,000 (MFJ) or $125,000 (MFS), unless the property was used in a non-passive trade or business. The combination of 20% long-term rate + 3.8% NIIT + state tax can make the effective rate on large real estate gains quite high.