Tax Strategy

How to Avoid Capital Gains When Selling a Rental Property

February 5, 2026 · 6 min read

Selling a rental property triggers a tax event that surprises many landlords. Beyond federal capital gains, you'll face depreciation recapture, potentially the Net Investment Income Tax, and state income tax. Combined, these can consume 30-40% of your profit. This guide covers every legal strategy to reduce, defer, or eliminate that tax burden—and helps you decide which approach fits your situation.

Understanding Your Tax Bill (It's Bigger Than You Think)

Many landlords only think about capital gains tax. But when you sell a rental property, you face multiple taxes stacked on top of each other:

The Four Taxes on Rental Property Sales

1
Capital Gains Tax (0-20%)

Federal tax on profit. Rate depends on income: 0% if taxable income < $47,025 (single) / $94,050 (married); 15% for most taxpayers; 20% if income exceeds $518,900 (single) / $583,750 (married).

2
Depreciation Recapture (25% flat)

All depreciation deductions you've claimed (or could have claimed) get "recaptured" at a 25% rate. This is often the largest component of the tax bill.

3
Net Investment Income Tax (3.8%)

Additional Medicare surtax on investment income if your modified AGI exceeds $200,000 (single) / $250,000 (married).

4
State Income Tax (0-13.3%)

Depends on your state. California tops out at 13.3%; Texas, Florida, and Nevada have 0%. State tax applies to the full gain.

Worked Example: $250,000 Profit in California

The Property:

  • Original purchase price: $300,000
  • Land value (not depreciable): $60,000
  • Building value: $240,000
  • Years owned: 15 years
  • Total depreciation claimed: $131,000
  • Adjusted cost basis: $169,000
  • Sale price: $550,000
  • Total gain: $381,000

The Tax Bill:

Capital gains (15% × $250,000)$37,500
Depreciation recapture (25% × $131,000)$32,750
NIIT (3.8% × $381,000)$14,478
CA state tax (~9% × $381,000)$34,290
Total Tax Bill$119,018
Effective tax rate31.2%

Your Options at a Glance

There are seven legal strategies to reduce or defer taxes on a rental property sale. Each has tradeoffs—there's no magic solution that gives you all the money with zero tax and zero strings attached.

StrategyTax OutcomeKey TradeoffBest For
1031 Exchange100% deferredMust buy more real estateActive investors
1031 into DST100% deferredIlliquid, lower returnsPassive investors
Installment SaleSpread over yearsSeller financing riskLower brackets
Opportunity ZoneDeferred + new gains free10+ year lock-upLong-term investors
Primary Residence$250k-$500k excludedMust live there 2+ yearsSingle-property owners
Hold Until Death100% eliminatedYou never get the moneyEstate planning
Charitable TrustPartially eliminatedHeirs get nothingCharitably inclined

Strategy Deep Dives

1. 1031 Exchange (Full Deferral)

Named after Section 1031 of the IRS tax code, this lets you sell your rental property and reinvest the proceeds into another "like-kind" investment property, deferring all capital gains and depreciation recapture taxes indefinitely.

Pros

  • • Defer 100% of federal and state taxes
  • • Can repeat indefinitely (chain exchanges)
  • • Full control over replacement property
  • • Build wealth tax-free for decades

Cons

  • • Must buy more real estate
  • • Strict 45/180 day deadlines
  • • Equal or greater value required for full deferral
  • • Transaction costs (QI fees, closing costs)

Tax math: Using our example, you'd keep all $381,000 of gains working for you instead of sending $119,000 to taxes.

2. 1031 Exchange into a DST (Passive Deferral)

A Delaware Statutory Trust (DST) is a special structure that qualifies for 1031 exchanges but requires no landlord duties. You exchange into fractional ownership of institutional-quality real estate—apartments, medical offices, warehouses—managed by professional sponsors.

Pros

  • • Same 100% tax deferral as regular 1031
  • • Completely passive—no tenants, toilets, trash
  • • Diversify across property types/locations
  • • Can close quickly (helpful for tight deadlines)

Cons

  • • Illiquid (typically 5-10 year hold)
  • • Lower yields than active investing (4-6% typical)
  • • Accredited investors only ($200k+ income or $1M+ net worth)
  • • Sponsor fees reduce returns

Best for: Burnt-out landlords who want to stay in real estate but are done with property management.

3. Installment Sale (Spread the Tax)

Instead of receiving the full sale price at closing, you act as the bank—the buyer makes payments to you over time. You only pay taxes on the portion of gain you receive each year, potentially staying in lower tax brackets.

Pros

  • • Spread tax over multiple years
  • • May keep you in lower brackets
  • • Earn interest on the financed amount
  • • No need to find replacement property

Cons

  • • Still owe full tax eventually
  • • Buyer default risk
  • • No lump sum for reinvestment
  • • Depreciation recapture often still accelerated

Example: Selling a $500k property with $100k down and $400k financed over 10 years. You recognize ~$38k of gain per year instead of $381k in year one.

4. Opportunity Zone Investment

If you invest your capital gains (not the full sale proceeds, just the gain) into a Qualified Opportunity Zone Fund within 180 days of sale, you can defer taxes until 2026 and—if held 10+ years—pay zero tax on any new appreciation in the QOZ investment.

Pros

  • • Defer original gain until 2026
  • • New gains are tax-free if held 10+ years
  • • Can invest just the gain (not full proceeds)
  • • Supports community development

Cons

  • • Original gain becomes taxable in 2026 regardless
  • • 10+ year lock-up for full benefit
  • • Limited to designated zones
  • • QOZ fund quality varies widely

Note: The "step-up" benefits for 5 and 7-year holds expired in 2021 and 2019 respectively. The only remaining benefit is the 10-year exclusion on new gains.

5. Convert to Primary Residence (Section 121 Exclusion)

If you move into your rental property and live there as your primary residence for at least 2 of the 5 years before selling, you may qualify to exclude up to $250,000 ($500,000 if married) of capital gains from taxes under Section 121.

Pros

  • • Exclude up to $250k/$500k of gains (permanent)
  • • Keeps full sale proceeds
  • • No need to reinvest in real estate
  • • Can combine with other strategies

Cons

  • • Must actually live there 2+ years
  • • Depreciation recapture still applies
  • • "Non-qualified use" rules reduce exclusion
  • • Only works for one property at a time

Important caveat: Post-2008 rules require prorating the exclusion for "non-qualified use" periods. If you rented the property for 8 years and lived in it for 2 years, only 20% of the gain qualifies for the exclusion. And you'll still owe 25% depreciation recapture on all claimed depreciation.

6. Hold Until Death (Stepped-Up Basis)

If you never sell the property during your lifetime, your heirs inherit it with a "stepped-up" cost basis equal to the fair market value at the time of your death. All capital gains and accumulated depreciation are permanently eliminated.

Pros

  • • 100% of gains permanently eliminated
  • • Depreciation recapture eliminated too
  • • Heirs can sell immediately with no tax
  • • Continue collecting rent until death

Cons

  • • You never access the equity
  • • Still have landlord responsibilities
  • • May be subject to estate tax (large estates)
  • • Heirs inherit any existing problems

Best for: Older landlords with rental income they don't need to sell, who want to maximize inheritance for heirs.

7. Charitable Remainder Trust (CRT)

You transfer the property to an irrevocable charitable trust before selling. The trust sells the property tax-free, invests the proceeds, and pays you income for life (or a set term). When you die, the remaining assets go to charity.

Pros

  • • No capital gains tax at sale
  • • Immediate charitable deduction
  • • Lifetime income stream
  • • Full proceeds stay invested

Cons

  • • Irrevocable—no changing your mind
  • • Heirs receive nothing
  • • Complex and expensive to set up
  • • Income is taxable as received

Best for: Charitably-minded investors with no heirs or who have already provided for heirs through other means.

The Eighth Option: Just Pay the Tax

Sometimes the best strategy is no strategy. Paying the tax might be the right choice when:

  • You need liquidity. If you need cash for a non-real-estate purpose (medical bills, business opportunity, college tuition), paying 30% in tax and keeping 70% may be the pragmatic choice.
  • Your gains are modest. If your total gain is under $50,000, the tax bill may be acceptable compared to the complexity and costs of alternatives.
  • You want out of real estate entirely. If you never want to think about real estate again, paying the tax and moving to stocks or bonds may give you peace of mind worth the cost.
  • Tax rates may rise. If you believe tax rates will increase substantially, paying at today's rates might be smarter than deferring into higher future rates.

How to Choose Your Strategy

Ask yourself these questions to narrow down the best approach:

Do you want to stay invested in real estate?

Yes → 1031 exchange (traditional or DST)

No → Consider installment sale, pay the tax, or Opportunity Zone

Do you want to remain an active landlord?

Yes → Traditional 1031 into another rental

No → DST, NNN lease, or exit real estate entirely

Could you live in the property for 2+ years?

Yes → Consider primary residence conversion

No → Other strategies more practical

Are you optimizing for yourself or your heirs?

Yourself → 1031, installment sale, or pay the tax

Heirs → Hold until death for stepped-up basis

Do you have charitable intentions?

Yes → Charitable Remainder Trust may fit

No → Other strategies preserve more for you/heirs

Key Takeaways

  • 1.The real tax bill includes capital gains + depreciation recapture + NIIT + state tax—often 30-40% of your profit.
  • 2.1031 exchanges offer the most powerful deferral but require staying in real estate. DSTs provide a passive alternative.
  • 3.Every strategy has tradeoffs—there's no free lunch. Evaluate based on your need for liquidity, desire to stay in real estate, and timeline.
  • 4."Just pay the tax" is a valid choice when you need liquidity or want to exit real estate completely.
  • 5.Consult a tax professional before executing any strategy—the rules are complex and penalties for mistakes are severe.

This article is for educational purposes only and does not constitute tax, legal, or investment advice. Tax laws change frequently and vary by jurisdiction. Consult qualified professionals before making decisions about your specific situation.