United States · federal tax

Home sale capital gain exclusion calculator.

Work out your gain, how much of it the Section 121 exclusion covers ($250,000 single, $500,000 joint) and the federal tax on any excess at 0%, 15% or 20%.

Advertisement

Your sale

$
$
$
$
Additions and upgrades only, not routine repairs.
$
After deductions. Used only to place the taxable gain in the 0%, 15% or 20% bands.

Estimate

Advertisement

Worked example

A single seller sells for $650,000 with $39,000 of selling costs. They bought for $300,000 and added $50,000 of improvements. Gain = ($650,000 − $39,000) − ($300,000 + $50,000) = $261,000. The $250,000 exclusion removes most of it, leaving $11,000 taxable. With $80,000 of other taxable income, that $11,000 sits above the $49,450 zero-rate threshold, so it is taxed at 15%: $1,650.

How the estimate works

Gain = (sale price − selling costs) − (purchase price + capital improvements). Exclusion = the smaller of the gain and $250,000 ($500,000 for a qualifying joint return), applied only if you meet the 24-month ownership and use tests within the 5 years before the sale and did not exclude another home's gain in the prior 2 years. Tax: the taxable gain is stacked on top of your other taxable income and taxed at 0%, 15% or 20% by band.

2026 band limits used (taxable income, 0% up to / 15% up to): single $49,450 / $545,500; married filing jointly $98,900 / $613,700; head of household $66,200 / $579,600; married filing separately $49,450 / $306,850. Above the second figure the rate is 20%.

Sources, as of October 1, 2026: IRS Topic 701, Sale of your home; IRS Publication 523, Selling Your Home; IRS Topic 409, Capital gains and losses; Rev. Proc. 2025-32 for the 2026 thresholds. The reduced (partial) exclusion for moves caused by work, health or unforeseen circumstances is not calculated here; see Pub 523.

The calculation, step by step

Capital gains on a home sale depend on four numbers, and each is worth getting right before you touch the form above.

  1. Amount realized is the sale price minus selling costs such as agent commissions, transfer taxes and legal fees. The formula on this page subtracts selling costs from the price, so enter them in the costs field, not as an improvement.
  2. Adjusted basis is what you paid plus capital improvements, such as a new roof or an addition, that add value or extend life. Routine repairs are generally not added. Closing costs you paid when you bought can usually be added to basis, so check your closing statement.
  3. Gain is the amount realized minus the adjusted basis. A negative result is a loss, and a loss on a personal residence is not deductible, so there is nothing to exclude.
  4. Exclusion under section 121 removes up to $250,000 of gain, or up to $500,000 on a qualifying joint return. Whatever is left is taxable capital gain.

Who qualifies for the exclusion

The IRS describes two tests. In the 5 years ending on the date of sale, you must have owned the home for at least 24 months and used it as your main home for at least 24 months. The two periods can be different 2-year windows. If you file jointly, either spouse can meet the ownership test but both spouses must meet the use test individually. Under the statute, you cannot use the exclusion if you excluded gain from another home sale in the 2 years before this one. The $500,000 limit requires the joint-return conditions in section 121(b)(2) to be met, including that neither spouse is barred by a recent exclusion, which is why the tool falls back to $250,000 when only one spouse meets the use test.

More worked examples

Do you have to report the sale?

IRS Topic 701 says that if you receive an information return such as Form 1099-S, Proceeds From Real Estate Transactions, you must report the sale even if the gain is excludable. You must also report the sale if you cannot exclude all of your capital gain. In those cases you use Form 8949 and Schedule D. If you have no 1099-S and the entire gain is excluded, you generally do not report it. Keep records of purchase, improvements and sale for at least as long as you may need to support the basis.

Common mistakes and edge cases

Who this is for, and what it does not cover

It is for owners considering a sale, and for sellers who want a quick estimate of the federal tax on any gain above the exclusion. It is not a substitute for a closing statement or a tax return. For net cash at closing, use the seller net proceeds calculator. For gains on other assets try the capital gains tax calculator, and for the extra 3.8% surtax see the net investment income tax calculator.

Sources

Primary sources used for this page, each retrieved October 2026.

Advertisement

Frequently asked questions

How much capital gain on a home sale is excluded?

Up to $250,000 of gain if you file as single, or up to $500,000 on a qualifying joint return, if you meet the ownership and use tests. Gain above that is taxed as capital gain.

Who qualifies for the exclusion?

You must have owned the home and used it as your main home for at least 24 months of the 5 years ending on the sale date. The two tests can be met in different 2-year windows. You generally cannot use it if you excluded gain on another home in the 2 years before the sale.

Why is the joint limit sometimes only $250,000?

A joint return gets $500,000 only when either spouse meets the ownership test, both spouses meet the use test and neither is barred by a prior exclusion. If one spouse fails the use test, the limit drops to $250,000.

What if I lived in the home less than 2 years?

A reduced exclusion may apply if you moved because of work, health or certain unforeseen circumstances. This page does not calculate it and shows no exclusion in that case. See IRS Publication 523.

Do I have to report the sale of my home to the IRS?

Yes if you receive a Form 1099-S, even when the gain is excludable, and yes if you cannot exclude all of your gain. If you have no 1099-S and the whole gain is excluded, you generally do not report it.

What tax rate applies to gain above the exclusion?

Long-term gain is taxed at 0%, 15% or 20% depending on taxable income. For 2026 the 0% band for single filers ends at $49,450 of taxable income and the 15% band ends at $545,500.

How do I calculate gain on a home sale?

Subtract selling costs from the sale price, then subtract your adjusted basis, which is what you paid plus capital improvements. The result is your gain before any exclusion.

What is not included in the tax estimate?

State tax, the 3.8% net investment income tax, the 25% rate on depreciation recapture such as a home office or rental period, and nonqualified-use rules. See Topic 409, Topic 559 and Pub 523.

Estimate only

Federal arithmetic on figures you enter. It leaves out state tax, the net investment income tax, depreciation recapture and nonqualified use. It is not tax or legal advice. Confirm with a tax professional or Pub 523 before filing.