Home sale capital gains tax calculator

A home sale capital gains tax calculator for the home you live in. Enter the gain on the sale, pick the exclusion that applies to you, and add your other income and state. Most home sales owe nothing. For example: $376,360 kept from a $400,000 gain; 5.9% goes to tax.

This is a capital gains tax calculator on sale of primary residence: it takes the $250,000 or $500,000 exclusion off the gain first and taxes only what is left.

Long-term gain, 2026 rates. The tax is worked out on single-filer brackets, so a couple filing jointly will owe a little less than shown.

The home sale exclusion

When you sell your main home you can leave out up to $250,000 of gain, or $500,000 for a married couple filing jointly. Only gain above that amount is taxed, at the long-term rates. The amounts are set in law and have not changed since 1997.

Who qualifies

You must have owned the home and lived in it as your main home for at least two of the five years before the sale. The two years do not have to be in one stretch. You can use the exclusion once every two years.

A couple gets the $500,000 amount if either spouse owned the home and both lived in it for two years.

If you move early because of a job change, a health reason or an unforeseen event, you can claim part of the exclusion in proportion to the time you lived there.

Tax on a home sale, single and married

With $80,000 of other income, in a state with no income tax.

Gain on your homeTaxable if singleTax if singleTaxable if marriedTax if married
$100,000$0$0$0$0
$250,000$0$0$0$0
$400,000$150,000$23,640$0$0
$500,000$250,000$42,440$0$0
$750,000$500,000$90,360$250,000$42,440
$1,000,000$750,000$149,860$500,000$90,360

Raising your basis

The gain is the sale price, less selling costs, less what you paid plus improvements. Keep records of a new kitchen, an extension, a new roof, windows, landscaping and similar work, because each one reduces the gain. Routine repairs and decorating do not count.

How to use this calculator

  • Gain on the sale. The sale price less selling costs, less what you paid and what you spent on improvements.
  • Exclusion. Single, married filing jointly, or none if the house was not your main home for two of the last five years.
  • Your other income. Income for the year of the sale, before tax.
  • State. The state where the home is.

A worked example

You bought your home for $280,000 and spent $45,000 on an extension. You sell it in Texas for $700,000 and pay $42,000 in commission and closing costs. Your salary is $80,000.

StepAmount
Basis: price paid plus improvements$325,000
Net sale price$658,000
Gain$333,000
Single: gain above the $250,000 exclusion$83,000
Single: federal tax at 15%$12,450
Married filing jointly: gain above the $500,000 exclusion$0
Married filing jointly: tax$0

The same sale costs a single owner $12,450 and a married couple nothing. The 3.8% investment income tax does not apply here because income with the taxed part of the gain stays under $200,000. Only gain above the exclusion ever counts toward that line.

The sale price at which a home starts to be taxed

The exclusion covers the gain, not the price. So the price at which tax begins depends on what you paid. The table assumes selling costs of 6% of the sale price and no improvements. Up to these prices the sale owes no tax.

You paidSingle: taxed above a sale price ofMarried filing jointly: taxed above
$200,000$478,723$744,681
$300,000$585,106$851,064
$400,000$691,489$957,447
$500,000$797,872$1,063,830
$750,000$1,063,830$1,329,787

A single owner who paid $300,000 owes nothing until the house sells for more than $585,106, almost double. For a couple the line is $851,064. Improvements add to your basis, so they push these prices higher. Worked out with the $250,000 and $500,000 exclusions for an owner who meets the two-year rule.

A partial exclusion if you move early

If you sell before two years because of a new job at least 50 miles farther away, a health reason or an event you could not foresee, you get a share of the exclusion. The share is the time you lived there divided by two years.

Twelve months in the home gives a single owner half of $250,000, so $125,000 of gain is free of tax.

When part of the gain stays taxable

  • Depreciation. If you claimed depreciation for a home office or for a time the house was rented, that amount is taxed when you sell, at up to 25%. The exclusion does not cover it.
  • Time as a rental or second home first. If the house was a rental or holiday home before you moved in, the share of the gain that matches those years, counted from 2009, cannot be excluded.
  • A second sale inside two years. The exclusion can be used once every two years.

After a death or a divorce

A surviving spouse who has not remarried can still use the $500,000 exclusion if the home is sold within two years of the death. After a divorce, time your former spouse lived in the home under the divorce agreement counts as your own use, so the owner who moved out can still qualify.

What this calculator leaves out

The sums are for a single filer who takes the standard deduction, at 2026 rates. Losses carried over from earlier years, the alternative minimum tax and city or county income taxes are not included.

State tax is worked out as if the state taxed the gain like any other income, which most do. A few give long-term gains a discount that is not modelled here.

The partial exclusion and the rules for depreciation and earlier rental use are described above but not worked out by the form: enter the exclusion you are entitled to by choosing the closest option.

This page is for the home you live in. For land, a second home or a rental, use the real estate capital gains tax calculator.

Common questions

How is capital gains tax on a home sale calculated?

Work out the gain: sale price less selling costs, less what you paid and spent on improvements. Take off the $250,000 or $500,000 exclusion. What is left is taxed at the long-term rates of 0%, 15% or 20%, plus state tax.

Do I have to report the sale of my home?

If the whole gain is covered by the exclusion and you did not get a Form 1099-S, you do not have to report it. If you received that form, or part of the gain is taxable, the sale goes on your return.

Can I deduct a loss on my home?

No. A loss on the sale of the home you live in is a personal loss and cannot be deducted.

Do I pay capital gains tax when I sell my house?

Not on the first $250,000 of gain if you are single, or $500,000 if married filing jointly, provided you owned and lived in the home for two of the last five years.

Do I have to buy another home to avoid the tax?

No. That rule ended in 1997. The exclusion applies whatever you do with the money.

Is there an exclusion for people over 55?

Not any more. The one-time exclusion for over-55s was replaced in 1997 by the current rule, which applies at any age.

Does the exclusion apply to a rental or second home?

No. It is for your main home only. Time when the home was rented out after 2008 can also reduce the exclusion.