Capital Gains Tax on Rental Property Calculator

Selling a rental? Estimate the full tax bill — depreciation recapture, capital gains, state tax, and the 3.8% NIIT — plus your after-tax proceeds.

Your Numbers

Estimated Tax on Sale

Adjusted basis
Total gain
Depreciation recapture tax (25%)
Capital gains tax
State tax
Net investment income tax
Total tax due
After-tax proceeds

After-tax proceeds are before any mortgage payoff. Estimate only. Not tax advice.

How capital gains tax works when you sell a rental

Selling a rental property at a profit triggers two taxes, not one. First, the depreciation you deducted over the years is "recaptured" — the portion of your gain equal to that depreciation is taxed as unrecaptured Section 1250 gain at a maximum rate of 25%. Second, any remaining profit is a long-term capital gain, taxed at 0%, 15%, or 20% depending on your income. High earners may also owe the 3.8% Net Investment Income Tax, and most states tax the gain as well.

The math runs in these steps:

  1. Net sale price = sale price − selling costs.
  2. Adjusted basis = purchase price − total depreciation claimed.
  3. Total gain = net sale price − adjusted basis.
  4. Split it: the amount up to your depreciation is recaptured at 25%; the rest is a capital gain at your rate. Add state tax and (if applicable) the 3.8% NIIT.

Worked example

You bought a rental for $300,000, claimed $50,000 in depreciation, and sell for $400,000 with $24,000 in selling costs, a 15% capital gains rate, and no state tax or NIIT. Net sale price is $376,000; adjusted basis is $250,000; total gain is $126,000. The first $50,000 is recaptured at 25% = $12,500; the remaining $76,000 is taxed at 15% = $11,400. Total tax ≈ $23,900, leaving after-tax proceeds of about $352,100 before any mortgage payoff.

How to reduce or defer it

The most common move is a 1031 exchange, which defers both the recapture and the capital gains tax if you reinvest into another investment property. You can also time the sale into a lower-income year, offset with losses, or — for heirs — rely on a step-up in basis. See how to avoid depreciation recapture for the full list, and the depreciation recapture calculator to isolate that piece.

Frequently asked questions

How is capital gains tax calculated on a rental sale?

Sale price minus selling costs minus adjusted basis (purchase price − depreciation) = gain. The depreciation portion is taxed up to 25%; the rest at your 0/15/20% capital gains rate, plus state tax and possibly the 3.8% NIIT.

Do I pay both recapture and capital gains?

Yes — selling a rental at a gain triggers both. This calculator separates and totals them.

How do I avoid capital gains on a rental?

A 1031 exchange defers both taxes if you reinvest into another investment property within the IRS deadlines.

Related calculators