Maximize returns.

Get Started For Free

How to Avoid Capital Gains Tax When Selling a Rental Property

woman looking at spreadsheets
by Jeff Rohde, posted in Investment Strategy

The longer you hold a rental property the more potential profit you stand to make. Unfortunately, when the time comes to sell, you could be facing a pretty significant tax bill that will take a big bite out of your profits.

While most people don’t mind paying their fair share, there’s no reason to pay more in taxes than is absolutely necessary. In this article, we’ll explain how taxes on capital gains work, and how to avoid paying capital gains tax on rental property.

Simplify your rental property reporting

Learn More


How Taxes on a Rental Property Sale Work

There are a number of variables that affect tax paid on a rental property. Let’s begin with some basic terminology first:

Cost Basis

Cost basis is the original amount paid for a rental property, plus costs that must be capitalized such as real estate commissions paid and escrow and closing settlement costs.

Adjusted Cost Basis

Adjusted basis is the reduction in the original costs basis due to tax deductions such as depreciation expense and money received for granting an easement to your next-door neighbor.


Depreciation is a non-cash expense used to reduce your taxable net income. The IRS assumes residential rental property lasts for 27.5 years, which means the building (excluding the land) loses 3.636% of its value each year.

Depreciation Recapture

Depreciation recapture occurs when a property is sold and the IRS taxes the real estate investor for the depreciation expense taken during the property holding period. Depreciation recapture is treated as normal income and taxed up to a maximum of 25%.

Rental property finances made easy.

Learn More

Long-Term Capital Gains Taxes

Long-term capital gain is created when an asset such as investment real estate is sold after being held for more than one year. Tax on a long-term capital gain in 2021 is 0%, 15%, or 20% based on the investor’s taxable income and filing status, excluding any state or local taxes on capital gains.

Learn more about the capital gains tax rates for 2023 from Kiplinger.

Short-Term Capital Gain

Short-term capital gain is created when an asset is sold after being held for one year or less. Tax on a short-term capital gain is assessed based on the investor’s taxable income and filing status, and ranges from 10% to 37% in 2022, excluding any state or local taxes on short-term capital gains.

Learn more about the 2023 tax brackets from the Tax Foundation.


Example of Capital Gains Tax on Rental Property

Now let’s review a hypothetical example of capital gain and depreciation recapture tax on the sale of a rental property. We’ll make the following assumptions:

  • Property purchase price = $150,000 = Cost basis
  • Land value = $15,000
  • Holding period = 5 years
  • Sale price = $200,000
  • Seller total annual income = $225,000
  • Seller tax bracket = 24% married filing joint returns
  • Seller capital gain tax rate = 15%

Based on this information, we can calculate the amount of depreciation recapture and the amount of taxable capital gains:

Depreciation Recapture Calculation

Over the five year holding period the investor has claimed $24,545 in depreciation expense to reduce taxable net income. When the property is sold, the depreciation expense is recaptured by the IRS and taxed as normal income to the investor, at a maximum rate of 25%:

  • $150,000 purchase price – $15,000 land value = $135,000 amount subject to depreciation 
  • $135,000 / 27.5 years = $4,909 annual depreciation expense
  • $4,909 x 5 year holding period = $24,545 total depreciation expense
  • $24,545 x 24% income tax on depreciation recapture = $5,891 depreciation recapture tax

Capital Gains Tax Calculation

Capital gains tax is paid on the remaining profit after adjusting the cost basis for depreciation recapture:

  • Adjusted cost basis = $150,000 cost basis – $24,545 depreciation expense = $125,455
  • $200,000 sale price – $125,455 adjusted cost basis = $74,545 capital gain
  • $74,545 capital gain – $24,545 depreciation recapture = $50,000 long-term capital gain
  • $50,000 x 15% capital gain tax rate = $7,500 capital gains tax

Tax Liability

The seller’s tax liability for selling the rental property is $13,391:

  • Depreciation recapture tax = $5,891
  • Capital gains tax = $7,500
  • Total tax liability = $13,391

Note that the total tax liability for selling the rental property doesn’t include any state or local capital gains taxes. 

For example, if the seller lived in California the state would tax his capital gains as regular income, according to Forbes. The seller could also be liable for Net Investment Income Tax (NIIT) if the Net Investment Income and modified adjusted gross income are over a certain threshold, according to the IRS.

