How the gain is calculated
The taxable gain is the amount realized minus the adjusted basis.[4]
- Amount realized: the sale price less selling expenses such as commissions.[4]
- Adjusted basis: what you paid, increased by improvements that add value and decreased by depreciation.[5] Use the depreciation allowed or allowable: basis goes down by the depreciation you could have claimed even if you did not.
| Line | Amount |
|---|---|
| Sale price | $525,000 |
| Less selling costs | ($31,500) |
| Amount realized | $493,500 |
| Cost + improvements − depreciation | $330,000 + $25,000 − $72,000 |
| Adjusted basis | $283,000 |
| Gain | $210,500 |
| Unrecaptured §1250 portion (= depreciation) | $72,000 |
| Remaining long-term capital gain | $138,500 |
Three federal taxes on a rental sale
A long-term gain on a rental is taxed in up to three layers.[1]
- Unrecaptured section 1250 gain. The part of the gain that comes from depreciation is taxed at a maximum rate of 25%.[1] This calculator taxes it at your ordinary bracket or 25%, whichever is lower.
- Long-term capital gain. The rest of the gain on property held more than one year is taxed at 0%, 15% or 20%, depending on your taxable income. Gains on property held one year or less are short-term and taxed as ordinary income.[1]
- Net investment income tax. A 3.8% tax on the smaller of your net investment income, which includes rental income and capital gains, or the amount by which modified AGI exceeds the threshold.[6]
| Filing status | 2026: 0% up to | 2026: 20% above | 2027: 0% up to | 2027: 20% above | NIIT threshold |
|---|---|---|---|---|---|
| Single | $49,450 | $545,500 | $51,050 | $563,200 | $200,000 |
| Married filing jointly | $98,900 | $613,700 | $102,100 | $633,600 | $250,000 |
| Married filing separately | $49,450 | $306,850 | $51,050 | $316,800 | $125,000 |
| Head of household | $66,200 | $579,600 | $68,350 | $598,400 | $200,000 |
Between the two thresholds the rate is 15%. The 2026 figures are from Rev. Proc. 2025-32;[2] the 2027 figures, for sales that close in 2027, are from Rev. Proc. 2026-35, released November 5, 2026.[3] Choose the tax year in the worksheet. The NIIT thresholds are as listed by the IRS.[6]
Rules that change the answer
- The home-sale exclusion does not cover a rental. The $250,000 / $500,000 exclusion applies only to a principal residence you owned and lived in for 2 of the last 5 years, and even then it never covers the gain equal to depreciation taken after May 6, 1997.[7]
- A 1031 exchange can defer the tax. Exchanging the rental for other real property held for investment can postpone the gain. The replacement must be identified within 45 days and received within 180 days (or by your return's due date, if earlier), and the exchange is reported on Form 8824.[8][9]
- Suspended passive losses are released. Rental losses you could not deduct in earlier years are generally allowed in full in the year you sell your entire interest to an unrelated person in a fully taxable sale.[10] They can reduce the tax shown here.
- Depreciation you skipped still counts. Basis is reduced by depreciation allowable, so not claiming it does not avoid the 25% layer.[5] Residential rental buildings are depreciated over 27.5 years; the depreciation calculator shows the schedule.[11]
An estimate, not tax adviceThe calculator treats your ordinary bracket as flat across the depreciation portion, uses taxable income plus the gain in place of modified AGI, ignores other investment income and credits, and applies one flat state rate. Use it to see the size and structure of the tax, then confirm with a tax professional before you sell.
Planning with the result
The "cash after loan and tax" figure is what is left from the sale once the mortgage is paid off and the tax is set aside. To compare selling with keeping the property, run the investment property calculator with your holding period, and the rental income calculator for the yearly taxable income while you own it. The rental property calculator shows the current cash flow you would give up.
Frequently asked questions
How much tax do you pay when you sell a rental property?
It depends on the gain and your income. The depreciation part of the gain is taxed at up to 25%, the rest at 0%, 15% or 20% if you owned it more than a year, plus 3.8% NIIT above the income thresholds and any state tax.
What is depreciation recapture on a rental property?
For a residential rental, the gain equal to the depreciation taken is "unrecaptured section 1250 gain", taxed at a maximum 25% rate instead of the regular capital gains rates.
Can I avoid capital gains tax on a rental property?
A 1031 like-kind exchange can defer it if you buy other investment real property within the deadlines. The home-sale exclusion applies only to a principal residence and never covers depreciation taken after May 6, 1997.
What are the capital gains tax brackets for 2027?
For married couples filing jointly, long-term gains are taxed at 0% up to $102,100 of taxable income, 15% up to $633,600 and 20% above that. For single filers the thresholds are $51,050 and $563,200.
Do selling costs reduce the taxable gain?
Yes. Commissions and other selling expenses reduce the amount realized, which reduces the gain.
Sources
- Topic no. 409, Capital gains and losses
- Rev. Proc. 2025-32 (2026 inflation adjustments), section .03 Maximum Capital Gains Rate
- Rev. Proc. 2026-35 (2027 inflation adjustments), section .03 Maximum Capital Gains Rate
- Publication 544 (2025), Sales and Other Dispositions of Assets
- Topic no. 703, Basis of assets
- Net Investment Income Tax
- Publication 523 (2025), Selling Your Home
- Like-kind exchanges – Real estate tax tips
- Instructions for Form 8824, Like-Kind Exchanges
- Publication 925 (2025), Passive Activity and At-Risk Rules
- Publication 527 (2025), Residential Rental Property