← Back to Resources
Tax StrategyMarch 2026·15 min read

How to Avoid Capital Gains Tax on Real Estate

Learn the most effective strategies to legally avoid or defer capital gains tax when selling real estate, from 1031 exchanges and DSTs to installment sales and opportunity zones.

For most real estate investors, capital gains tax is the single largest cost they face when selling a property. Depending on your income, the state you live in, and how long you held the asset, the combined federal and state tax bill can consume 30% to 40% of your profit—or more. That is money that could otherwise be reinvested, compounding your wealth over decades.

The good news is that the U.S. tax code provides several legitimate strategies for reducing, deferring, or even eliminating capital gains tax on real estate. Some strategies delay the tax bill, others reduce it, and a few can remove it entirely under the right circumstances. In this guide, we will walk through the six most effective approaches so you can make an informed decision about which one fits your situation.

What Is Capital Gains Tax on Real Estate?

Capital gains tax is the tax you owe on the profit from selling an asset for more than you paid for it. In real estate, the "gain" is calculated as the difference between your adjusted cost basis (what you originally paid, plus improvements, minus depreciation) and the net sale price after closing costs.

Capital gains tax is triggered when you sell or dispose of an investment property, a second home, or—in some cases—even your primary residence if the gain exceeds certain thresholds. The tax applies to the profit, not the total sale price, but because real estate tends to appreciate significantly over time, the taxable gain can be substantial.

For example, if you purchased a rental property for $300,000 ten years ago, took $80,000 in depreciation deductions, and now sell it for $600,000, your taxable gain could be $380,000 or more. Without proper planning, the resulting tax bill could easily exceed $100,000. That is why understanding your options before you sell is so critical.

Understanding Capital Gains Tax Rates

Before exploring strategies, it helps to understand exactly what you are up against. Capital gains on real estate are taxed at multiple layers, and the total rate is often higher than investors expect.

Short-Term vs. Long-Term Capital Gains

If you held the property for one year or less, any gain is taxed as ordinary income at your marginal tax rate, which can exceed 35% at the federal level depending on current tax law. Properties held for more than one year qualify for the preferential long-term capital gains rates of 0%, 15%, or 20%, depending on your taxable income. Most real estate investors who have held property for several years will fall into the 15% or 20% bracket.

Depreciation Recapture

Even if you never claimed depreciation on your tax returns, the IRS assumes you should have. When you sell, the IRS "recaptures" that depreciation and taxes it at a flat 25% rate. For a property held for many years, depreciation recapture alone can add tens of thousands of dollars to your tax bill.

Net Investment Income Tax (NIIT)

High-income earners face an additional 3.8% Net Investment Income Tax on capital gains if their modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). This surtax applies on top of your regular capital gains rate.

State Capital Gains Tax

State taxes vary widely—from 0% in states like Texas, Florida, and Nevada to over 13% in California. When you add state taxes to the federal layers above, the combined effective rate can easily reach 35% to 40% in high-tax states.

To see exactly how much capital gains tax you might owe on your specific property, try our free capital gains tax calculator. It accounts for federal rates, depreciation recapture, NIIT, and state-level taxes so you can get a realistic estimate before you sell.

Strategy 1: Section 121 Primary Residence Exclusion

The simplest way to avoid capital gains tax on real estate is through the Section 121 exclusion, which applies to the sale of your primary residence. Under this rule, single filers can exclude up to $250,000 in capital gains, and married couples filing jointly can exclude up to $500,000—completely tax-free.

To qualify, you must have owned and used the home as your primary residence for at least two of the five years preceding the sale. The two years do not need to be consecutive, and you can use this exclusion once every two years. For many homeowners, this exclusion eliminates their capital gains tax entirely.

The catch: This exclusion does not apply to investment or rental properties. If you are selling a property that was never your primary residence, you will need one of the strategies below. Some investors attempt to convert a rental property into a primary residence to take advantage of this exclusion, but the IRS has tightened the rules significantly. Any gain attributable to periods of non-qualified use (such as time the property was rented out) after 2008 is not eligible for the exclusion. Consult a tax professional before attempting this approach.

Strategy 2: 1031 Exchange

A 1031 exchange is the most widely used strategy for deferring capital gains tax on investment real estate. Named after Section 1031 of the Internal Revenue Code, this provision allows you to sell one investment property and reinvest the proceeds into another "like-kind" property without triggering an immediate tax event. The gain is deferred until you eventually sell the replacement property without doing another exchange.

