Real estate investors often spend years building equity, improving properties, and increasing cash flow. Then comes the sale—and with it, a potentially large capital gains tax on real estate.
Depending on your income, how long you’ve owned the property, and the amount of depreciation you’ve claimed, taxes can consume a significant portion of your profits. Many investors are surprised to learn that the IRS doesn’t just tax the appreciation in value. You may also owe depreciation recapture tax, state taxes, and other taxes that reduce the amount you actually keep after closing.
The good news is that the tax code contains several legal strategies that can help you avoid capital gains tax when selling real estate, defer taxes, or significantly reduce what you owe. Whether you’re looking for ways to reduce capital gains tax on rental property or evaluating a 1031 exchange for real estate, the key is planning before you sell—not after.
I’ve reviewed thousands of tax returns over the years, and one of the biggest mistakes investors make is waiting until the deal closes to think about taxes. By then, many opportunities have already disappeared. Strategies such as the Section 121 exclusion, cost segregation, bonus depreciation, using passive losses from real estate, or structuring an installment sale of real estate often work best when implemented before the transaction.
If you’re wondering how to avoid capital gains tax on real estate, these five IRS-approved strategies can help you keep more of your profits and potentially save tens—or even hundreds—of thousands of dollars when you sell.
Key Takeaways
- Suspended passive losses can offset capital gains and, in some cases, other income when you sell an investment property.
- The Section 121 exclusion may allow homeowners to exclude up to $250,000 ($500,000 for married couples) of capital gains on a primary residence.
- A 1031 exchange can defer both capital gains taxes and depreciation recapture when you reinvest in qualifying real estate.
- Cost segregation and bonus depreciation can create losses that offset gains from the sale of investment property.
- An installment sale can spread gains across multiple years, potentially reducing your overall tax burden.
Watch the original video where I break down these five strategies and explain how investors reduce capital gains tax on investment property.
What Is Capital Gains Tax on Real Estate?
Capital gains tax applies when you sell a property for more than your adjusted basis.
In simple terms:
Capital Gain = Sales Price – Adjusted Basis
Your adjusted basis generally starts with what you paid for the property and is adjusted for improvements, depreciation, and certain expenses.
For real estate investors, the tax bill can include:
- Federal capital gains tax
- State capital gains tax
- Net Investment Income Tax
- Depreciation recapture tax
That’s why understanding how to avoid paying capital gains tax rates on capital assets is pivotal to profiting.
Request a free consultation with an Anderson Advisor
At Anderson Business Advisors, we’ve helped thousands of real estate investors avoid costly mistakes and navigate the complexities of asset protection, estate planning, and tax planning. In a free 45-minute consultation, our experts will provide personalized guidance to help you protect your assets, minimize risks, and maximize your financial benefits. ($750 Value)
Strategy #1: Use Suspended Passive Losses
One of the most overlooked tax strategies involves suspended passive losses. Many investors accumulate these losses over time without realizing it.
This commonly happens when:
- Depreciation exceeds rental income
- Cost segregation creates large paper losses
- Rental properties generate losses that cannot currently be deducted
Those losses don’t disappear. The tax laws allow you to carry them forward.
When you sell the property, you can use those suspended losses to offset the gain from the sale. Once the losses offset the gain, you can potentially use any remaining losses against other income.
Example
Let’s say you sell a warehouse and realize a $100,000 capital gain.
If you’ve accumulated $100,000 of suspended passive losses over the years, those losses may offset the gain entirely.
The result?
You could significantly reduce or eliminate the tax due on the sale.
Before selling any investment property, review Form 8582 with your tax advisor to determine whether you have suspended passive losses available for use.
Strategy #2: Take Advantage of the Section 121 Exclusion
The Section 121 exclusion is one of the most powerful strategies available to investors.
If you owned and lived in a property as your primary residence for at least two of the previous five years, you may qualify to exclude:
- Up to $250,000 of gain if single filer
- Up to $500,000 of gain if married filing jointly
Example
Suppose you purchased a home for $300,000 and later sold it for $500,000.
Your gain is $200,000.
If you meet the ownership and use requirements, you may exclude the entire gain from federal capital gains tax.
Where Investors Get Creative
Many investors move out of a primary residence and convert it into a rental property.
Because the rule looks at whether you lived in the property for two of the last five years, you may have a window where you can rent the property and still qualify for the exclusion.
In some situations, investors combine a Section 121 exclusion with a 1031 exchange strategy to create substantial tax savings.
This strategy requires careful planning, but the potential benefits can be enormous.

