StructureX

Home › Tools

Home sale capital gains calculator (US federal, 2027)

This page is for United States, federal rules (IRS); state taxes are not covered

Type what you sold the home for and what it cost you. You get the gain, how much of it the home sale exclusion covers, what is left to tax and the federal tax on it, slice by slice.

Free tool · IRS Pub 523, Topic 701, Schedule D instructions · US federal only · runs in your browser · Updated 2026-11-29

Gain is the sale price, minus selling costs, minus your adjusted basis (what you paid plus improvements, minus depreciation). If you owned and lived in the home at least 24 of the last 60 months, the first $250,000 of gain ($500,000 on a joint return) is excluded, except gain equal to depreciation. The rest is taxed as a long-term gain.

StepAmount

How it works: gain is the sale price minus selling costs, minus your adjusted basis (what you paid plus improvements, minus depreciation). If you owned and lived in the home 24 of the last 60 months, up to $250,000 of gain ($500,000 on a joint return) is excluded, except gain equal to depreciation. What is left is taxed as a long-term gain, using the IRS Schedule D Tax Worksheet. Depreciation gain is taxed at a top rate of 25%. Type your own limit in the last box for a reduced exclusion or a surviving spouse.

The formula

Limit
$250,000, or $500,000 on a joint return, if the ownership, use and look-back tests are met
Depreciation gain
gain up to the depreciation allowed or allowable; it cannot be excluded and is taxed at a top rate of 25%
Schedule D Tax Worksheet
the IRS worksheet that stacks the gain on top of your other taxable income and taxes it at 0%, 15%, 20% and 25%

Worked example (our numbers, single filer, tax year 2027)

  1. Sale price $700,000, selling costs $42,000, so the amount realized is $658,000. Paid $300,000, improvements $40,000, no depreciation: adjusted basis $340,000.
  2. Gain is $658,000 − $340,000 = $318,000. Owned and lived in it 60 months, so the $250,000 single limit applies. Taxable gain: $68,000.
  3. With $80,000 of other taxable income, the gain sits on top: stack $148,000. The 0% zone ends at $51,050, so none of the gain is at 0%. 15% covers all $68,000, a tax of $10,200.

Federal tax on the sale: $10,200. A hypothetical, not your result.

What this assumes

Questions

How much of my home sale gain is tax free?

Up to $250,000, or $500,000 on a joint return, if you owned and lived in the home at least 24 of the last 60 months and did not use the exclusion on another home in the last 2 years. See capital gains tax on the sale of a home.

Does depreciation change the tax?

Yes. The IRS says you cannot exclude the part of the gain equal to depreciation allowed or allowable. See capital gains on rental property.

What if I inherited the home?

Your basis is generally the fair market value on the date of death, not what the owner paid. See capital gains on inherited property.

Which thresholds does it use?

The 2027 figures on the capital gains tax brackets page.

Reminder: this page is for United States, federal rules (IRS); state taxes are not covered

Follow along

XTradingViewFacebook