Estimate the federal tax on selling your home — with the $250,000 / $500,000 primary-residence exclusion, cost basis, improvements, depreciation recapture, and the 3.8% NIIT. You get the full step-by-step math, not just a number.
Estimated federal tax
$0
Disclosure: As an Amazon Associate we earn from qualifying purchases (tag: theboringthin-20). This costs you nothing extra and does not affect your calculation.
Long-term capital gains brackets (2025 & 2026 inflation-adjusted) — IRS Topic 409. Primary-residence exclusion, cost basis, partial exclusion, depreciation — IRS Topic 701 and IRS Publication 523. Net Investment Income Tax (3.8%) — IRS NIIT / Form 8960. Figures are for the U.S. federal tax only and change annually — verify against the current-year IRS guidance. State capital gains tax (if any) is not included.
If the home was your main residence for at least 2 of the last 5 years, you can exclude up to $250,000 of gain (single) or $500,000 (married filing jointly) under IRC Section 121. Gain above the exclusion is taxed at 0%, 15%, or 20% depending on your taxable income, plus a possible 3.8% Net Investment Income Tax.
IRC Section 121 lets you exclude gain from the sale of a home you owned and used as your main home for at least two of the five years before the sale. You generally can't use the exclusion more than once every two years.
Start with your purchase price, add buying closing costs and capital improvements (new roof, addition, HVAC, remodels — not routine repairs), then subtract any depreciation claimed for rental or home-office use. That adjusted basis is subtracted from your amount realized (sale price minus selling costs). See IRS Publication 523.
Yes, if you sold early because of a qualifying job relocation (new workplace 50+ miles farther), a health reason, or an unforeseen circumstance. The cap is prorated over 730 days — meeting the tests for 365 of 730 days gives you half the normal exclusion.
Yes. Depreciation you took is unrecaptured Section 1250 gain — it can't be excluded under Section 121 and is taxed at a maximum federal rate of 25%.
An extra 3.8% on the lesser of your net investment income (including taxable home-sale gain) or the amount your MAGI exceeds $200,000 (single/HoH), $250,000 (MFJ), or $125,000 (MFS). These thresholds are fixed and not indexed to inflation.
Capital gains brackets and NIIT rules change every year. Drop your email and we'll send a short note when the figures update — no spam.