About the Home Sale Capital Gains Calculator
This calculator estimates the capital gains tax on selling your main home in the United States. Enter the sale price, selling costs, what you paid, the cost of improvements and any depreciation you claimed for a home office or rental use. It applies the Section 121 exclusion — up to $250,000 of gain for single filers and $500,000 for married couples filing jointly — and shows the gain that remains taxable. These limits are set in the tax code and are not indexed for inflation, so they are the same for 2025 and 2026 sales.
To get the full exclusion you generally must have owned the home and lived in it as your main residence for at least 24 months of the five years before the sale, and not used the exclusion in the previous two years. If you sold early because of a job move, health reasons or other unforeseen circumstances, you may qualify for a partial exclusion proportional to the months you meet the tests, which you can model here.
Depreciation claimed after May 6, 1997 cannot be excluded: it is taxed as unrecaptured Section 1250 gain at your ordinary rate, capped at 25%. The rest of any taxable gain is taxed at your long-term capital gains rate (0%, 15% or 20%), plus the 3.8% net investment income tax for higher earners and any state income tax.
With the default inputs, the taxable gain is $105,000.00. Change any value above to recalculate instantly.
How to use the home sale capital gains calculator
- 1Enter the sale price and your selling costs.
- 2Enter what you paid for the home and the cost of capital improvements.
- 3Add any depreciation you claimed for a home office or rental use.
- 4Choose your filing status and whether you meet the 2-out-of-5-year test.
- 5Pick your capital gains rate, ordinary bracket and any NIIT or state tax to estimate the bill.
Formula and method
The amount realized is the sale price minus commissions and closing costs. The adjusted basis is what you paid (including purchase closing costs) plus capital improvements, minus any depreciation claimed. The difference is your gain.
Depreciation claimed after May 6, 1997 is carved out first and taxed as unrecaptured Section 1250 gain at your ordinary income tax rate, but never more than 25% (this calculator applies the lower of the bracket you pick and 25%, a simplification of the Schedule D worksheet, which stacks the gain on top of your other income). The remaining gain is reduced by the Section 121 exclusion — $250,000, $500,000 for joint filers, or a pro-rated amount (months qualifying ÷ 24) for a partial exclusion. What is left is taxed at your long-term capital gains rate, and the NIIT and state rate are applied to the whole taxable gain.
- Recapture
- Depreciation claimed, up to the gain
- Exclusion
- $250,000 / $500,000 × (qualifying months ÷ 24)
Worked examples
Single seller with a $355,000 gain
The home sells for $750,000 less $45,000 of costs, against a $350,000 basis, for a $355,000 gain. The $250,000 single exclusion leaves $105,000 taxable at 15%, or $15,750 of federal tax.
Married couple, same sale
Filing jointly, the $500,000 exclusion covers the whole $355,000 gain, so no federal tax is due on the sale.
Job relocation after 12 months, with home office depreciation
The $96,000 gain includes $6,000 of recaptured depreciation. A partial exclusion of 12/24 × $250,000 = $125,000 covers the other $90,000. The $6,000 recapture is taxed at the seller’s 22% ordinary rate (below the 25% cap) plus 5% state, for $1,620.
Frequently asked questions
How much profit on a home sale is tax-free?+
Up to $250,000 of gain is tax-free for single filers and up to $500,000 for married couples filing jointly, if you owned and lived in the home as your main residence for at least two of the five years before the sale.
What if I lived in the house less than two years?+
You may still get a partial exclusion if the sale was due to a change of workplace, health, or unforeseen circumstances. The exclusion is pro-rated by the time you qualified, e.g. 12 months gives half of the $250,000 or $500,000.
Do I have to report the sale of my home?+
If all of the gain is excluded and you did not receive Form 1099-S, you generally do not report the sale. If you received a 1099-S or have a taxable gain, report it on Form 8949 and Schedule D.
What counts as a capital improvement?+
Improvements that add value, extend the home’s life or adapt it to new uses — additions, a new roof, a remodeled kitchen, central air, landscaping — increase your basis. Routine repairs and maintenance such as painting or fixing leaks do not.
Is depreciation from a home office or rental excluded?+
No. Depreciation claimed after May 6, 1997 is taxed as unrecaptured Section 1250 gain at your ordinary rate, up to a maximum of 25%, even when the rest of the gain qualifies for the Section 121 exclusion.
Tax results are estimates based on published rules and simplified assumptions. They are not tax advice — check official guidance or a tax professional for your situation.