Taxes
Capital Gains Tax Calculator
Estimate capital gains tax, recapture, and net proceeds when you sell a property.
Tax breakdown
| Item | Amount |
|---|
How rental property returns work
When you sell real estate for more than you paid, the profit is a capital gain and is subject to tax. For investment properties held longer than a year, the gain qualifies for long-term capital gains rates, which are lower than ordinary income rates. But real estate has a wrinkle that other assets do not: depreciation recapture. If you have been depreciating a rental property, the IRS wants to reclaim some of that tax benefit when you sell. To calculate your tax, you first determine the adjusted basis — the original purchase price plus capital improvements minus accumulated depreciation. Your total gain is the sale price minus selling costs minus the adjusted basis. The depreciation recapture portion is the smaller of your accumulated depreciation or the total gain, and it is taxed at a maximum federal rate of 25% for unrecaptured Section 1250 gains. The remaining gain is taxed at the federal long-term capital gains rate. If the property is your primary residence, you may qualify for the Section 121 exclusion — up to $250,000 for single filers or $500,000 for married couples filing jointly — on the capital gain portion, not the recapture. The calculator applies the exclusion to the gain after subtracting the recapture portion. High-income taxpayers may also owe the Net Investment Income Tax (NIIT) of 3.8% on the total gain. Your state may tax the gain as well. The calculator adds up the recapture tax, federal tax on the remaining gain, NIIT (if elected), and state tax to show your total tax. It then subtracts that from the sale price minus selling costs to show your net proceeds after tax — the actual cash you walk away with. Use this to compare selling now versus holding, or to decide whether a 1031 exchange or installment sale might reduce your tax burden.
Worked example
You bought a rental for $300,000 and added $15,000 in improvements. You took $40,000 in depreciation. You sell for $450,000 with $27,000 in selling costs. Your federal long-term rate is 15%, your state rate is 6%, and you elect the 3.8% NIIT. This is not your primary residence, so the exclusion is none.
Adjusted basis = $300,000 + $15,000 − $40,000 = $275,000. Total gain = $450,000 − $27,000 − $275,000 = $148,000. Recapture portion = min($40,000, $148,000) = $40,000, taxed at 25% = $10,000.
Gain after exclusion = $148,000 − $40,000 − $0 = $108,000. Federal tax = $108,000 × 15% = $16,200. NIIT = $148,000 × 3.8% = $5,624. State tax = $148,000 × 6% = $8,880. Total tax = $10,000 + $16,200 + $5,624 + $8,880 = $40,704. Net proceeds = $450,000 − $27,000 − $40,704 = $382,296.
Frequently asked questions
What is depreciation recapture?
When you sell a rental property, the IRS recaptures the depreciation you took over the years by taxing that amount at a special rate — up to 25% federally for unrecaptured Section 1250 gains. The recapture amount is the smaller of your accumulated depreciation or your total gain. The remaining gain is taxed at the long-term capital gains rate.
What is the primary-residence exclusion?
Under Section 121, if you lived in the property as your primary residence for at least 2 of the last 5 years, you can exclude up to $250,000 of capital gain (single) or $500,000 (married filing jointly). The exclusion applies to the capital gain portion, not to depreciation recapture. The calculator lets you select none, $250,000, or $500,000.
What is the Net Investment Income Tax (NIIT)?
The NIIT is a 3.8% surtax on investment income that applies to taxpayers with modified adjusted gross income above $200,000 (single) or $250,000 (married filing jointly). It applies to capital gains from real estate sales. The calculator lets you elect to apply it if your income level makes it relevant.
How are capital gains taxed at the state level?
State tax treatment of capital gains varies widely. Some states tax capital gains at the same rate as ordinary income, some have lower rates, and a few states have no income tax at all. The calculator uses your entered state tax rate as a percentage of the total gain. Check your state rules or consult a tax professional for the correct rate.
How can I reduce my capital gains tax?
Common strategies include a 1031 exchange (deferring tax by reinvesting in another investment property), living in the property to qualify for the primary-residence exclusion, an installment sale to spread the gain over multiple years, or offsetting gains with capital losses. Each strategy has specific rules — consult a tax professional before deciding.
More Taxes tools
- 1031 Exchange Calculator Estimate the tax you can defer by reinvesting sale proceeds into a like-kind property.
- Rental Property Depreciation Calculator Calculate annual and first-year depreciation with the mid-month convention.
- Depreciation Recapture Calculator Estimate depreciation recapture tax when you sell a rental property.