Worksheet 15 · Selling

Tax on sale of rental property calculator

Selling a rental is taxed on the gain over its adjusted basis, which is cost plus improvements minus depreciation. In the example, a $525,000 sale produces a $210,500 gain and about $40,434 of federal tax: the depreciation part at up to 25%, the rest at 2026 capital gains rates, plus the 3.8% NIIT.

Cap Rate Calculator editorial teamUpdated 11 sources

Worksheet 15

Estimated tax on selling a rental

U.S. federal, 2026 brackets, plus an optional state rate

Sale

$
$
$

Basis

$
$
$

Your tax situation

Owned for
Tax year of the sale
$
Include the 3.8% NIIT
%
Estimated tax on the sale$40,43419.2% of the gain
Total gain$210,500held more than one year
Cash after loan and tax$243,066amount realized − loan − tax
Amount realized
Sale price$525,000
Less: Selling costs($31,500)
Amount realized$493,500
Adjusted basis
Purchase price and buying costs$330,000
Improvements$25,000
Less: Depreciation taken($72,000)
Adjusted basis$283,000
Gain on sale$210,500
Federal tax estimate
Unrecaptured §1250 gain $72,000 at 22%$15,840
Capital gain at 0%: $0, 15%: $138,500, 20%: $0$20,775
Net investment income tax (3.8%)$3,819
Federal total$40,434
State tax at 0.00%$0
Estimated total tax$40,434

Estimate only: uses 2026 federal brackets, treats your marginal rate as flat across the §1250 gain, and uses taxable income plus the gain in place of modified AGI for the 3.8% tax.

Formula. Gain = (sale price − selling costs) − (cost + improvements − depreciation). Unrecaptured §1250 gain = the smaller of the gain and the depreciation, taxed at your ordinary rate up to 25%. The rest of a long-term gain is taxed at 0%, 15% or 20% depending on where it falls on top of your other taxable income. NIIT = 3.8% of the smaller of the gain or the income above the threshold.

How the gain is calculated

The taxable gain is the amount realized minus the adjusted basis.[4]

Gain=(Sale price − selling costs) − (cost + improvements − depreciation)
  • 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.
The example, step by step
LineAmount
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]

  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.
  2. 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]
  3. 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]
Long-term capital gains rates by taxable income, 2026 and 2027
Filing status2026: 0% up to2026: 20% above2027: 0% up to2027: 20% aboveNIIT 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

  1. Topic no. 409, Capital gains and losses · Internal Revenue Service, reviewed November 9, 2026
  2. Rev. Proc. 2025-32 (2026 inflation adjustments), section .03 Maximum Capital Gains Rate · Internal Revenue Service, 2025
  3. Rev. Proc. 2026-35 (2027 inflation adjustments), section .03 Maximum Capital Gains Rate · Internal Revenue Service, November 5, 2026
  4. Publication 544 (2025), Sales and Other Dispositions of Assets · Internal Revenue Service, for 2025 returns
  5. Topic no. 703, Basis of assets · Internal Revenue Service, reviewed November 9, 2026
  6. Net Investment Income Tax · Internal Revenue Service, reviewed July 1, 2026
  7. Publication 523 (2025), Selling Your Home · Internal Revenue Service, for 2025 returns
  8. Like-kind exchanges – Real estate tax tips · Internal Revenue Service, reviewed May 1, 2026
  9. Instructions for Form 8824, Like-Kind Exchanges · Internal Revenue Service, reviewed November 12, 2026
  10. Publication 925 (2025), Passive Activity and At-Risk Rules · Internal Revenue Service, for 2025 returns
  11. Publication 527 (2025), Residential Rental Property · Internal Revenue Service, for 2025 returns