Home Sale Gains

Capital gains tax on a home sale — worked out properly, band by band

Most calculators guess one tax rate. This one builds your adjusted basis, applies the Section 121 exclusion you actually qualify for — full, prorated, or none — keeps depreciation recapture separate, then stacks your taxable gain on top of your other income across the real 2026 0%, 15% and 20% bands, with the 3.8% NIIT and an optional state rate on top.

Estimate, not tax advice. This calculator estimates federal tax using simplified 2026 rules. It is not a filed-return figure and cannot replace a tax professional for your full situation.

Home sale capital gains calculator

1 · The sale and your basis
2 · The Section 121 exclusion
3 · Your other income and state

Worked examples (hand-checked)

ScenarioGainExclusionTaxableEst. federal tax
Sold for $500,000, bought for $291,000, lived there 5 years, single$209,000$209,000 (full)$0$0
Sold for $500,000, bought for $180,500, single, other taxable income $50,000$319,500$250,000$69,500$10,425 (all in the 15% band)
Job move after 12 months, married filing jointly, gain $300,000, other taxable income $80,000$300,000$250,000 (prorated: 12/24 of $500,000)$50,000$4,665 ($18,900 at 0%, $31,100 at 15%)
Former rental: $40,000 depreciation claimed, rest of gain excluded, other taxable income $100,000, single$210,000$170,000$40,000 recapture$6,000 (15% band)

Each example is reproduced exactly by the calculator above with the stated inputs — try them.

Quick answers

How much of my home sale gain can I exclude?

If you owned and lived in the home for at least 24 of the 60 months before the sale, up to $250,000 of gain ($500,000 married filing jointly). Sell sooner for a job move, health reasons, or unforeseen circumstances and you may still exclude a prorated share — months used ÷ 24 × the full amount (IRS Publication 523).

Is depreciation I claimed taxable when I sell?

Yes — the part of the gain equal to depreciation taken or allowable is never excludable. It is taxed as unrecaptured §1250 gain at the band rate it lands in, up to 25%.

Does the 3.8% NIIT apply?

It can, once MAGI passes $200,000 (single) or $250,000 (joint). Only the taxable part of the gain counts — the excluded part never enters MAGI.

More depth: the Section 121 exclusion guide — ownership, use, proration and recapture.