Coins and house
How to Use 100% Bonus Depreciation in Real Estate
March 24, 2025
couple looking off toward a mountain
How to Reduce Taxes (In the Years to Come)
March 28, 2025

March 24, 2025
Last Updated : May 15, 2026

How to Avoid Capital Gains Tax on Real Estate

Key Takeaways

  • You can reduce, defer, or sometimes avoid capital gains tax on real estate by using strategies like a 1031 exchange, primary residence exclusion, installment sale, Qualified Opportunity Fund, capital loss harvesting, or step-up in basis.
  • The best strategy depends on the property type. Rental and investment properties often rely on 1031 exchanges, installment sales, passive losses, or QOFs, while a house or primary residence may qualify for the $250,000 or $500,000 home sale exclusion.
  • Reinvesting sale proceeds only helps avoid or defer capital gains tax if it is done through a qualifying strategy, such as a 1031 exchange or Qualified Opportunity Fund.
  • Most capital gains tax strategies need to be planned before closing. Once the sale is complete, your options are much more limited.

Quick Answer: How Can You Avoid Capital Gains Tax on Real Estate?

You can avoid or reduce capital gains tax on real estate by choosing the right strategy before you sell.

Common options include using the primary residence exclusion for a home sale, completing a 1031 exchange for rental or investment property, reinvesting eligible gains into a Qualified Opportunity Fund, spreading the gain through an installment sale, offsetting gains with capital losses, selling in a lower-income year, or holding the property until heirs receive a step-up in basis.

For most real estate investors, the right strategy depends on whether the property is a primary residence, rental property, investment property, land, or inherited property.

Selling real estate can create a major tax bill if the property has increased in value. The good news is that there are legal ways to reduce, defer, or sometimes avoid capital gains tax on real estate, but the right approach depends on what you are selling.

A homeowner selling a primary residence may qualify for the home sale exclusion. A real estate investor selling a rental or investment property may need a 1031 exchange, installment sale, Qualified Opportunity Fund, passive loss strategy, or capital loss offset. In some cases, timing the sale or holding property until heirs receive a step-up in basis can reduce the tax impact even further.

This guide explains the main strategies to consider before selling a house, rental property, investment property, or land.

What Is Capital Gains Tax on Real Estate?

Capital gains tax on real estate applies when you sell property for more than your adjusted basis. Your adjusted basis generally starts with what you paid for the property, then changes based on items like improvements, depreciation, and certain selling costs.

The tax treatment depends on how long you owned the property:

  • Short-term capital gains: If you held the property for one year or less, the gain is generally taxed at ordinary income tax rates.
  • Long-term capital gains: If you held the property for more than one year, the gain may be taxed at 0%, 15%, or 20%, depending on your taxable income.

For rental and investment property, the tax calculation can also involve depreciation recapture, state taxes, and the Net Investment Income Tax, so the real tax bill may be higher than the long-term capital gains rate alone.

Which Capital Gains Tax Strategy Fits Your Property Type?

Property Type

Best Strategies to Consider

What to Know

Primary residence/
house

Primary residence exclusion, tax-rate timing, basis planning

Best fit for homeowners who lived in the home
for at least two of the last five years.

Rental property

1031 exchange, installment sale, passive loss strategy,
capital loss harvesting

Depreciation recapture and passive losses can affect the final tax result.

Investment
property

1031 exchange, QOF, installment sale, tax-rate timing

 Best strategy depends on whether you want to stay invested or exit real estate.

Land

1031 exchange, installment sale, QOF, capital loss harvesting

   Land can often qualify for investment-property strategies
if held for investment.

Inherited property

Step-up in basis

 Heirs may receive a new basis based on fair market value at death.

Property sold
after reinvesting

1031 exchange or QOF only

Reinvesting does not automatically defer tax
unless a qualifying structure is used.

Strategy 1: Use the Primary Residence Exclusion When Selling a House

If you’re selling the home you live in, this is the most straightforward way to avoid capital gains tax on real estate:

  • $250,000 in tax-free gains for single filers
  • $500,000 in tax-free gains for married couples filing jointly

To qualify, you need to have owned and lived in the home for at least two of the last five years, and not used the exclusion within the past two years.

Example: You bought your home for $300,000 and sold it for $600,000. As a single filer, the first $250,000 of that gain is tax-free. You only owe capital gains real estate tax on the remaining $50,000. A married couple in the same situation owes nothing.

Best for: Homeowners selling a primary residence they owned and lived in for at least two of the last five years.

Does not usually work for: Pure rental properties, second homes, or investment properties unless the property also qualifies under the primary residence rules.

How to Avoid Capital Gains Tax on Rental Property

