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 taxable income. High earners may also owe the 3.8% Net Investment Income Tax (NIIT), and most states tax the gain as ordinary income on top. The calculator above handles all four layers at once; the sections below show the rules behind the numbers.
The math runs in four steps:
- Net sale price = sale price − selling costs (agent commissions, title, transfer taxes, legal fees). See how selling costs reduce capital gains.
- Adjusted basis = purchase price + capital improvements − total depreciation claimed (or that you were allowed to claim — the IRS reduces basis either way).
- Total gain = net sale price − adjusted basis.
- Split it: the amount up to your accumulated depreciation is recaptured at up to 25%; the remainder is a long-term capital gain at your 0/15/20% rate. Add state tax and, if applicable, the 3.8% NIIT.
2026 long-term capital gains tax rates
Your rate on the capital-gain portion (property held more than one year) depends on your total taxable income and filing status. For the 2026 tax year:
| Rate | Single | Married filing jointly | Head of household |
|---|---|---|---|
| 0% | Up to $49,450 | Up to $98,900 | Up to $66,200 |
| 15% | $49,451 – $545,500 | $98,901 – $613,700 | $66,201 – $579,600 |
| 20% | Over $545,500 | Over $613,700 | Over $579,600 |
Property held one year or less is a short-term gain, taxed at your ordinary income rate instead — usually much higher. See short-term vs long-term capital gains and the full breakdown in capital gains tax rates on real estate.
Worked examples
Example 1 — typical sale, 15% bracket. You bought a rental for $300,000, claimed $50,000 in depreciation, and sell for $400,000 with $24,000 in selling costs, 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.
Example 2 — high earner with NIIT and state tax. Same sale, but you're a single filer with income over $545,500 (20% bracket) in a state with a 5% rate, and your income exceeds the $200,000 NIIT threshold. Recapture is still $12,500. The $76,000 gain is taxed at 20% ($15,200) + 5% state ($6,300 on the full $126,000 gain, as most states don't honor the federal recapture rate) + 3.8% NIIT on the $126,000 ($4,788). The tax bill climbs to roughly $38,800. The jump from Example 1 shows why NIIT on depreciation recapture matters for high earners.
Example 3 — 0% bracket. A retired couple filing jointly with $80,000 taxable income sells a long-held rental with $30,000 of depreciation and a $40,000 capital gain. The $30,000 recapture is still taxed (up to 25%), but the $40,000 capital-gain portion may fall entirely in the 0% bracket — a reminder that recapture is never 0%, even when your capital gains rate is.
How to reduce or defer the tax
- 1031 exchange. Reinvest the proceeds into another investment property and defer both the recapture and the capital gains tax. Walk through a full 1031 exchange example, weigh the disadvantages of a 1031 exchange, or model it in the 1031 exchange calculator.
- Installment sale. Spreading the sale price over several years can keep you in a lower capital gains bracket, though most depreciation recapture is still taxed up front.
- Offset with losses. Capital losses and net operating losses can absorb part of the gain — see tax-loss harvesting for real estate and whether losses offset recapture.
- Opportunity Zones. Rolling the gain into a Qualified Opportunity Fund defers and can partly eliminate it — see Opportunity Zone tax benefits.
- Time the sale into a lower-income year to drop from the 20% to the 15% (or even 0%) bracket.
- Step-up at death. Heirs inherit the property at its fair market value, erasing the built-in gain — see step-up in basis on a rental.
Common mistakes
- Forgetting recapture. Many sellers budget only for capital gains tax and are surprised by the 25% recapture bill — see depreciation recapture vs capital gains.
- "I didn't claim depreciation, so I owe no recapture." The IRS recaptures depreciation you were allowed to take, whether you claimed it or not.
- Omitting capital improvements from basis. A new roof or renovation raises your basis and lowers the gain — keep those receipts.
- Assuming the primary-residence exclusion wipes it out. Converting a rental to your home gives only a partial Section 121 exclusion, and recapture is never excluded.
Frequently asked questions
How is capital gains tax calculated on a rental sale?
Sale price minus selling costs minus adjusted basis (purchase price + improvements − depreciation) = total gain. The depreciation portion is taxed up to 25%; the rest at your 0/15/20% long-term 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. The calculator separates and totals them. Read more in capital gains and depreciation recapture when selling.
What is the capital gains tax rate on rental property in 2026?
The long-term rate is 0%, 15%, or 20% based on taxable income (see the table above), while the depreciation-recapture portion is taxed at up to 25%. High earners add 3.8% NIIT.
Is the gain short-term or long-term?
Held more than one year → long-term (0/15/20%). Held one year or less → short-term, taxed as ordinary income.
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. Opportunity Zones, installment sales, loss offsets, and the step-up at death can also help.
Does my state tax the gain too?
Most states tax the full gain as ordinary income, and few honor the federal 25% recapture cap — enter your state rate above to include it.
Can I use the $250,000/$500,000 home-sale exclusion on a rental?
Only if you convert it to your primary residence and meet the 2-of-5-year test, and even then the exclusion is prorated for the rental period and never covers depreciation recapture.
Related guides & calculators
- Depreciation Recapture Calculator — isolate the recapture piece.
- 1031 Exchange Calculator — defer the whole tax.
- Rental Property Depreciation Calculator — the deductions that get recaptured.
- Depreciation recapture example — a step-by-step walkthrough.
- Capital gains on a second home — how vacation properties differ.
- Recapture on inherited property — what heirs owe.
