Home Sale Tax Calculator — $250K/$500K Exclusion (Section 121)

2026 New

Work out the capital gains tax when you sell your home: the $250,000 or $500,000 exclusion, partial exclusions, depreciation from a home office or rental, and the 2026 rates with NIIT.

By Konstantin Iakovlev · Updated September 2026 · Source: IRS Publication 523 (2025); IRC §121; Rev. Proc. 2025-32

$
$
$
$
$
Both spouses lived there 2 years?

Gain excluded

$500,000

Taxable gain

$200,000

Federal tax on the sale

$33,800

How the gain is figured

Amount realized (price minus selling costs)$1,410,000
Adjusted basis$710,000
Gain$700,000
Your exclusion limit$500,000
Excluded$500,000
Taxable gain at 0/15/20%$200,000
Income tax on the gain$30,000
Net investment income tax (3.8%)$3,800
Federal tax on the sale$33,800

You can use the exclusion once every 2 years. A surviving spouse keeps the $500,000 limit for a sale within 2 years of the death. Inherited homes start from the value at death: step-up in basis calculator. State income tax on the taxable gain is not included.

Use the Home Sale Tax Calculator — $250K/$500K Exclusion (Section 121) above to calculate your results. Enter your values and see instant results — all calculations run in your browser.

Disclaimer: This calculator is for informational purposes only and does not constitute tax, financial, or legal advice. Results are estimates based on the information you provide and current rates. Always consult a qualified tax professional or financial advisor for advice specific to your situation.

How It Works

When you sell your main home you can exclude up to $250,000 of gain, or $500,000 on a joint return, if you owned it and lived in it for at least two of the five years before the sale and have not used the exclusion in the past two years (IRC §121). The gain is the price minus selling costs, less what you paid, your purchase closing costs and your improvements. Only gain above the limit is taxed, at the 0%, 15% or 20% long-term rates when you owned the home more than a year.

If you move before two years because of a new job at least 50 miles farther away, a health reason or an unforeseen event such as a divorce or job loss, you get a partial exclusion: the limit is multiplied by the months you owned and lived there out of 24. Married couples get $500,000 only if both spouses lived in the home for two years; a surviving spouse keeps the $500,000 limit for a sale within two years of the death.

Two parts of the gain are always taxable. Depreciation you claimed after May 6, 1997 for a home office or rental use is taxed at up to 25%. And if the home was rented or vacant after 2008 before you moved in, that share of the gain is taxable and does not use up the exclusion; time after you move out does not count against you. The excluded gain is not subject to the 3.8% net investment income tax, but the taxable part is.

Example: Married Couple Sells for $1.5 Million

  1. 1 Input: a married couple filing jointly, with $117,800 of other taxable income, bought for $600,000 with $10,000 of closing costs, added $100,000 of improvements and sells for $1,500,000 with $90,000 of selling costs.
  2. 2 Gain: $1,410,000 realized minus a $710,000 basis = $700,000.
  3. 3 Exclusion: both lived there more than two years, so $500,000 is excluded and $200,000 is taxable, all at 15% = $30,000.
  4. 4 Result: with $3,800 of net investment income tax, the federal tax on the sale is $33,800.

Source: IRS Publication 523 (2025); IRC §121; Rev. Proc. 2025-32 · Last updated: September 2026

Frequently Asked Questions

How much home sale gain is tax-free?
Up to $250,000, or $500,000 for a married couple filing jointly, if you owned and lived in the home at least two of the five years before the sale and have not used the exclusion in the last two years. Both spouses must meet the use test for the $500,000 limit.
Can I get a partial exclusion if I sell before two years?
Yes, if the main reason is a new job at least 50 miles farther away, a doctor-recommended move for health, or an unforeseen event such as a divorce, a death or losing your job. The limit is multiplied by the months you owned and lived there out of 24.
Is depreciation from a home office taxed when I sell?
Yes. Depreciation claimed after May 6, 1997 for a home office or rental use is taxed at up to 25% even when the rest of the gain is excluded.
Do I pay the 3.8% net investment income tax on a home sale?
Not on the excluded gain. The taxable part of the gain counts as investment income, and the 3.8% tax applies to the extent your modified AGI exceeds $200,000 single or $250,000 joint.