Rental property usually does not qualify for the primary residence exclusion unless it was also used as your main home during the required period. For most investors, the main ways to reduce or defer capital gains tax on rental property include:

  • Using a 1031 exchange to defer capital gains and depreciation recapture.
  • Selling through an installment sale to spread gain over multiple tax years.
  • Using suspended passive losses to offset part of the gain.
  • Offsetting gains with capital losses from other investments.
  • Timing the sale for a lower-income year.
  • Holding the property long term and planning for a step-up in basis.

The right strategy depends on whether you want to buy another property, exit real estate, or use existing losses to reduce the taxable gain.

Strategy 2: Use a 1031 Exchange to Defer Capital Gains Tax on Rental or Investment Property

The 1031 exchange is the go-to move for real estate investors who want to avoid capital gains tax without cashing out. You roll the proceeds from one property into another of equal or greater value, and the tax gets pushed down the road, indefinitely, as long as you keep exchanging.

Rules & Example

To fully defer capital gains tax with a 1031 exchange, investors generally need to:

  • Sell real property held for investment or business use.
  • Buy like-kind real property held for investment or business use.
  • Identify replacement property within 45 days.
  • Close within 180 days.
  • Use a qualified intermediary.
  • Avoid taking possession of the sale proceeds.
  • Reinvest equal or greater value to avoid taxable boot.

Example: You sell a rental for $500,000 and buy a new property for $650,000. No capital gains real estate tax due. Do it again on the next sale and the tax keeps deferring. It only comes due if you sell without rolling into another exchange.

Read more on like-kind exchanges.

What Is a Lazy 1031 Exchange?

If a full 1031 exchange feels like too much, there’s a simpler version, the “Lazy” 1031 Exchange.

A Lazy 1031 Exchange is not a formal 1031 exchange. It is a planning approach where investors use suspended passive losses, new passive losses, or other deductions to reduce the taxable impact of selling a property.

This may help investors who do not want to complete a full 1031 exchange but still have available losses to offset part of the gain.

Strategy 3: Reinvest Eligible Gains Into a Qualified Opportunity Fund

A Qualified Opportunity Fund lets you defer capital gains real estate tax by reinvesting your proceeds into businesses or real estate in designated low-income areas. Hold the investment for at least 10 years, and any growth on the QOF itself is completely tax-free.

To qualify, the gain must be invested in a QOF within the required window, generally 180 days. Current IRS guidance also notes that the deferred gain is recognized by the earlier of an inclusion event or December 31, 2026.

Example: You sell a property with a $200,000 gain and put the proceeds into a QOF. The original tax is deferred, and if you hold for 10+ years, all appreciation on the new investment is never taxed.

How much can you actually save? On a $200,000 gain at a 20% rate, you’d normally write a $40,000 check to the IRS. With a QOF, that money stays invested and compounding. The longer you hold, the bigger the advantage.

Important: QOF rules are time-sensitive. Rules should be reviewed regularly because Opportunity Zone rules and deadlines can change.

Strategy 4: Use an Installment Sale to Spread Capital Gains Tax Over Time

An installment sale is worth considering if you’re selling and don’t need all the cash up front. Instead of getting paid in a lump sum, you structure the deal so payments come in over several years.

You only pay capital gains real estate tax on what you actually receive each year, which can keep you in a lower bracket.

Example: You sell a property for $500,000 and set up $50,000 annual payments over 10 years. Rather than paying tax on the entire gain at once, you spread it out, potentially saving thousands by staying out of the top bracket.

1031 exchange vs. installment sale: which one?

If you’re staying in real estate, use the 1031 exchange and defer the capital gains tax indefinitely. If you’re done with real estate and just want to manage the tax hit on your way out, the installment sale real estate approach makes more sense.

When to be careful

Installment sales require careful structuring. The contract should account for interest, buyer default risk, depreciation recapture, and whether the sale qualifies for installment treatment.

Strategy 5: Hold Property Until Heirs Receive a Step-Up in Basis

This one isn’t about selling. It’s about what happens when you don’t. When you pass real estate to your heirs, the cost basis resets to the property’s fair market value at the time of your death. Your heirs inherit it at today’s value, not what you paid decades ago. This is the Step-Up in Basis.

Example: You bought a rental for $200,000. At the time of your death, it’s worth $900,000. Your heirs inherit it with a $900,000 basis. If they turn around and sell at that price, they owe zero in capital gains real estate tax.

A lifetime of appreciation, gone entirely from the tax bill.

This strategy is most relevant for long-term real estate investors who are thinking about estate planning, not just a near-term sale. If the property is inherited, the heir’s basis is often reset, which may reduce or eliminate capital gains tax on appreciation that happened during the original owner’s lifetime.

For investors who plan to hold, this is one of the most powerful capital gains tax strategies available.

Strategy 6: Offset Real Estate Capital Gains with Capital Losses

