Skip to content
LandlordTested
Menu

Capital Gains Tax Calculator on Sale of Rental Property

When you sell a rental, your gain is taxed in two parts: the depreciation you took at up to 25%, and the rest at long-term capital gains rates of 0%, 15% or 20%, plus 3.8% net investment income tax for higher earners. Enter your sale and purchase figures, depreciation, holding period and filing status, and this calculator estimates the federal tax. Your bookkeeping for rental properties has the numbers.

FreeNo sign-upResults share by link

Your result

Calculating…

Embed this calculator on your site

Free to use. Paste this where you want the calculator to appear; please keep the credit link.

Need another number? Browse all our free calculators for landlords.

On this page
  1. How to use the capital gains calculator
  2. The formulas
  3. A worked example
  4. What a good result looks like
  5. Limits and caveats

How to use the capital gains calculator

Enter:

  • Sale price.
  • Purchase price, including the closing costs that were added to your basis when you bought.
  • Improvements: additions and replacements that were added to basis, such as a roof, HVAC or a remodel. Not routine repairs.
  • Selling costs: agent commission, title, transfer taxes and other closing costs you paid as the seller.
  • Depreciation taken, from your tax returns or depreciation schedule.
  • Holding period: more than one year means long-term rates.
  • Filing status and income bracket, so the tool can pick a capital gains rate and check the net investment income tax.

The calculator estimates your federal tax and shows the depreciation recapture part separately.

The formulas

  • Adjusted basis = purchase price + improvements - depreciation taken
  • Amount realized = sale price - selling costs
  • Total gain = amount realized - adjusted basis
  • Recapture portion (unrecaptured section 1250 gain) = the smaller of depreciation taken or total gain, taxed at up to 25%
  • Capital gain portion = total gain - recapture portion, taxed at 0%, 15% or 20% if held more than a year
  • Net investment income tax = 3.8% x the smaller of your net investment income or the amount your modified AGI is over the threshold

If you held the property one year or less, the whole gain is short-term and taxed at ordinary income rates.

A worked example

A married couple filing jointly bought a rental for $280,000, put $30,000 into improvements, and took $70,000 of depreciation over 10 years. They sell for $450,000 and pay $27,000 in selling costs. Their other income is $120,000.

  • Adjusted basis: $280,000 + $30,000 - $70,000 = $240,000
  • Amount realized: $450,000 - $27,000 = $423,000
  • Total gain: $183,000
  • Recapture portion: $70,000 x 25% = up to $17,500
  • Capital gain portion: $113,000 x 15% = $16,950
  • Modified AGI: $120,000 + $183,000 = $303,000, which is $53,000 over the $250,000 threshold
  • Net investment income tax: $53,000 x 3.8% = $2,014

Estimated federal tax: about $36,464, or roughly 20% of the gain. State tax is extra.

What a good result looks like

The tax is what it is; the goal is to make sure the number isn’t higher than it needs to be. Check that every improvement and selling cost is counted, since each $10,000 you find lowers the gain by $10,000. If you have suspended passive losses from past years, they’re generally released when you sell the whole property to an unrelated buyer, which can offset part of the gain.

If the estimate is large and you plan to keep investing, compare it with the cost of a 1031 exchange. If you plan to stop investing, think about timing the sale for a year when your other income is lower.

Limits and caveats

  • Brackets change each year. The income thresholds for the 0%, 15% and 20% rates are adjusted for inflation annually. The net investment income tax thresholds of $200,000 single and $250,000 joint are fixed in the law.
  • The 25% is a cap. If your ordinary bracket is lower, part of the recapture is taxed at that lower rate.
  • State taxes aren’t included, and some states tax capital gains as ordinary income.
  • Mixed-use properties, such as a home you lived in and then rented, need a closer look at the home-sale exclusion.
  • This is a planning estimate, not tax advice. Have a tax professional review the sale before you close.

Questions landlords ask

The questions we get most, each answered in a paragraph.

How much capital gains tax will I pay on the sale of a rental property?

It depends on the size of your gain, how much depreciation you took, how long you held the property and your income. Held more than a year, the depreciation portion is taxed at up to 25% and the rest at 0%, 15% or 20%, with a possible 3.8% net investment income tax on top. State income tax usually applies too.

Is the home-sale exclusion available on a rental property?

Only if you lived in it as your main home for at least two of the five years before the sale. Then you may exclude up to $250,000 of gain, or $500,000 for most joint filers, though the exclusion can be reduced if the home was a rental after 2008 before you moved in, and depreciation taken after May 6, 1997 is still taxed. A property that was always a rental doesn't qualify.

How can I reduce capital gains tax on a rental property?

Track every improvement and selling cost, because both reduce your gain. Hold for more than a year to get long-term rates. Consider a 1031 exchange to defer the tax into another investment property, or an installment sale to spread the gain over several years. Selling in a lower-income year can also lower the rate.

Do I pay tax on depreciation I didn't claim?

Yes. The IRS taxes depreciation that was allowed or allowable, so your basis is reduced as if you'd claimed it even if you didn't. If you missed depreciation in past years, ask a tax professional about claiming it with a change in accounting method before you sell.