📋 The Boring Thing

Do You Pay Capital Gains When You Sell Your House?

For most people selling the home they live in, the answer is no — you probably will not owe federal capital gains tax. A rule called the Section 121 exclusion lets you shield up to $250,000 of profit if you are single, or up to $500,000 if you are married filing jointly, as long as the home was your main home and you meet a couple of time-based tests. You only owe tax on the profit above that exclusion, and even then only if you have profit at all.

Not tax advice. This is general information, not tax or legal advice, and tax rules change. For your situation, see IRS Publication 523 and Topic No. 701, and consult a qualified tax professional.

Key takeaways

  • Capital gains tax applies to your profit, not your sale price.
  • The IRS Section 121 exclusion covers up to $250,000 of gain (single) or $500,000 (married filing jointly) on your main home.
  • To qualify, you generally must have owned and lived in the home for at least 2 of the last 5 years.
  • You typically owe only on gain above the exclusion, on a second home or rental, or if you fail the tests.
  • Losses on a personal home are not deductible.

Capital gains tax is on your profit, not your sale price

This is the single most common misunderstanding, so it is worth being precise. If you sell your house for $600,000, you are not taxed on $600,000. You are taxed — if at all — on your gain, which is roughly what you cleared after buying it, improving it, and paying to sell it.

The IRS defines your gain as the amount realized minus your adjusted basis:

So a family that bought a house for $300,000, spent $60,000 on a new roof, an addition, and a kitchen renovation, and later sold for $600,000 after $36,000 in commissions has an amount realized of $564,000 and an adjusted basis of $360,000. Their gain is $204,000 — comfortably under the exclusion, so no federal capital gains tax. The lesson: track your improvements, because they directly shrink your taxable gain. We walk through this in detail in how to avoid capital gains on a home sale.

How to compute your gain, simply

StepExample
Sale price$600,000
Minus selling expenses (commissions, etc.)− $36,000
= Amount realized$564,000
Original purchase price$300,000
Plus capital improvements+ $60,000
= Adjusted basis$360,000
Gain (amount realized − adjusted basis)$204,000

Once you know your gain, compare it to your exclusion. If your gain is smaller than the exclusion you qualify for, you generally owe nothing at the federal level.

The 2-of-5-year tests, in plain English

The exclusion is not automatic. You have to pass two tests, both measured over the 5-year period ending on the date you sell:

A helpful detail: those 2 years do not have to be continuous. You could live in the home, move out for a while, move back, and still add up your months of use. And for a married couple filing jointly hoping to claim the full $500,000, both spouses must meet the use test, but only one needs to meet the ownership test. There is also a once-every-two-years limit: you generally cannot use the exclusion if you already used it on another home sale within the two years before this one. We break all of this down, with worked examples, in the home-sale capital gains exclusion explained.

When you actually would owe capital gains tax

There are a handful of situations where the tax shows up:

The rates, in brief

If you owned the home more than one year and have taxable gain left after the exclusion, that gain is generally taxed at long-term capital gains rates: 0%, 15%, or 20% at the federal level, depending on your taxable income. Lower-income sellers can genuinely land in the 0% bracket. If you owned the home one year or less, the gain is short-term and taxed as ordinary income, which is usually higher.

Two more things can nudge the bill up. Higher-income taxpayers may also owe the 3.8% Net Investment Income Tax on taxable gain. And many states tax capital gains on top of the federal amount, so your total can be higher than the federal rate alone. Check your own state's rules.

Reporting basics

Whether you have to report the sale depends partly on a form. If you receive a Form 1099-S for the sale, you must report it on your return — using Form 8949 and Schedule D — even if the entire gain is excluded. If your gain is fully excluded and you did not receive a 1099-S, you generally do not have to report the sale at all. Either way, keep your records: closing statements, receipts for improvements, and proof of how long you lived there. If the IRS ever asks, those documents are what prove your basis and your eligibility.

The short version

Selling your main home rarely triggers capital gains tax, because the exclusion is large and most gains fall under it. You owe when your gain is unusually big, when the property is not your primary residence, or when you fall short of the ownership and use tests. Figure out your gain first, compare it to your $250,000 or $500,000 exclusion, and you will usually have your answer. And remember one asymmetry: gains on a personal home can be taxed, but losses on a personal home are never deductible.

Frequently asked questions

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

Often you do not. If the home was your main residence and you owned and lived in it for at least two of the last five years, the IRS lets you exclude up to $250,000 of gain if single, or $500,000 if married filing jointly. You only owe tax on gain above that.

Is the capital gain based on the sale price?

No — it is based on your profit. Gain equals your selling price minus selling costs, minus your cost basis (what you paid plus qualifying improvements). Many sellers overestimate their taxable gain because they forget to add improvements to their basis.

What if my gain is under the exclusion amount?

If your gain is fully covered by the exclusion and you did not receive a Form 1099-S, you generally do not even have to report the sale on your tax return. Keep your records in case the IRS asks.