🇺🇸 United States

Home Sale Tax Calculator

Will you owe tax when you sell your home? Calculate your capital gain, check if you qualify for the Section 121 exclusion ($250K single / $500K MFJ), and explore strategies to minimize or eliminate tax on your home sale.

$
Original purchase price of your home
$
Expected or actual sale price
$
Kitchen, bath, roof, additions (not repairs)
%
Agent commission + closing costs (typically 5-8%)
Must be 2+ years for full Section 121
$
W-2, self-employment, etc. (affects capital gains bracket)
%
CA: 13.3%, NY: 8.82%, TX/FL/NV: 0%
$
If you rented the home, depreciation is recaptured at 25%

Try another scenario

How to Use This Calculator

Capital Gain on Home Sale tab

The default tab. Enter your purchase price, sale price, capital improvements, and selling costs. The calculator computes your adjusted basis, total gain, Section 121 exclusion, and estimated federal + state tax. Expand "More options" to add other taxable income (affects your capital gains bracket), state tax rate, and depreciation recapture if you rented the home.

Do I Qualify? tab

Use this if you're unsure whether you meet the Section 121 ownership and use tests. Enter months owned and months lived in as a primary residence. If you lived there less than 2 years, select your reason for the early sale — you may qualify for a partial exclusion. If you rented the home, enter rental months to see the non-qualified use impact.

Tax Strategies tab

For gains that exceed your exclusion. See how documenting improvements increases your basis, whether an installment sale reduces your bracket, and how the Net Investment Income Tax (3.8%) affects high earners. Compare strategies side by side.

Share your result

Every input is encoded in the URL. Click Share to send your exact scenario to a spouse, accountant, or real estate agent.

The Formula

The IRS uses a straightforward formula to determine your taxable gain on a home sale:

Adjusted Basis = Purchase Price + Capital Improvements

Gain = Sale Price − Selling Costs − Adjusted Basis

Taxable Gain = max(0, Gain − Section 121 Exclusion)

Section 121 Exclusion:
• $250,000 if Single, HoH, or MFS
• $500,000 if Married Filing Jointly
• Must own AND live in home 2 of last 5 years

Partial Exclusion = Full Exclusion × (Months Lived / 24)
(only if moved for work, health, or unforeseen circumstances)

If your gain is below the exclusion, you owe $0 in capital gains tax and don't even need to report the sale on your tax return (unless you received a Form 1099-S). If your gain exceeds the exclusion, the excess is taxed at long-term capital gains rates: 0%, 15%, or 20% depending on your income, plus potentially 3.8% NIIT and state tax.

Example

Karen & Bill — selling their home of 12 years in Scottsdale, AZ

Karen and Bill bought their home for $280,000 and are selling for $625,000. Over 12 years they invested $65,000 in capital improvements (kitchen remodel, new HVAC, pool). Selling costs are 5.5% ($34,375). They file jointly.

Capital Gain on Home Sale tab

Sale price$625,000
Selling costs (5.5%)-$34,375
Purchase price-$280,000
Capital improvements-$65,000
Adjusted basis$345,000
Total gain$245,625
Section 121 exclusion (MFJ)-$245,625
Taxable gain$0

Gain = $625,000 − $34,375 − $345,000 = $245,625. This is well under the $500,000 MFJ exclusion. Karen and Bill owe $0 in tax.

Do I Qualify? tab

Months owned144
Months lived in144
Ownership testPASS
Use testPASS
Full exclusion$500,000

They easily qualify — 12 years of ownership and use far exceeds the 2-of-5-year requirement.

FAQ

Section 121 of the Internal Revenue Code lets you exclude up to $250,000 of gain ($500,000 if married filing jointly) when you sell your primary residence. You must have owned AND lived in the home for at least 2 of the last 5 years before the sale. You can use this exclusion once every 2 years. If your gain is below the exclusion, you owe zero capital gains tax.
You must meet two tests: the ownership test (owned for at least 24 months) and the use test (lived in as your primary residence for at least 24 months). Both periods must fall within the 5 years before the sale, but they don't need to be continuous. If you moved early due to a job relocation (50+ miles), health reasons, or unforeseen circumstances (divorce, death, job loss), you may qualify for a partial exclusion proportional to the time you lived there.
If you rented your home after 2008, the rental period counts as "non-qualified use." The portion of your gain attributable to non-qualified use cannot be excluded, even if you meet the 2-of-5-year test. For example, if you owned a home for 10 years and rented it for 2 years after 2008, 20% of your gain is not excludable. Additionally, any depreciation you claimed during the rental period is recaptured at a 25% tax rate, regardless of the exclusion.
Yes. Capital improvements increase your cost basis, which reduces your gain. Qualifying improvements include kitchen and bathroom remodels, room additions, new roofs, HVAC systems, decks, landscaping, and energy upgrades. Regular repairs and maintenance (painting, fixing leaks, patching drywall) do not count. Keep all receipts — the IRS can ask for documentation. Every dollar of documented improvement is a dollar less of taxable gain.
The NIIT is a 3.8% surtax on net investment income (including capital gains from a home sale) if your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). It applies only to the taxable gain above your exclusion. For example, if you have $100,000 in taxable gain and your MAGI is $300,000 (MFJ), the 3.8% NIIT applies to $50,000 of that gain (the amount over the $250,000 threshold). Strategies to reduce NIIT include timing the sale in a lower-income year or maximizing above-the-line deductions.

Related Calculators

Add This Calculator to Your Website

Embed the sum.money Home Sale Tax Calculator on your site. Free, responsive, always up-to-date.

<iframe src="https://sum.money/embed/us/home-sale-tax-calculator" width="100%" height="600"></iframe>