Advanced Strategy 12 min read Updated August 2026

How to Avoid Capital Gains Tax on Rental Property: 7 Legal Strategies (2026)

When you sell a rental, the IRS wants a cut of both your appreciation and the depreciation you claimed along the way. The good news: you rarely have to write that check the year you sell. Below is every legal tool for deferring or reducing the bill — and, just as important, an honest framework for which one actually fits your situation. One caveat up front: most of these defer the tax rather than erase it. Only two — the §121 exclusion and the step-up at death — truly forgive part of the gain.

1. First: what you actually owe when you sell

You can't plan around a number you haven't measured. A rental sale is taxed in layers, not one flat rate:

  • Long-term capital gains on your appreciation — 0%, 15%, or 20% depending on your income (single-filer 2026 brackets below).
  • Unrecaptured §1250 depreciation recapture — the depreciation you deducted is clawed back at a maximum rate of 25% (or your ordinary rate, if lower). This is the layer landlords forget.
  • §1245 recapture — any cost-segregation or bonus-depreciation on personal-property components recaptures at ordinary rates.
  • Net Investment Income Tax — an extra 3.8% if your MAGI exceeds $200,000 (single) / $250,000 (married filing jointly).
  • State income tax — varies widely; see your state's rental-tax guide.
2026 taxable income (single)Long-term capital gains rate
Up to $49,4500%
$49,451 - $545,50015%
Over $545,50020%

For most landlords the effective combined federal rate works out to up to 28.8% on the depreciation-recapture portion and 18.8% on the rest (15% gains + 25% recapture + 3.8% NIIT). Two full walkthroughs, with worked examples: Selling Rental Property Taxes and Depreciation Recapture Explained.

Recapture rarely disappears. Most strategies below defer or shrink the capital-gains layer. Depreciation recapture is the stickiest layer — a 1031 exchange defers it, an installment sale generally accelerates it, and only the step-up at death erases it. Measure it first.

2. The 7 strategies at a glance

StrategyDefer or reduce?Best when
1031 exchangeDefer (indefinitely)You're buying another investment property
Installment saleDefer (spread)You'll seller-finance and want the gain spread
Opportunity Zone fundDefer; future growth tax-free at 10 yrsYou want to reinvest the gain, not buy real estate directly
§121 exclusionReduce (partial forgiveness)You can live in it 2 of the last 5 years
Bracket timingReduceYou'll have a low-income year
Loss offsetsReduceYou have suspended passive losses or other capital losses
Step-up at deathEliminate (for heirs)It's a legacy/hold-forever property

3. 1031 exchange — defer indefinitely

A like-kind exchange under IRC §1031 lets you roll all of your gain — including the depreciation recapture — into a replacement investment property and pay nothing now. It's the most powerful deferral tool landlords have, and you can repeat it indefinitely. The tradeoffs are strict deadlines and a required middleman:

  • 45-day identification. Within 45 days of closing you must identify up to 3 replacement properties in writing.
  • 180-day close. You must close on the replacement within 180 days of the sale (not 180 days after the 45).
  • Qualified Intermediary required. You can never touch the proceeds — a QI holds them between the two closings.
  • Watch the boot. Any cash or debt relief you pocket ("boot") is taxable.

Full mechanics, boot examples, and the related-party rules: 1031 Exchange: Step-by-Step Guide for Landlords.

4. Installment sale — spread the gain

If you seller-finance the sale (the buyer pays you over several years), IRC §453 lets you recognize the capital gain proportionally as you collect principal — instead of all at once. Spreading the gain can keep you out of the 20% bracket and soften the NIIT hit. The important catch: depreciation recapture doesn't spread. §1245 recapture is taxed in full in the year of sale, and only the gain above your recapture spreads out.

The gross-profit-percentage math, Form 6252, and the §453A interest charge on large notes: Installment Sales for Rental Property (Section 453).

5. Opportunity Zone reinvestment

Investing your capital gain into a Qualified Opportunity Fund defers the tax on that gain — and if you hold the fund at least 10 years, its future appreciation is never taxed. Unlike a 1031 exchange, you reinvest only the gain (not the full sale proceeds), and you're not limited to buying real estate directly.

2026 is a transition year. The original program's deferral ends December 31, 2026, and a new permanent version (under OBBBA) begins in 2027 with some rules still being finalized. A QOF also addresses the capital-gain layer only, not depreciation recapture. Full details: Opportunity Zones for Rental Property Investors.

6. Move back in — the §121 exclusion

This is one of the few strategies that truly forgives gain. Under IRC §121 you can exclude up to $250,000 of gain ($500,000 married filing jointly) if you owned and used the home as your principal residence for periods totaling at least two of the five years ending on the sale date — the "2-of-5" test. Some landlords convert a former residence to a rental, or move back into a rental before selling, to capture it.

Two limits keep this honest: depreciation you claimed after May 6, 1997 is never excludable (it still gets recaptured up to 25%), and the "non-qualified use" rule prorates the exclusion for years the home was a rental. So §121 shrinks the bill on a mixed-use property rather than erasing it.

The 2-of-5 test, the non-qualified-use fraction, and the conversion basis rules: Converting Your Primary Residence to a Rental Property.

7. Time the sale into a 0% bracket year

Long-term capital gains are 0% while your taxable income sits below $49,450 (single, 2026). A gap year — early retirement, a sabbatical, a business loss, a year between jobs — can let a slice of your gain ride at 0% federal. It won't cover a large gain (the gain itself pushes you up through the brackets, and recapture and NIIT still apply), but timing which year you sell is a free lever most sellers ignore. Pairing a low-income year with an installment sale multiplies the effect.

8. Offset the gain with losses

A fully taxable sale is also when your suspended passive losses finally break free — years of disallowed rental losses on that property (and, on a complete disposition, your other passive activities) are released to offset the gain. Capital losses elsewhere in your portfolio can offset the capital-gains layer too.

How the release works on a fully taxable disposition: Suspended Passive Losses and Rental Loss Deduction Rules.

9. Hold until death — the step-up in basis

The ultimate — if morbid — strategy: don't sell. When you pass the property to heirs, its basis generally "steps up" to fair market value at the date of death, wiping out the built-in capital gain and the depreciation recapture for your heirs. This is why "1031 until you die" (defer, defer, then step up) is a real estate-planning strategy. It's not something to plan a life around, but for a legacy property it changes the math on whether to sell at all.

10. Which strategy fits you?

  • Buying another investment property? → 1031 exchange.
  • Willing to seller-finance and want income spread out? → Installment sale.
  • Want to reinvest the gain but not into real estate directly? → Opportunity Zone fund.
  • Can you live in the property 2 of the next 5 years? → §121 exclusion.
  • Expecting a low-income year? → Time the sale for the 0% bracket (and consider stacking an installment sale).
  • Sitting on suspended losses or portfolio capital losses? → Sell in a year you can use the offsets.
  • A legacy property you don't need to sell? → Hold for the step-up.

These aren't mutually exclusive. A common playbook: 1031 into a replacement property, keep exchanging as your portfolio grows, and let the step-up erase the deferred gain at the end. The right combination depends on your income, your reinvestment plans, and your timeline.

This guide is educational and not individualized tax advice. Rental dispositions are fact-specific — confirm any strategy with a qualified tax professional before you act on it.

See your sale tax before you sell

SheltrIQ models capital gains, depreciation recapture, and NIIT on a disposition — so you know the number each strategy is working against.

Related Articles