Skip to main content

Do You Pay Capital Gains Tax When You Sell a House?

Short answer

Usually not, if the house was your main home. You can exclude up to $250,000 of gain from your income, or up to $500,000 if you file a joint return with your spouse. To qualify, you generally must have owned and lived in the home for at least 2 of the 5 years before the sale. Any gain above your limit is taxable.

See details

How the Home Sale Exclusion Works

A capital gain is the profit from selling something for more than it cost you. To exclude that profit, you must pass two IRS eligibility tests and a timing rule.

The Ownership Test and Use Test

You must have owned the home for at least 24 months (2 years) in the 5 years before the sale date. You also must have lived in it as your main home for at least 24 months in that window. These can be different 2-year periods.

The Once-Every-2-Years Rule

You generally can’t claim the exclusion if you excluded gain from another home sale in the 2 years before this one. If you miss these rules, you may still get a partial exclusion. This can apply if you sold mainly due to a work-related move or health reasons. Certain unforeseeable events can also qualify.

Maximum Exclusion by Filing Status

Your filing status sets the maximum amount you can exclude.

Filing statusMaximum exclusion
Single or head of household$250,000
Married filing jointly$500,000

For the $500,000 limit, either spouse can meet the ownership test, but both spouses must meet the use test on their own. If you used part of the home for business or as a rental, part of your gain may be taxable.

How to Figure Your Gain on a House Sale

Your gain depends on your basis, which is generally what you paid for the home plus improvements. You can figure your gain in four steps:

  1. Add your purchase price and improvement costs to get your adjusted basis.
  2. Start with your sale price.
  3. Subtract your selling costs.
  4. Subtract your adjusted basis.

Certain fees and closing costs can also change your basis. Say you sell your home for $400,000 and pay $24,000 in selling costs. You bought it for $250,000 and spent $30,000 on a new roof, so your adjusted basis is $280,000.

Your gain is $96,000 ($400,000 minus $24,000 minus $280,000). If you pass both tests, you can exclude the full amount. If you sell at a loss, you can’t deduct it, since losses on personal-use property like your home aren’t deductible.

How Capital Gains on a House Are Taxed

Gain above your exclusion limit is taxed based on how long you owned the home. Owning it for more than one year makes it a long-term gain. One year or less makes it short-term, taxed at the same rates as your wages based on your tax bracket.

Long-term gains get lower rates of 0%, 15% or 20%, based on your filing status and taxable income (your income after deductions). Here are the tax year 2026 thresholds; the 20% rate applies above the 15% limit.

Filing status0% rate up to15% rate up to
Married filing jointly or Qualifying surviving spouse$98,900$613,700
Married filing separately$49,450$306,850
Head of household$66,200$579,600
Single$49,450$545,500

Reporting a Home Sale on Your Tax Return

Even if you owe nothing, you may have to report the sale. You must report it if either applies:

  • You received Form 1099-S, Proceeds From Real Estate Transactions, even if your gain is fully excludable.
  • You can’t exclude all of your gain.

You’ll report it on Form 8949, Sales and Other Dispositions of Capital Assets, and Schedule D (Form 1040), Capital Gains and Losses. When you e-file, you enter your sale details so these forms can be completed.

Sources