Capital Gains Tax Calculator
Estimate the federal tax on an investment property sale, including depreciation recapture and the 3.8% net investment income tax. Based on 2026 brackets — rates change every year, so confirm the current figures with a tax professional.
Sale Details
Everything below feeds the estimate — blank fields count as $0
Your cost basis
Added to basis. Repairs and maintenance do not count.
Rentals only. It lowers your basis and that slice is taxed separately at up to 25%. Leave blank if none.
The sale
Commission, title, transfer tax. These reduce the taxable gain.
Does not change the tax. It changes the cash you walk away with.
Must be more than 12 months to qualify for long-term rates. Exactly 12 is short-term.
Your tax situation
Taxable income after deductions, not gross pay. The gain stacks on top of it.
Only these two 2026 tables are modelled. Head of household and married filing separately use different thresholds.
Tax Estimate
Federal only, 2026 brackets — state tax not included
Ready to Calculate
Enter the sale details and click Calculate Tax to see the estimate
How capital gains tax works when you sell a rental property
When you sell a rental held more than a year, the profit above your adjusted basis is taxed in up to three layers: depreciation recapture at ordinary rates capped at 25 percent, the remaining gain at 0, 15 or 20 percent, and a 3.8 percent net investment income tax for higher earners.
The formula
Net sale price = sale price minus selling costs
Adjusted basis = purchase price + capital improvements minus depreciation taken
Taxable gain = net sale price minus adjusted basis
How adjusted basis works
Basis starts at what you paid and rises with capital improvements like a new roof or an addition. Routine repairs do not count. Depreciation lowers it: residential rentals are typically depreciated over 27.5 years, and basis drops by the depreciation you were allowed to take even if you never claimed it, so skipping the deduction does not avoid recapture.
Long-term vs short-term, recapture and the 3.8 percent tax
A gain on property held more than one year is long-term. Held one year or less, the whole gain is taxed as ordinary income. For tax year 2026 the calculator's tables tax long-term gains at 0 percent up to 49,450 dollars of taxable income for single filers (98,900 dollars married filing jointly), 15 percent up to 545,500 dollars (613,700 dollars joint), and 20 percent above that. The gain stacks on top of your other income.
The slice of gain equal to depreciation taken, called unrecaptured Section 1250 gain, is taxed at your ordinary rate capped at 25 percent. The net investment income tax then adds 3.8 percent on the smaller of the gain or the amount your modified adjusted gross income exceeds 200,000 dollars (250,000 dollars joint). These thresholds are not indexed to inflation.
Worked example
You bought a rental for 300,000 dollars, spent 25,000 dollars on capital improvements and took 60,000 dollars of depreciation over 7 years (84 months in the Holding Period field). You sell for 450,000 dollars with 27,000 dollars of selling costs. Net sale price is 423,000 dollars, adjusted basis is 300,000 plus 25,000 minus 60,000, or 265,000 dollars, and the taxable gain is 158,000 dollars.
You file single with 75,000 dollars of other taxable income. The first 60,000 dollars of gain is recapture: 30,700 dollars falls in the 22 percent bracket and 29,300 dollars in the 24 percent bracket, for 13,786 dollars of tax. The other 98,000 dollars is long-term gain at 15 percent, or 14,700 dollars. Income plus gain is 233,000 dollars, 33,000 over the threshold, so the 3.8 percent tax adds 1,254 dollars. Total federal tax is about 29,740 dollars, 18.8 percent of the gain. After a 210,000 dollar loan payoff you keep about 183,260 dollars before state tax.
How to read the result
Recapture often lands below the 25 percent cap because it is taxed at your own bracket. The effective rate blends every layer into one number to weigh against an exchange. The estimate is federal only and not tax advice, so confirm it with a tax professional before you list.
Why the home sale exclusion rarely applies
Section 121 excludes up to 250,000 dollars of gain (500,000 dollars for joint filers) on a home you owned and lived in as your main home for at least 2 of the 5 years before the sale. A property that has only ever been a rental does not qualify. If you lived in it, part of the gain may qualify, but depreciation taken after May 6, 1997 is still taxed and rental years before you moved in can shrink the exclusion.
The 1031 exchange alternative
A 1031 exchange defers the whole gain, recapture included, when you trade a rental for investment real estate of equal or greater value. A qualified intermediary holds the proceeds, you have 45 days to identify the replacement and 180 days to close, and any cash you take out is taxed. Model it in the 1031 exchange calculator.
Frequently asked questions
How much is capital gains tax on a rental property?
It depends on your income, how long you held the property and how much depreciation you took. Long-term gains are taxed at 0, 15 or 20 percent, depreciation recapture at up to 25 percent, and higher earners add a 3.8 percent net investment income tax.
What is depreciation recapture?
When you sell a rental at a gain, the part of the gain equal to the depreciation you took, or were allowed to take, is taxed at your ordinary income rate, capped at 25 percent.
Can I avoid capital gains tax on a rental property?
You can usually defer it with a 1031 exchange into another investment property, and heirs typically receive a stepped-up basis. Living in the property as your main home can let part of the gain qualify for the Section 121 exclusion, but depreciation is still taxed.
Does selling a rental at a loss lower my taxes?
Often, yes. A loss on a rental held more than a year is generally a Section 1231 loss that can offset other income. This calculator shows a loss as zero tax, not a refund, so ask a tax professional how it applies to you.
Related calculators
- 1031 Exchange Calculator: defer the gain
- Appreciation Calculator: project the sale price
- Rental Property Calculator: compare selling with holding
- Cash-on-Cash Calculator: return on the equity you free up