TR

Home / Guides / Home Sale Capital Gains Tax and the Section 121 Exclusion

Home Sale Capital Gains Tax and the Section 121 Exclusion

Updated: November 6, 2026 · AracMerkezi

▶ Open Home Sale Capital Gains Calculator (Section 121 Exclusion)

A single owner who sells a home for $650,000 that cost $300,000 to buy, with $40,000 of improvements, $6,000 of closing costs and 6% selling costs, has a $265,000 gain, of which $250,000 can be excluded under Section 121, leaving about $2,250 of federal tax in the example. The example uses assumed income of $90,000 and other inputs you can change in the home sale capital gains calculator. The Internal Revenue Service says you can exclude up to $250,000 of gain on the sale of your main home, or $500,000 if married and filing jointly, when you meet the ownership and use tests.

The Section 121 tests

According to the IRS, you generally must have owned the home and used it as your main home for at least 24 months (730 days) during the 5 years before the sale. The months need not be consecutive or concurrent. For married couples filing jointly, either spouse can meet the ownership test but both must meet the use test. The exclusion is generally available once every 2 years, and a partial exclusion can apply if the sale is due to work, health or unforeseeable events. The calculator does not compute partial exclusions, so use IRS Publication 523 if that applies. Congress can change the limits, so check the IRS before you rely on the figures.

How the gain is figured

Amount realized is the sale price minus selling costs. Adjusted basis is the purchase price plus purchase closing costs that add to basis, plus capital improvements, minus depreciation if you ever claimed it for business or rental use. Gain is the difference. A loss on a personal residence is not deductible.

LineExample 1
Sale price$650,000
Selling costs (6%)$39,000
Amount realized$611,000
Purchase price + closing costs + improvements$300,000 + $6,000 + $40,000 = $346,000
Gain$265,000
Exclusion (single)$250,000
Taxable gain$15,000

Worked example 1: single, qualifying

Taxable gain is $15,000. With other 2026 taxable income of $90,000, the gain sits above the 0% ceiling of $49,450 for single filers (Revenue Procedure 2025-32), so it is taxed at 15%, or $2,250. Modified adjusted gross income including the gain is $115,000, below the $200,000 threshold for the 3.8% net investment income tax, so that tax is $0. State tax is not included.

Worked example 2: joint filers with depreciation

Inputs: sale $1,200,000 with 6% selling costs ($72,000); purchase $500,000; closing costs $10,000; improvements $60,000; $20,000 of depreciation claimed on a home office after May 6, 1997; other taxable income $180,000; other MAGI $230,000; the 2026 joint ceilings of $98,900 and $613,700. Basis is $500,000 + $10,000 + $60,000 - $20,000 = $550,000, gain is $578,000, and the exclusion is $500,000. The depreciation portion cannot be excluded, so taxable gain is $78,000: $20,000 taxed at up to 25% ($5,000) and $58,000 at 15% ($8,700). MAGI including the gain is $308,000, which is $58,000 over the $250,000 joint threshold, so the 3.8% tax applies to $58,000, or $2,204. The federal total is $15,904.

LineExample 2
Gain$578,000
Excluded$500,000
Taxable$78,000
Depreciation portion at 25%$5,000
Long-term gain, $58,000 at 15%$8,700
3.8% net investment income tax$2,204
Federal total$15,904

Worked example 3: the tests are not met

Using Example 1 with no exclusion, the full $265,000 is taxable. Tax at 15% is $39,750 and the 3.8% tax applies to $165,000 (MAGI $365,000 less the $200,000 threshold), which is $6,270. The total is $46,020. This shows why the tests matter, and why a sale date close to a threshold deserves a check with a tax professional.

Rates and thresholds

The long-term capital gains rate structure of 0%, 15% and 20% is statutory, but the income ceilings are indexed every year. For 2026 the 0% rate applies up to taxable income of $49,450 for single filers and $98,900 for joint filers, and the 15% rate applies up to $545,500 and $613,700, with 20% above. The 3.8% tax applies to the lesser of net investment income or MAGI over $200,000 (single) or $250,000 (joint); those thresholds are not indexed. Taxable gain on a home sale above the exclusion is generally treated as net investment income, so confirm how it applies to you with the instructions for Form 8960.

Common mistakes

Official sources

If part of the mortgage is also being paid off, see the loan payment calculator for the payment side. This guide gives information and is not tax or legal advice.

Figures reflect published guidance as of November 2026. Rules, limits and rates change, so confirm with the IRS, the Social Security Administration, your lender or a licensed professional before you act.

Frequently asked questions

How much of a home sale gain can be excluded?

The IRS says up to $250,000, or $500,000 for married couples filing jointly, if the ownership and use tests are met. Depreciation claimed after May 6, 1997 cannot be excluded.

Is a loss on selling my home deductible?

No. The IRS says a loss on the sale of a personal residence is not deductible. The calculator shows no taxable gain in that case.

Does the calculator handle a partial exclusion?

No. A partial exclusion can apply for work, health or unforeseeable events. Use IRS Publication 523 or a licensed tax professional to figure it.

Tools mentioned in this guide

More guides

Important note: This tool and its results are informational estimates only. They do not replace investment, tax, legal or accounting advice and are not a recommendation to buy or sell anything. Rates and amounts change; rely on the Official Gazette and the relevant authority's announcements for binding values, and consult an accountant, lawyer or your bank before making decisions.

This article is for general information only and is not legal, financial or medical advice. We are not an official institution.