Home sale capital gains tax calculator
The gain on selling your main home, how much of it the $250,000 or $500,000 exclusion takes off, and the federal and state tax on the rest for your household.
- Excluded under §121
- $250,000
- Taxable gain
- $24,000
- Federal and state tax on it
- $3,600
- Kept after selling costs and tax
- $560,400
| Step | Amount |
|---|---|
| Amount realized (price less selling expenses) | $564,000 |
| Adjusted basis | $290,000 |
| Gain | $274,000 |
| Maximum exclusion | $250,000 |
| Gain from depreciation, which cannot be excluded | $0 |
| Excluded | $250,000 |
| Taxable gain | $24,000 |
| Federal tax it adds | $3,600 |
| State tax it adds | $0 |
- Assumed. Whether you meet the ownership and use tests is your own answer. On a joint return the $500,000 maximum needs either spouse to have owned the home and both to have lived in it; this does not test that, nor the rules for a surviving spouse, a home used partly for business, or nonqualified use after 2008.
- Assumed. The taxable gain is added to your household as a long-term capital gain and both engines are run with and without it; a home sold at a loss adds no tax, and the loss is not deductible.
How this was figured
- Maximum exclusion for your filing status: $250,000IRS, Publication 523 (for 2025 returns) and IRC §121(a), (b) and (c) — exclude "the first $250,000 of gain", "$500,000 for a married couple filing jointly", after owning and living in the home 24 months of the last 5 years; a reduced exclusion divides the shortest qualifying period by 24 months
How it works
The amount realized is the sale price less selling expenses; the adjusted basis is what you paid with the settlement costs that go into basis, plus improvements, less depreciation (Publication 523, Worksheet 2). The gain is the difference.
The exclusion is the §121 maximum, which the statute does not index: $500,000 on a joint return, $250,000 otherwise. A reduced maximum multiplies it by the qualifying months over 24, rounded to the cent. Depreciation claimed after May 6, 1997 is never excluded.
The rest of the gain is added to your household as a long-term capital gain and the Form 1040 engine and the state engine are run with and without it; the tax is the difference, carrying any bound the state figure has. A gain that includes depreciation, or a home held a year or less, is not taxed here, because its rate differs.
Nothing you enter leaves your browser, and nothing is stored. The same calculator is available to AI agents as the tool calc_home_sale_tax, in the page through WebMCP and at https://taxmath.org/mcp.
Sources
Put this calculator on your site
Paste this where the calculator should appear. Our script draws the calculator above the credit line, which is a plain link in your page. It is free, needs no signup and keeps nothing your readers type. Please keep the credit line. The embed page lists the options it takes.