If you’ve had a rough year in stocks or other investments, those losses can actually work in your favor. Capital losses offset capital gains dollar-for-dollar. If your losses exceed your gains, you can deduct up to $3,000 per year from ordinary income, and anything left over carries forward.

Example: You sell a rental with a $50,000 gain, but you’ve got $35,000 in stock losses from the same year. Your taxable gain drops to $15,000, a meaningful cut to your capital gains real estate tax bill without changing anything about the property transaction itself.

Can stock losses offset real estate capital gains?

Yes, capital losses from stocks or other investments can generally offset capital gains from real estate. If your capital losses exceed your capital gains, a limited amount may be used against ordinary income each year, with unused losses carried forward.

Strategy 7: Sell in a Lower-Income Year to Reduce Capital Gains Tax

This one is simple but often overlooked. Long-term capital gains rates are tied to your total taxable income, and if you can sell in a year when your income is lower, your rate drops. Sell in the right year, and you might pay 0%.

For example, some taxpayers may qualify for the 0% long-term capital gains rate if their taxable income falls below the IRS threshold for their filing status. Because these thresholds change, confirm the current-year limits before planning a sale.

Ways to pull this off:

  • Sell during retirement or a career transition when income is naturally lower
  • Stack deductions in the same year as your sale
  • Coordinate timing with your spouse’s income if filing jointly

More information: IRS Topic 409

Strategy Comparison: Which Capital Gains Tax Strategy Is Right for You?

Strategy Reduces, Defers, or Eliminates? Best For Key Requirement Watch-Out
Primary residence exclusion May eliminate Homeowners selling a main home Owned and lived in home for 2 of last 5 years Gain above exclusion may still be taxable
1031 exchange Defers Rental and investment property owners Buy qualifying like-kind replacement property Strict 45-day and 180-day rules
Lazy 1031 / passive losses Reduces Investors with suspended passive losses Available passive losses Not a formal 1031 exchange
Qualified Opportunity Fund Defers, with possible exclusion on QOF appreciation Investors with eligible gains Timely QOF investment Review current deferral rules
Installment sale Spreads tax over time Sellers exiting real estate Buyer pays over multiple years Buyer default and interest issues
Step-up in basis May eliminate for heirs Long-term estate planning Property inherited after death Estate planning and legal review needed
Capital loss harvesting Reduces Investors with capital losses Losses available to offset gains Loss timing matters
Tax-rate timing Reduces Sellers with flexible timing Lower taxable income year State taxes and NIIT may still apply

Frequently Asked Questions About Capital Gains Tax on Real Estate

How do I avoid capital gains tax on real estate?
You can reduce, defer, or sometimes eliminate capital gains tax using strategies like the primary residence exclusion, 1031 exchange, Qualified Opportunity Fund (QOF), installment sale, capital loss harvesting, passive losses, tax-rate timing, or step-up in basis planning.

How do I avoid capital gains tax on rental property?
Common strategies include a 1031 exchange, installment sale, passive loss offsets, capital loss harvesting, and selling in a lower-income year.

Can I avoid capital gains tax by reinvesting in another property?
Only if you use a qualifying structure like a 1031 exchange or Qualified Opportunity Fund (QOF). Simply buying another property does not defer tax.

How do I avoid capital gains tax when selling a house?
You may qualify for the primary residence exclusion, which allows up to $250,000 of tax-free gain for single filers or $500,000 for married couples filing jointly.

How do I defer capital gains without a 1031 exchange?
Options include an installment sale, Qualified Opportunity Fund (QOF), tax-rate timing, passive loss offsets, and capital loss harvesting.

Can stock losses offset capital gains from real estate?
Yes. Capital losses from stocks or other investments can offset real estate capital gains dollar-for-dollar.

How do I avoid capital gains tax on land sale?
Investment land may qualify for strategies like a 1031 exchange, installment sale, QOF investment, and capital loss harvesting.

Do I pay capital gains tax on inherited real estate?
Inherited property often receives a step-up in basis, which resets the property value for tax purposes and can greatly reduce capital gains tax.

Final Thoughts: Avoid Capital Gains Tax and Keep More of What You Made

The best way to avoid or reduce capital gains tax on real estate is to plan before the sale happens. Once you close, strategies like a 1031 exchange, installment sale, Qualified Opportunity Fund, passive loss planning, and tax-rate timing may no longer be available or may become much harder to use.

If you are preparing to sell a rental property, investment property, land, or a highly appreciated home, work with a real estate-focused tax advisor before listing the property or accepting an offer.

The earlier you plan, the more options you have to reduce, defer, or potentially eliminate the tax impact. Schedule a free discovery meeting.

 Click to Access the 2025 Tax Changes Tracker

Recent Articles