You can also read more about 2023 tax information by visiting the Stessa Tax Center and learn how to prepare taxes in three simple steps with Stessa with your personalized Stessa Tax Package.


How to Reduce or Avoid Capital Gains Tax

Selling a rental property can generate healthy profits, but also a significant tax bill. The good news is that there are several ways for rental property owners to reduce or avoid paying tax when a rental property is sold:

Tax Harvesting

Maybe you purchased shares in an IPO that didn’t turn out quite the way you planned. While it’s true that you could always hang onto your investment with the hope that it will recover, the problem is that if the shares are down 50% they need to double in value just for you to break even. 

By selling the stock at a loss, you can use tax loss harvesting to help offset the taxable gain from the sale of your rental property.

Seller Carryback

Many buy-and-hold real estate investors use their free cash flow to pay down the debt on their rental property as quickly as possible. If you own your rental property free-and-clear, or have a very small mortgage balance, a seller carryback is another way to reduce your capital gains tax. 

By offering the seller financing, you only pay capital gains tax on a portion of the monthly payment you receive from the seller. Plus, you’ll be able to generate additional interest income. The drawback is that you won’t have the cash from your rental property to reinvest.

Primary Residence

Another option for reducing the capital gains tax when you sell a rental property is to turn the house into your primary residence before you sell. Once every two years, you can sell your primary residence and be exempt from paying tax on $250,000 in capital gains if you are single or $500,000 if you are married.

However, this strategy to minimize the tax on capital gains requires a lot of advanced planning, because you have to live in it for at least two years before you sell it as your primary residence. Also, remote real estate investors may not want to relocate when they can do a 1031 tax-deferred exchange instead.

1031 Exchange

Section 1031 of the Internal Revenue Code allows real estate investors who sell one investment property and purchase another ‘like-kind’ property to defer paying tax on capital gains and depreciation recapture on the property sold. 

Conducting a 1031 exchange is a good strategy to use if you want to keep investing in real estate by reinvesting the proceeds of one property into one or more replacement properties. 

There are some rules you’ll need to follow when doing a 1031 tax-deferred exchange:

  • Property must be like-kind real estate held for business or investment purposes.
  • Like-kind doesn’t mean “same kind”. 
  • For example, you could exchange a multifamily property for three single-family homes in different parts of the country.
  • Potential replacement property (property being purchased) must be identified in writing within 45 days of the closing of the sale of the relinquished property (property being sold).
  • Replacement property must close escrow within 180 days of the closing of the sale of the relinquished property.
  • Investors can’t take possession or ‘touch’ the proceeds from the sale of the relinquished property. Instead, all funds must flow through a Qualified Intermediary that you select. 


Will The Capital Gains Tax Law Change?

There was quite a bit of concern last year that the capital gains tax law would change in 2023. As reported last December, the threat of capital gains taxes increasing fueled an end-of-the-year rush by investors to sell properties to avoid the risk of capital gains being taxed at a higher rate.

However, real estate investors can breathe a sigh of relief. For now, it appears capital gains law will not change.

The $4.5 trillion American Jobs Plan and the American Family Plan originally proposed by the Biden Administration would have been paid for in large part by tax increases, including a significant change to the existing capital gains tax rate.

Currently, the maximum tax paid for long-term capital gains is 20% for people earning over $501,600 (married filing jointly). If the proposal had become law, the top capital gain tax would have been increased to 39.6% for households with over $1 million in reported income.

Back in November, the House passed the $1.7 trillion “Build Back Better Act,” a scaled-down version of the original Plan proposed by Biden. Several tax provisions, including increasing the top capital gains tax rate to 25%, were eliminated from the Act. The Senate is expected to vote on the Act early this year, and any modifications made to the original legislation will require a return to the House for a final vote.


Final Thoughts

There are many advantages to owning rental property, including a recurring stream of passive income, potential appreciation in property value over the long term, and tax benefits such as deducting operating expenses, mortgage interest, and depreciation. 

When the time comes to sell, the IRS wants what it sees as its fair share of your profits by collecting tax on depreciation recapture and capital gains. Fortunately, there are several ways real estate investors can reduce and defer paying capital gains tax. 

To get started, check out the smart rental property software from Stessa that makes owning a rental property and preparing for taxes a breeze.

Find this content useful? Share it with your friends!