The power of a 1031 exchange lies in compounding. By deferring the tax, you keep your full equity working for you in the next property, which can dramatically accelerate wealth building over multiple exchange cycles.

However, 1031 exchanges come with strict rules. You must identify potential replacement properties within 45 days of closing on the sale and complete the purchase within 180 days. All proceeds must be held by a qualified intermediary—you cannot touch the money at any point. The replacement property must be of equal or greater value, and you must reinvest all of the net equity to achieve full tax deferral.

The tight timelines are the biggest challenge. Finding and closing on a suitable replacement property in 180 days—while identifying it within just 45—puts enormous pressure on investors, especially in competitive markets. Many exchanges fail simply because the investor could not find the right property in time.

Strategy 3: 1031 Exchange into a DST (Recommended)

For investors who want the tax deferral benefits of a 1031 exchange without the stress and risk of finding a replacement property under tight deadlines, a Delaware Statutory Trust (DST) offers a compelling solution. A DST is a legal entity that holds title to investment real estate, allowing multiple investors to own fractional interests in institutional-grade properties—such as Class A apartment communities, medical office buildings, industrial distribution centers, and net-leased retail properties.

The IRS has ruled, in Revenue Ruling 2004-86, that DST interests qualify as like-kind replacement property for 1031 exchange purposes. This means you can sell your investment property, direct your qualified intermediary to invest the proceeds into one or more DSTs, and defer your entire capital gains tax bill—just as you would with a traditional 1031 exchange.

What makes DSTs particularly attractive is the combination of benefits they offer. First, they are passive investments. You receive regular income distributions without any of the management headaches of direct property ownership—no tenants, no toilets, no midnight maintenance calls. Second, DSTs are pre-packaged and available for immediate closing, which makes them ideal for meeting the 45-day identification deadline. Many investors use a DST as a backup identification property to protect their exchange, even if they are also pursuing a traditional replacement property.

Third, DSTs allow you to diversify across multiple properties, asset classes, and geographic markets with a single exchange. Instead of concentrating your entire equity in one building, you can spread it across several institutional-quality assets managed by experienced sponsors. This diversification can reduce risk while maintaining steady cash flow.

For investors who are tired of active property management, approaching retirement, or simply looking for a more hands-off way to stay invested in real estate while deferring taxes, a 1031 exchange into a DST is often the ideal strategy. It delivers the tax deferral of a 1031 exchange, the passive income of a professionally managed portfolio, and the diversification benefits that are difficult to achieve with direct property ownership.

Strategy 4: Installment Sales

An installment sale allows you to spread the recognition of your capital gain over multiple tax years by receiving the sale proceeds in scheduled payments rather than a lump sum. Instead of triggering the entire gain in the year of sale, you report only the portion of the gain that corresponds to each payment you receive.

The primary advantage of an installment sale is bracket management. By spreading the gain over several years, you may be able to keep your income in a lower tax bracket each year, reducing the overall effective rate on the gain. This can be especially beneficial for investors whose gain would otherwise push them into the highest capital gains bracket or trigger the 3.8% NIIT.

However, it is important to understand that an installment sale does not defer the tax—it merely spreads it out. You will pay capital gains tax on each installment as you receive it. You also take on credit risk, since the buyer may default on future payments. And unlike a 1031 exchange, you do not get to reinvest your full equity immediately, which means you lose the compounding benefit of having all your capital working for you in a new investment.

Installment sales work best for sellers who do not need the full proceeds immediately and who want to manage their tax bracket from year to year. They are less effective for investors focused on maximizing long-term wealth accumulation through reinvestment.

Strategy 5: Opportunity Zones

The Qualified Opportunity Zone (QOZ) program, created by the Tax Cuts and Jobs Act of 2017, allows investors to invest capital gains into Qualified Opportunity Funds (QOFs) that deploy capital in designated economically distressed areas. To participate, you invest your capital gains into a QOF within 180 days of realizing the gain.

The most powerful remaining benefit of the program is the exclusion of gains on the QOF investment itself. If you hold the Opportunity Zone investment for at least 10 years, any appreciation on the new investment is completely tax-free. This can be extremely valuable if the Opportunity Zone investment performs well over the long term.

