Home sale capital gains tax calculator 2026 & 2027

Find out how much of the profit on your home is tax-free, and the federal tax on any gain above the exclusion.

Updated November 17, 2026 · figures for tax years 2026 & 2027 · How we source figures

The contract price.
Agent commissions, closing costs, transfer taxes and legal fees you paid.
Purchase price plus settlement costs you paid when you bought it.
Additions, a new roof, remodels. Not repairs or maintenance.
Use the smaller of the two. 24 months or more qualifies for the full exclusion.
These reasons allow a partial exclusion.
For a home office or renting out part of the home. Can't be excluded.
Wages, business profit and other income, before deductions. Sets your tax rates.
Federal tax on the sale$4,500
Gain on the sale$280,000
Tax-free under the exclusion$250,000
Taxable gain$30,000
Show the math
Sale price$650,000.00
− selling costs$40,000.00
Amount realized$610,000.00
Adjusted basisPurchase price + improvements − depreciation− $330,000.00
Gain$280,000.00
Exclusion availableFull $250,000$250,000.00
Gain excluded− $250,000.00
Taxable gain$30,000.00
Capital gain at 0%$0.00
Capital gain at 15%$30,000.00
Capital gain at 20%$0.00
Net investment income tax (3.8%)Applies above $200,000 of AGI$0.00
Federal tax caused by the sale$4,500.00
  • You can use the exclusion only once every 2 years. Years after 2008 when the home wasn't your main home (for example, a rental before you moved in) can reduce it. Federal only; most states tax the taxable gain too.

Estimate only, not tax advice. Federal figures from IRS publications. How we calculate.

The home sale exclusion

When you sell your main home, you can leave up to $250,000 of profit out of your income, or $500,000 if you're married filing jointly. Only gain above that is taxed. The amounts are set by law and aren't adjusted for inflation.

Who qualifies

  • Ownership: you owned the home for at least 24 months in the 5 years before the sale.
  • Use: you lived in it as your main home for at least 24 months in those 5 years. The months don't have to be in a row.
  • Once every 2 years: you didn't exclude gain on another home sold in the 2 years before.

Working out your gain

Gain is the sale price minus selling costs, minus your basis: what you paid (with purchase closing costs) plus improvements. Keep receipts for improvements; they lower your gain. Repairs and maintenance don't count.

Worked example

A married couple bought a home for $250,000, spent $40,000 on improvements and sell it in 2027 for $900,000, paying $50,000 in selling costs. Their gain is $560,000. The first $500,000 is excluded, leaving $60,000 taxable. With $150,000 of other income, that costs about $9,000 of federal tax, mostly at the 15% long-term rate.

Selling before 2 years: the partial exclusion

If you sell early because of a new job at least 50 miles farther away, health reasons, or an unforeseen event such as divorce, a death, a disaster or job loss, you get part of the exclusion: the months you qualify divided by 24. A single filer who lived in a home for 12 months and moved for work could exclude up to $125,000, which here covers the whole $95,000 gain.

Home office or rental depreciation

Depreciation you claimed (or could have claimed) after May 6, 1997 for business or rental use of the home can't be excluded. It's taxed as unrecaptured Section 1250 gain, at your regular rate but no more than 25%. In the second example, a single filer who claimed $12,000 of home office depreciation owes about $2,640 on that portion even though the rest of the $182,000 gain is excluded.

Losses

A loss on the sale of your main home isn't deductible.

Frequently asked questions

How much profit can I make on a home sale without paying tax?

Up to $250,000 of gain, or $500,000 for married couples filing jointly, if you owned and lived in the home for at least 2 of the 5 years before the sale and haven't used the exclusion in the last 2 years.

Do I pay tax if I sell my house before living there 2 years?

Possibly not. If the main reason was a job move of at least 50 miles, health, or an unforeseen event, you can exclude part of the gain: the months you qualify divided by 24, times $250,000 or $500,000.

What tax rate applies to gain above the exclusion?

Long-term capital gains rates of 0%, 15% or 20%, depending on your income, plus the 3.8% net investment income tax at higher incomes. Depreciation from a home office or rental is taxed at up to 25%.

Does the $250,000 exclusion go up with inflation?

No. The $250,000 and $500,000 amounts are fixed in the law and haven't changed since 1997.

Sources