- The Section 121 exclusion lets most sellers exclude up to $250,000 of gain if single or $500,000 if married filing jointly.
- You generally must have owned and lived in the home for at least two of the five years before the sale to claim the full exclusion.
- Your gain is sale price minus your cost basis, and capital improvements you tracked raise basis and shrink the taxable gain.
The fear that selling a home triggers a big tax bill is, for most people, unfounded. The tax code includes a generous exclusion specifically for the sale of a main home, and it shields the gain most homeowners actually realize. The key is understanding what is taxed (gain, not sale price), how much is excluded, and the test you must pass to claim it.
This guide explains how capital gains tax on a home sale works in 2026: the Section 121 exclusion, the ownership-and-use test, how your basis is calculated and why improvements matter, the partial exclusion for early sales, and the rules for second homes and former rentals.
What is actually taxed: gain, not sale price
The first misconception to clear up is that you are not taxed on the price you sell for. You are taxed on your gain, which is the sale price minus your cost basis and certain selling costs. According to IRS Publication 523, if you sell your main home for more than its adjusted basis, the difference is a capital gain, and only that gain is potentially taxable.
In plain terms:
Gain = (sale price minus selling expenses) minus adjusted basis.
If you bought a home for $300,000 and sell it for $500,000, your gain is roughly $200,000, not $500,000. And as the next section shows, even that $200,000 is usually excluded entirely.
The Section 121 exclusion: $250k single, $500k married
The centerpiece of home-sale tax rules is the Section 121 exclusion. The IRS explains that if you meet the eligibility test, you can exclude from income up to:
| Filing status | Maximum gain excluded |
|---|---|
| Single | $250,000 |
| Married filing jointly | $500,000 |
This means a married couple with $200,000 of gain on their main home typically owes zero federal capital gains tax on the sale. Only gain above the applicable threshold is taxable, and that excess is taxed at capital gains rates. For the large majority of homeowners, the entire gain falls within the exclusion.
The 2-of-5-year ownership-and-use test
To claim the full exclusion, you must pass an eligibility test built around two requirements over the five years ending on the sale date. Per the IRS:
- Ownership. You owned the home for at least two years during the five-year period.
- Use. You used the home as your main home for at least two years during the five-year period.
The two years do not need to be continuous, and the ownership and use periods do not have to be the same two years, as long as each requirement is met within the window. There is also a frequency limit: you generally cannot claim the exclusion if you used it on another home sale within the prior two years.
For married couples filing jointly to claim the full $500,000, both spouses generally must meet the use requirement and at least one must meet the ownership requirement, with neither having recently used the exclusion. A couple where one spouse fails the use test may still qualify for the $250,000 single-level exclusion.
What counts as basis, and why improvements matter
Your gain depends on your adjusted basis, so understanding basis is how you legally shrink a taxable gain. Basis starts with what you paid for the home and is adjusted over time.
Capital improvements increase your basis, which lowers your gain. The IRS distinguishes improvements that add value or prolong the home's life from routine repairs and maintenance, which do not adjust basis.
| Raises basis (improvements) | Does not raise basis (repairs/maintenance) |
|---|---|
| Room addition or finished basement | Repainting a room |
| New roof or new HVAC system | Fixing a leak or patching drywall |
| Renovated kitchen or bathroom | Replacing a broken window pane |
| New driveway or fence | Routine servicing |
For sellers with gains approaching the exclusion limit, a well-documented basis can be the difference between owing nothing and owing tax on the overage.
The partial exclusion for selling early
What if you have to sell before meeting the two-year test? You may still qualify for a partial exclusion. The IRS allows a reduced exclusion if the primary reason for the sale is a qualifying circumstance, such as:
- A change in workplace location (a job-related move meeting a distance test)
- Health reasons (a move for medical care or to treat an illness)
- Certain unforeseeable events defined in the rules
The reduced exclusion is prorated based on how much of the two-year requirement you satisfied. If you lived in the home for one of the required two years and qualify, you may exclude up to half the normal limit. This safety valve keeps an early, life-driven sale from triggering an unexpected tax bill on the full gain.
Reporting the sale
If your entire gain is excluded and you did not receive a Form 1099-S for the sale, you generally do not have to report the sale on your tax return. If you received a 1099-S, or if part of your gain is taxable, you report the sale, typically on Form 8949 and Schedule D, and claim the exclusion there. The IRS provides the current reporting instructions, which you should confirm at filing time. When gain exceeds the exclusion or other complications apply, a tax professional is worth the cost.
A scenario
Priya and Sam, married filing jointly, bought their home for $320,000. Over the years they spent $80,000 on a kitchen renovation, a new roof, and an addition, all documented. Their adjusted basis is now $400,000. They sell for $760,000 with $40,000 in selling costs.
Their gain: $760,000 minus $40,000 selling costs minus $400,000 basis, which is $320,000. Because they meet the 2-of-5-year test and file jointly, they exclude up to $500,000. Their entire $320,000 gain is excluded, and they owe no federal capital gains tax. Had they not tracked the $80,000 of improvements, their gain would have been $400,000, still under the limit here, but for a larger sale that missing basis could have meant a real tax bill.
Second homes, rentals, and depreciation recapture
The exclusion is for your main home only. A second home or vacation home that is not your principal residence does not qualify, and gain on its sale is generally taxable.
Rentals add another layer. If a property was rented and you claimed depreciation deductions, the tax code recaptures that depreciation when you sell. The IRS notes that depreciation claimed after a certain date cannot be excluded under Section 121 and is taxed, even if the rest of the gain qualifies. So if you converted a former rental into your main home, you may exclude much of the gain but still owe tax on the recaptured depreciation. These mixed-use situations are exactly where professional guidance pays off.
Frequently asked questions
Is the gain on my home taxed at ordinary income rates? No. Gain above the exclusion on a home held more than a year is taxed at long-term capital gains rates, which are generally lower than ordinary rates.
Can I use the exclusion more than once? Yes, but not more often than once every two years. You generally cannot claim it if you used it on another home sale within the prior two years.
Does paying off my mortgage affect the gain? No. The mortgage payoff affects your cash proceeds, not your taxable gain. Gain is based on sale price and basis, not your loan balance.
This guide is educational and not financial, legal, or tax advice. Tax rules change and individual situations vary; confirm current rules with the IRS and consult a qualified tax professional before relying on the exclusion.
Sources: IRS Topic 701, Sale of Your Home, IRS Publication 523, Selling Your Home.
Frequently Asked Questions
How much capital gains tax do I pay when I sell my home?
What is the 2-of-5-year rule for selling a home?
Do home improvements reduce capital gains tax?
Can I exclude gain if I sell before living there two years?
Does the exclusion apply to a rental or second home?
Answer a few questions about your situation and goals. Money Map points you to the highest-value next step across savings, mortgage, cards, and debt.
Editorial review
What changed since the last update
Was this guide helpful?