By Harry Prabandham · Updated September 28, 2026
Tax Planning
Selling a Rental Property: How the Gain Is Taxed and Ways to Defer It
A rental sale can trigger tax on depreciation (up to 25%), capital gains, the 3.8% NIIT, and state tax. A 1031 exchange or installment sale can defer some.
Selling a Rental Property: How the Gain Is Taxed and Ways to Defer It
1 / 7
How is the sale of a rental property taxed?
- Gain is the sale price, less selling costs, minus your adjusted basis: purchase price plus improvements, minus depreciation allowed or allowable.
- Gain equal to straight-line depreciation on the building is taxed at up to 25%; components depreciated faster are generally recaptured as ordinary income.
- Remaining long-term gain is taxed at 0%, 15%, or 20%, and the 3.8% net investment income tax may apply on top.
- State tax is a separate layer; California taxes capital gains as ordinary income.
Try Our Free Tools
Full Guide
How is the sale of a rental property taxed?
- Gain is the sale price, less selling costs, minus your adjusted basis: purchase price plus improvements, minus depreciation allowed or allowable.
- Gain equal to straight-line depreciation on the building is taxed at up to 25%; components depreciated faster are generally recaptured as ordinary income.
- Remaining long-term gain is taxed at 0%, 15%, or 20%, and the 3.8% net investment income tax may apply on top.
- State tax is a separate layer; California taxes capital gains as ordinary income.
Why does depreciation matter so much at sale?
- Depreciation reduces basis whether or not you claimed it, so skipping it does not avoid the tax at sale.
- Long holding periods on a 27.5-year schedule can produce a large depreciation component of the gain.
- Cost segregation and bonus depreciation increase the portion that may be taxed at ordinary rates.
- A full taxable sale also releases suspended passive losses, which can offset part of the gain and other income.
When does the 3.8% net investment income tax apply?
- It applies to the lesser of net investment income or modified AGI above $200,000 single or $250,000 joint.
- These thresholds are not indexed, so a one-time sale can push many owners over them.
- Real estate professionals whose rental activity is a nonpassive trade or business may be able to exclude the gain from NIIT.
- Combined with the 20% top rate, the federal rate on long-term gain can reach 23.8%.
How does a 1031 exchange defer the tax?
- Reinvesting in like-kind real property held for investment or business use can defer both capital gain and depreciation-related gain.
- You have 45 days from the sale to identify replacement property and 180 days, or your return due date if earlier, to close.
- Cash or debt relief not replaced, called boot, is taxable.
- A qualified intermediary must hold the proceeds; touching the cash generally ends the exchange.
Can an installment sale or opportunity zone help?
- An installment sale spreads gain over the years payments are received, though ordinary-income recapture is taxed in the year of sale.
- Seller financing carries buyer credit risk, and very large installment notes can trigger an interest charge on the deferred tax.
- Under the original opportunity zone rules, deferred gain is recognized no later than December 31, 2026.
- The 2025 tax law made opportunity zones permanent for investments after 2026, with rolling five-year deferral and a 10% basis increase, or 30% for rural funds.
What else affects the final tax bill?
- Documented improvements raise basis and lower gain, so improvement records matter.
- Commissions and many closing costs reduce the amount realized.
- Heirs generally receive a stepped-up basis at death, which removes pre-death gain and prior depreciation from income tax.
- Converting a rental to a primary residence does not shelter prior depreciation and may limit the home-sale exclusion.
Key takeaways
- A rental sale is taxed in layers: depreciation-related gain, capital gain, NIIT, and state tax.
- Depreciation allowed or allowable reduces basis whether or not you took it.
- 1031 exchanges, installment sales, and opportunity zones each defer tax with real tradeoffs and deadlines.
- Model the after-tax proceeds with a CPA before listing the property.
Related Topics
How a 1031 Exchange Works: Deadlines, Boot, and Trade-offs
A 1031 exchange defers tax on the sale of investment real estate if the proceeds buy like-kind property within strict 45- and 180-day deadlines.
Tax PlanningRental Property Tax Deductions: What Landlords Can Deduct
Landlords can deduct ordinary rental expenses and depreciate the building over 27.5 years, but passive loss rules often limit how much reduces tax now.
Tax PlanningCapital Gains Tax Rates for 2026: Brackets, NIIT, and Netting Rules
In 2026, long-term gains are taxed at 0% up to $49,450 single ($98,900 joint), 15% up to $545,500 ($613,700), and 20% above, plus possible NIIT.