Important 2026 update: The original deferral benefit of Opportunity Zones has largely expired. Under the law, the deferred capital gain becomes taxable on the earlier of when you sell the QOF investment or December 31, 2026. For investors in 2026, this means the deferral window is effectively closed—you would defer taxes for only months, not years. Additionally, the bonus basis step-ups (10% after 5 years, 15% after 7 years) required investments made by 2021 and 2019 respectively, so those benefits are no longer available for new investments.

The only meaningful benefit remaining for new QOF investments is the 10-year exclusion on appreciation of the QOF investment itself. This still has significant value if you believe the underlying Opportunity Zone properties will appreciate substantially over a decade-plus holding period. However, because the investments are in emerging or underserved areas, they carry inherently higher risk than institutional-grade properties. For most real estate investors looking to defer capital gains today, a 1031 exchange or DST provides a more reliable and immediate tax benefit than Opportunity Zones.

Strategy 6: Stepped-Up Basis at Death

One of the most powerful—and often overlooked—strategies for eliminating capital gains tax on real estate is simply to hold the property until death. Under current tax law, when an investor passes away, their heirs receive a "stepped-up" cost basis equal to the fair market value of the property at the date of death. This means that all of the unrealized capital gains and depreciation recapture accumulated during the investor's lifetime are effectively wiped out.

For example, if you purchased a property for $200,000 that is worth $1,000,000 at the time of your death, your heirs would inherit it with a cost basis of $1,000,000. If they sell it the next day for $1,000,000, they owe zero capital gains tax. The $800,000 gain simply disappears for income tax purposes.

This strategy pairs exceptionally well with 1031 exchanges. An investor can defer capital gains through a series of 1031 exchanges over their lifetime, continually rolling equity into larger or more diversified properties. Upon death, the stepped-up basis eliminates the deferred gains entirely, meaning the investor never pays capital gains tax on any of those transactions.

This is also one of the reasons DSTs are popular with older investors. By exchanging into a DST, you can defer your gains, collect passive income, and pass the investment to your heirs with a stepped-up basis—effectively eliminating the tax bill while enjoying cash flow during your lifetime. It is worth noting that the stepped-up basis could be subject to legislative changes in the future, so estate planning should be reviewed regularly with a qualified advisor.

Which Strategy Is Right for You?

The right approach depends on your specific situation—your investment goals, timeline, income level, risk tolerance, and whether you want to remain an active property owner or transition to passive income. Here is a quick comparison:

  • Section 121 Exclusion: Best for homeowners selling a primary residence with gains under $250K/$500K.
  • 1031 Exchange: Best for active investors who want to trade up to a larger or better property while deferring taxes.
  • 1031 into a DST: Best for investors seeking tax deferral combined with passive income, diversification, and professional management—especially those nearing retirement or tired of landlord responsibilities.
  • Installment Sale: Best for sellers who want to spread their tax liability across multiple years without reinvesting into new property.
  • Opportunity Zones: Best for risk-tolerant investors with a long time horizon who want tax-free appreciation on new gains.
  • Stepped-Up Basis: Best as a long-term estate planning strategy, particularly when combined with 1031 exchanges or DSTs.

For most real estate investors—especially those who want to defer their tax bill, generate passive income, and reduce the burden of property management—a 1031 exchange into a DST offers the best combination of benefits. It preserves your wealth, keeps your capital fully invested, and positions your estate for a potential stepped-up basis in the future.

That said, every investor's situation is unique. We strongly recommend consulting with a qualified tax advisor or financial professional who can evaluate your specific circumstances and help you choose the strategy that aligns with your goals.

Conclusion

Capital gains tax does not have to erode your real estate wealth. Whether you are selling a primary residence, a rental property, or a commercial asset, there are proven strategies available to legally reduce, defer, or eliminate the tax impact. The key is planning ahead—ideally well before you list the property for sale.

From the Section 121 exclusion to 1031 exchanges, DSTs, installment sales, Opportunity Zones, and stepped-up basis planning, each strategy has its place depending on your goals and circumstances. For investors looking to sell rental property specifically, we have a detailed guide on how to sell rental property without paying taxes that dives deeper into the tactics most relevant to landlords.

Whatever path you choose, the most important step is to start the conversation with a qualified advisor before you sell. The strategies that save the most in taxes are the ones implemented proactively, not reactively.

Ready to learn more?

Schedule a call with our team to discuss how a 1031 exchange into a DST might work for your situation.

Schedule a Call

More Resources

View all articles →
Schedule a Call