When you sell an investment property at a profit, you can defer the tax by rolling the proceeds into another property through a 1031 exchange. But most sellers walk in worried about capital gains and get blindsided by a second tax — depreciation recapture — that can be just as large. Understanding both taxes (and the elegant way to make them disappear permanently) is what separates a good real estate exit from an expensive one.
Sell a rental and you can owe:
You owe recapture on depreciation you took even if you forgot to claim it — the IRS assumes you did. On a property held for 15 years, recapture alone can be a six-figure line item.
A like-kind (1031) exchange lets you sell one investment property and buy another, carrying your old cost basis forward and deferring both the capital gains and the recapture — no tax due now. The rules are strict and unforgiving on timing:
Miss a deadline by a day and the whole exchange fails — the tax comes due in full.
Here's the move that turns deferral into elimination. A 1031 only defers tax — sell for cash eventually and all the postponed gain and recapture come due. But if you keep exchanging into new properties and hold until death, your heirs receive the property with a stepped-up cost basis equal to its fair-market value on your date of death. All that deferred capital gain and depreciation recapture — accumulated over a lifetime of exchanges — is wiped out entirely. Investors call it "swap till you drop," and it's one of the most powerful (and perfectly legal) tax strategies in real estate.
Trace the two taxes through a real sale. Lena bought a rental 15 years ago for $300,000, claimed about $150,000 of depreciation over the years, and is selling for $700,000. Her math:
By rolling the full proceeds into a like-kind replacement through a 1031 exchange, Lena defers both taxes and keeps her entire equity working in the new property instead of handing a six-figure chunk to the IRS today. If she instead took some cash out — "boot" — that portion would be taxed first, and recapture is taxed before capital gain.
The 1031 toolkit is broader than most people realize. A reverse exchange lets you buy the replacement property before selling the old one (useful in a competitive market). An improvement exchange lets you use proceeds to renovate the replacement. And you are not limited to trading one building for another — "like-kind" for real estate is broad, so an investor can exchange a management-heavy rental into a more passive holding while still deferring the tax. Each variation has strict rules and a qualified-intermediary requirement, but together they make a 1031 a flexible planning tool, not just a one-for-one trade.
A 1031 isn't always right. Sometimes you want to sell, pay the tax, and move on — especially if you're in a low-income year, want to exit real estate entirely, or can offset the gain with losses elsewhere. And there's a residential angle worth knowing: if you convert a rental to your primary residence and meet the use tests, a portion of the gain may qualify for the home-sale exclusion (though recapture still applies). The right answer is a side-by-side comparison of hold, sell, and exchange — not a reflex.
Upload your documents, model scenarios, and get clear, report-driven insights.
Run a sell-vs-hold analysis with Dversify →This content is for general educational purposes only and is not personalized investment, tax, or legal advice. Figures and rules referenced may change; verify against primary sources and consult a qualified professional about your situation.