Skip to main content

Capital gains tax on rental property calculator

Estimate the tax when you sell a rental property. Enter what you paid, your improvements, the depreciation you have taken, the sale and how long you owned it, with your own tax rates. The results show the gain, the tax on depreciation recapture and on the rest of the gain, and the cash left after the loan and the tax.

What you paid, including closing costs you added to the property's basis.

A new roof, an addition or a kitchen remodel. Leave out repairs you deducted.

The total from your depreciation schedule or past returns.

Agent commission, transfer taxes and closing costs you pay to sell.

How long you owned it

Your federal tax bracket. Recapture is taxed at this rate up to 25%.

0%, 15% or 20% at the federal level, depending on your taxable income.

Net investment income tax (3.8%)

It applies above certain incomes. Ask your tax professional whether it applies to you.

Leave at 0 to see federal tax alone.

The loan balance the sale pays off, for the cash you keep.

Your results

Estimate

Estimated tax on the sale: $31,050.00

Gain on the sale and the tax on itGain of $171,000: sale price $400,000, less selling costs $24,000 and an adjusted basis of $205,000. Estimated tax of $31,050 leaves $139,950 of the gain after tax, and $224,950 of cash after the loan and the tax.$400kSale-$24kSelling-$205kBasis$171kGain-$31kTax$140kAfter tax
Total gain on the sale
$171,000.00
Adjusted basis
$205,000.00
Gain from depreciation (recapture)
$60,000.00
Tax on the recapture
$14,400.00
Rest of the gain
$111,000.00
Tax on the rest of the gain
$16,650.00
Net investment income tax
$0.00
State tax
$0.00
Tax as a share of the gain
18.16%
Cash after the loan and tax
$224,950.00
  • An estimate for planning. It applies the rates you enter, and leaves out 1031 exchanges, installment sales, the home sale exclusion and suspended losses. It is general information and is not tax advice. Check the numbers with a tax professional before you sell.

Results are estimates for planning only. They are not legal, tax or investment advice, and they apply no state or local rules. Check your lease, your local laws and a qualified professional before you rely on a number.

How capital gains tax on a rental is calculated

Gain = (sale price - selling costs) - (cost + improvements - depreciation); tax = recapture x ordinary rate (up to 25%) + rest of the gain x capital gains rate

The adjusted basis is what you paid, including purchase costs, plus improvements, less the depreciation taken. The gain is the sale price less selling costs, less the adjusted basis. With $250,000 of cost, $15,000 of improvements and $60,000 of depreciation, the adjusted basis is $205,000.

For a rental held more than a year, the part of the gain up to the depreciation taken is depreciation recapture, which the IRS calls unrecaptured section 1250 gain. It is taxed at your ordinary income tax rate, at most 25%. The rest of the gain is a long-term capital gain. At the federal level, long-term gains are taxed at 0%, 15% or 20% depending on your taxable income, and the IRS publishes the income thresholds each year. For a rental held a year or less, the whole gain is a short-term gain, taxed at your ordinary rate.

Two more taxes can apply. The federal net investment income tax adds 3.8% for people with income above certain levels; the calculator applies it to the whole gain when you add it, which can overstate it when your income is near the threshold. Many states tax the gain too, so enter your state's rate if yours does.

The rates in the example are examples only. This calculator leaves out 1031 exchanges, installment sales, the home sale exclusion for a former residence and losses carried forward from earlier years. It is general information and is not tax advice, so check the numbers with a tax professional before you sell.

Worked example

You bought a rental for $250,000 including purchase costs, added $15,000 of improvements and took $60,000 of depreciation over the years you owned it, more than a year. You sell it for $400,000, pay $24,000 to sell and pay off a $120,000 mortgage at closing. As an example, your ordinary rate is 24% and your long-term capital gains rate is 15%; the net investment income tax and state tax are left out.

  1. Adjusted basis: $250,000 + $15,000 - $60,000 = $205,000.
  2. Amount realized: $400,000 - $24,000 = $376,000.
  3. Total gain: $376,000 - $205,000 = $171,000.
  4. Depreciation recapture: the gain up to the $60,000 of depreciation, so $60,000, taxed at 24%: $14,400.
  5. Rest of the gain: $171,000 - $60,000 = $111,000, taxed at 15%: $16,650.
  6. Estimated tax: $14,400 + $16,650 = $31,050, or $31,050 / $171,000 = 18.16% of the gain.
  7. Cash after the loan and tax: $376,000 - $120,000 - $31,050 = $224,950.

The estimated tax on the sale is $31,050.00, 18.16% of a $171,000.00 gain, and you keep $224,950.00 after paying off the loan and the tax.

Frequently asked questions

How is capital gains tax on a rental property calculated?

Work out the adjusted basis (cost plus improvements, less depreciation) and subtract it from the sale price less selling costs. For a rental held more than a year, the gain up to the depreciation taken is taxed at your ordinary rate up to 25%, and the rest at your long-term capital gains rate. In the example, a $171,000 gain comes to an estimated $31,050 of federal tax.

What is the capital gains tax rate on a rental property?

At the federal level, a long-term gain is taxed at 0%, 15% or 20% depending on your taxable income, and the depreciation part at your ordinary rate up to 25%. The net investment income tax of 3.8% can apply above certain incomes, and many states add their own tax. A tax professional can tell you which rates apply to you.

What if I sell a rental I owned for a year or less?

The whole gain is a short-term gain, taxed at your ordinary income tax rate. In the example, the $171,000 gain at a 24% rate would be $41,040 of tax, against $31,050 for a property held more than a year. Choose "A year or less" to see it.

Does the net investment income tax apply to a rental sale?

It can. It adds 3.8% on investment income, including the gain on a rental, for people with income above certain levels. Added to the example, it is $171,000 x 3.8% = $6,498. Ask a tax professional whether it applies to you.

Can I avoid capital gains tax on a rental property?

A like-kind exchange under section 1031 can defer the tax when you sell one investment property and buy another under the exchange rules, and the 1031 exchange calculator estimates what it defers. Selling at a loss means no gain to tax. The rules are strict, so plan with a tax professional before you sell.

Keep the records your tax professional will ask for

KeyRing keeps each property's income and expenses with categories you can edit, stores closing statements and receipts with the property they belong to, and exports your transactions to Excel when your tax professional asks for them. Your first subscription starts with a 14-day free trial.

Try KeyRing free