Strategy #3: Use a 1031 Exchange
When people ask how to avoid capital gains tax when selling real estate, the 1031 exchange is usually the first strategy that comes to mind.
A 1031 exchange allows you to sell an asset and reinvest the proceeds into replacement real estate without immediately recognizing the gain.
The replacement property must generally be:
- Investment property
- Equal or greater value
- Acquired according to IRS timelines and rules
The biggest advantage?
A properly structured 1031 exchange can defer:
- Capital gains taxes
- Depreciation recapture taxes
Example
You sell an apartment building for $2.5 million.
Instead of paying taxes immediately, you reinvest the proceeds into:
- Single-family rentals
- Commercial property
- Land
- Multiple replacement properties
As long as the transaction meets IRS requirements, you can defer the tax liability and continue growing your portfolio.
Strategy #4: Use Cost Segregation and Bonus Depreciation
Many investors think cost segregation only helps while they own property.
In reality, it can also help reduce taxes when selling real estate.
Cost segregation breaks a property into components with shorter depreciation lives, such as:
- Flooring
- Appliances
- Landscaping
- Fencing
- Driveways
- Certain electrical and plumbing systems
This creates larger depreciation tax deductions upfront.
Those deductions often generate passive losses.
And passive losses can offset passive gains.
Example
Let’s say you sell a rental property and generate a $500,000 capital gain.
You also own another property that qualifies for a cost segregation study.
The study results in significant passive losses through accelerated depreciation.
That passive loss may offset some or all of the gain from the property sale.
I often call this the “lazy man’s 1031 exchange” because it can help investors who missed the opportunity to complete a traditional exchange.
Strategy #5: Structure an Installment Sale
Not every buyer can pay cash.
That can create an opportunity.
An installment sale occurs when you receive payments over multiple tax years instead of collecting the entire purchase price at closing.
Instead of recognizing all the gain in one year, you recognize portions of the gain as you receive payments.
Why Does This Matter?
Spreading income over several years may keep you in a lower bracket.
Some retirees and lower-income taxpayers can significantly reduce—or even eliminate—their long-term capital gains taxes depending on their overall income.
Example
Instead of receiving $500,000 today, you agree to receive $50,000 annually over ten years.
This spreads the gain across multiple tax years, potentially reducing the total tax burden.
You’ll also earn interest on the note, creating an additional income stream.
Frequently Asked Questions
Can a 1031 exchange eliminate capital gains tax completely?
A 1031 exchange generally defers taxes rather than eliminates them. However, continued exchanges can postpone taxes for many years while allowing investors to grow their portfolios.
Do suspended passive losses expire?
No. Suspended passive losses generally carry forward until you either use them against passive income or release them through a qualifying disposition of the property.
Can I use both a Section 121 exclusion and a 1031 exchange?
In some situations, yes. Investors sometimes combine these strategies when converting a former primary residence into a rental property, but the rules are complex and require careful planning.
Can I avoid capital gains taxes on real estate held in a retirement account?
Real estate held inside certain retirement accounts may already receive favorable tax treatment. For example, you can receive qualified distributions from a Roth IRA or Roth Solo 401(k) tax-free. However, strategies such as 1031 exchanges, passive loss deductions, and depreciation rules often work differently inside retirement accounts. Always review your options before selling retirement-owned real estate to maximize available tax benefits.
Can these strategies still help if I have a short-term capital gain?
Possibly. If you own a property for one year or less before selling it, the IRS generally taxes the profit as a short-term capital gain at your ordinary income tax rate rather than the lower long-term capital gains rates.
However, some of the strategies discussed here may still help reduce your tax liability. For example, suspended passive losses, cost segregation, and bonus depreciation may offset certain gains, while an installment sale can spread income over multiple years in the right situation.
Other strategies, such as the Section 121 exclusion, depend on meeting specific ownership and use requirements.
Because the rules vary, it’s important to evaluate your options before selling rather than after closing.
What Could the Right Tax Strategy Mean for Your Portfolio?
The bottom line is that the difference between paying taxes and planning for taxes can be hundreds of thousands of dollars.
I’ve seen investors sell properties and immediately hand over a significant portion of their profits to the IRS simply because they didn’t evaluate their options beforehand. I’ve also seen investors use strategies like passive loss releases, 1031 exchanges, cost segregation studies, and installment sales to preserve far more of their wealth.
The key is understanding which strategy fits your situation before the property sells.
If you’re considering selling investment real estate, schedule a free 45-minute Strategy Session with an Anderson Advisor. We’ll review your portfolio, identify opportunities to reduce or defer taxes, and help you create a plan designed to keep more of your hard-earned profits working for you.
The best time to plan for capital gains taxes is before you sign the closing documents.



