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.
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:
- Amount realized = sale price minus selling expenses (real estate commissions, some closing costs, legal fees tied to the sale).
- Adjusted basis = what you originally paid, plus the cost of capital improvements you made over the years, minus certain items such as depreciation you claimed if part of the home was ever a rental or home office.
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
| Step | Example |
|---|---|
| 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:
- Ownership test: you owned the home for at least 2 years (24 months) during that 5-year window.
- Use test: you lived in it as your main home for at least 2 years (24 months, or 730 days) during that same window.
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:
- Your gain exceeds the exclusion. If a married couple has a $700,000 gain, the first $500,000 is excluded and the remaining $200,000 is taxable.
- It is not your main home. The exclusion is only for your primary residence. A vacation house, second home, or pure rental property does not qualify, and its full gain is generally taxable.
- You did not meet the 2-year tests. If you owned or lived in the home for less than 2 years and none of the partial-exclusion exceptions apply, you may owe on the whole gain.
- You owned it a short time. If you owned the home for one year or less, any gain is a short-term capital gain, taxed at your ordinary income rate rather than the lower long-term rates.
- You reused the exclusion too soon. Claiming it on another sale within the prior two years can disqualify this one.
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.