Tax · Guide

Capital Gains Tax on Home Sale 2026

How capital gains tax on a home sale works in 2026: the Section 121 exclusion, the 2-of-5-year test, how basis cuts your gain, partial exclusions, and rentals.

·Jun 25, 2026·8 min read
Rate data reviewed recently·Methodology →
$250k
Single exclusion
Section 121
$500k
Married exclusion
Filing jointly
2 of 5
Ownership and use
Main-home test
!The Bottom Line

Most home sellers owe no capital gains tax because the Section 121 exclusion shields up to $250,000 of gain if single or $500,000 if married, provided you pass the 2-of-5-year ownership-and-use test, and capital improvements you tracked further cut any taxable gain.

Key Takeaways
  • 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 statusMaximum 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.

It is gain, then exclusion
Two filters stand between your sale and any tax. First, only your gain is in play, not the sale price. Second, the Section 121 exclusion wipes out up to $250,000 or $500,000 of that gain. Most sellers clear both and owe nothing.

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 basementRepainting a room
New roof or new HVAC systemFixing a leak or patching drywall
Renovated kitchen or bathroomReplacing a broken window pane
New driveway or fenceRoutine servicing
⚠️ Important
Keep records of every capital improvement for as long as you own the home, and longer. Without documentation, you cannot prove a higher basis, and you may pay tax on gain you could have excluded. Receipts, invoices, and contracts are what protect the basis adjustment.

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.

The Bottom Line
Most home sellers owe no capital gains tax: the Section 121 exclusion shields up to $250,000 of gain if single or $500,000 if married, provided you pass the 2-of-5-year ownership-and-use test, and documented improvements further cut any taxable gain.

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?
Often none, thanks to the Section 121 exclusion. If you meet the ownership and use test, you can exclude up to $250,000 of gain if single or $500,000 if married filing jointly. You only owe tax on gain above the exclusion, and only on actual gain, not the full sale price.
What is the 2-of-5-year rule for selling a home?
To claim the full Section 121 exclusion, you generally must have owned the home and used it as your main home for at least two of the five years before the sale. The two years do not have to be continuous, and ownership and use can be met in different periods within that window.
Do home improvements reduce capital gains tax?
Yes. Capital improvements add to your cost basis, which lowers your taxable gain. Things like a new roof, an addition, or a renovated kitchen raise basis; routine repairs and maintenance generally do not. Keep records of improvement costs.
Can I exclude gain if I sell before living there two years?
Sometimes. A partial exclusion may be available if the sale is due to a qualifying reason such as a job-related move, health, or certain unforeseeable events. The exclusion is prorated based on how much of the two-year requirement you met.
Does the exclusion apply to a rental or second home?
No. The Section 121 exclusion applies to your main home, not a second home or a pure rental. If a property was once a rental and you claimed depreciation, you also face depreciation recapture, which is taxed even if other gain is excluded.
Next step
Find your best money move in 90 seconds.

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

Reviewed dataRate references, product links, and dated claims were checked against current SwitchWize sources.
Updated contextRelated calculators, Money Map paths, and offer links were refreshed for this article topic.
StandardsReviewed under the SwitchWize editorial policy. See standards →

Was this guide helpful?