Taxes 2026
Capital Gains Tax on Selling a Home: How the $250,000/$500,000 Exclusion Works, Step by Step
Work out the gain on a home sale (cost basis, improvements and selling costs), check whether you qualify for the Section 121 exclusion, and estimate any federal tax with the calculator, with worked examples for single and married sellers.

If you've owned and lived in your home for at least 2 of the 5 years before the sale, you can exclude up to $250,000 of gain from tax, or $500,000 if married filing jointly. Only the gain above that is taxed, usually at long-term capital gains rates (0%, 15% or 20%), plus the 3.8% net investment income tax for higher incomes. Here's how to figure your gain and your tax.
Step 1: Figure your cost basis
Your basis isn't just what you paid. Add up:
| Item | Example |
|---|---|
| Purchase price | $280,000 |
| Certain buying costs (title insurance, recording fees, transfer taxes you paid, some legal fees) | none in this example |
| Capital improvements: additions, a new roof, HVAC, kitchen remodel, finished basement | none in this example (a $25,000 new roof would add $25,000) |
| Minus: depreciation claimed (home office or rental use), casualty losses deducted |
Repairs and maintenance (painting, fixing a leak) don't count; improvements that add value or extend the home's life do. Keep receipts for improvements for as long as you own the home, plus a few years after the sale.
Step 2: Figure the amount realized
Sale price minus selling costs: real estate commissions, title and escrow fees, transfer taxes you paid, staging and advertising.
Example: $720,000 sale − $40,000 in selling costs = $680,000.
Step 3: Compute the gain
Amount realized − adjusted basis = gain. With a $280,000 basis: $680,000 − $280,000 = $400,000 gain. (Improvements would raise the basis and shrink the gain.)
Step 4: Check the exclusion tests
You generally qualify for the full exclusion if all of these are true:
- Ownership test: you owned the home for at least 2 years in the 5 years before the sale.
- Use test: you lived in it as your main home for at least 2 years in those 5 years (the 2 years don't have to be continuous, or the same 2 years as ownership).
- Once every 2 years: you haven't excluded gain on another home sale in the 2 years before this one.
For the $500,000 joint exclusion, either spouse can meet the ownership test, but both must meet the use test, and neither can have used the exclusion in the past 2 years. A surviving spouse can use $500,000 if the sale is within 2 years of the death and other conditions are met.
Partial exclusion: if you fall short because of a job move (new job at least 50 miles farther away), health reasons or certain unforeseen events, you may qualify for a prorated exclusion.
Step 5: Estimate the tax
Enter the purchase price (your basis), the sale price, selling costs and your other income in the capital gains tax calculator, choosing "Main home."

The same sale by a married couple filing jointly:

The NIIT applies only to the taxable part of the gain (after the exclusion) and only if your modified AGI, including that gain, exceeds $200,000 single or $250,000 joint.
Worked examples
| Seller | Gain | Exclusion | Taxable gain | Approx. federal tax |
|---|---|---|---|---|
| Single, $90,000 other income | $400,000 | $250,000 | $150,000 | $22,500 + $1,520 NIIT = $24,020 |
| Married jointly, $150,000 other income | $400,000 | $500,000 | $0 | $0 |
| Married jointly, $150,000 other income | $650,000 | $500,000 | $150,000 | $22,500 + $1,900 NIIT = $24,400 |
Special situations
- Rental or home office use: depreciation you took (or could have taken) after May 6, 1997 is taxed as "unrecaptured Section 1250 gain" at up to 25%, even if the rest is excluded. Periods of non-qualified use (renting it out before you moved in) can reduce the exclusion.
- Inherited homes: heirs generally get a "stepped-up" basis equal to the value at death, so selling soon after usually produces little gain.
- Losses on selling a personal home are not deductible.
- Reporting: if you receive Form 1099-S or have taxable gain, report the sale on Form 8949 and Schedule D.
- State tax: most states tax the taxable gain too.
For the 2026 brackets, see capital gains tax rates and brackets for 2026. This is general information, not tax advice; consult a tax professional for your sale.