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·10 min read
Rate data reviewed recently·Methodology →

Turn this guide into a decision

Read the guidance, then compare current options and run the numbers for your situation.

$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.

Quick answer

Most home sellers owe no federal capital gains tax at all. The Section 121 exclusion shields up to $250,000 of gain for single filers and $500,000 for married couples filing jointly, as long as you owned and lived in the home for at least two of the five years before the sale. You are only taxed on gain, sale price minus your adjusted cost basis, not on the sale price itself, and documented capital improvements raise that basis and shrink the taxable amount further. Sold early for a job move, health reason, or other qualifying event? You may still get a prorated partial exclusion instead of owing tax on the full gain. If you are weighing whether to sell now or refinance and stay, run both paths through SwitchWize's Money Map before deciding. Understanding how capital gains tax on home sale is calculated helps you plan strategically and maximize your exclusion benefit.

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:

Single
Maximum gain excluded
$250,000
Married filing jointly
Maximum gain excluded
$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.

Room addition or finished basement
Does not raise basis (repairs/maintenance)
Repainting a room
New roof or new HVAC system
Does not raise basis (repairs/maintenance)
Fixing a leak or patching drywall
Renovated kitchen or bathroom
Does not raise basis (repairs/maintenance)
Replacing a broken window pane
New driveway or fence
Does not raise basis (repairs/maintenance)
Routine 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.

Where You Likely Stand

Gain under $250,000 single or $500,000 married, test passed
What it likely means
No federal capital gains tax owed on the sale
Gain above the exclusion threshold
What it likely means
Only the excess is taxed at capital gains rates, not the full gain
Sold before the 2-year mark for a qualifying reason
What it likely means
A prorated partial exclusion may still apply
Selling a second home or former rental
What it likely means
The exclusion does not apply, and depreciation recapture may add tax

Not sure which bucket you fall into, or how documented improvements change the math? Run the actual numbers through SwitchWize's Capital Gains Tax Calculator rather than estimating by hand.

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.

Main home, 2-of-5-year test passed
Section 121 exclusion applies?
Yes
Notes
Up to $250,000 single / $500,000 married
Second home or vacation home
Section 121 exclusion applies?
No
Notes
Gain is generally fully taxable
Former rental, now main home
Section 121 exclusion applies?
Partially
Notes
Depreciation recapture still applies even if other gain is excluded
Pure rental, never a main home
Section 121 exclusion applies?
No
Notes
Full gain taxable, plus depreciation recapture

Selling vs. Staying Put

If the sale is not urgent, it is worth comparing the tax-free proceeds of selling against simply refinancing and staying, especially since the 30-year mortgage rate environment as of September 2026 (currently around 7.03% on a conventional loan) affects what a next home, or a cash-out refinance on this one, actually costs. See how to refinance your mortgage if staying and pulling equity out looks more attractive than selling once you run both numbers.

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.

What to Do Now

1
Calculate your gain: sale price minus selling costs minus your adjusted cost basis.
2
Confirm you meet the 2-of-5-year ownership-and-use test for your main home.
3
Gather documentation for every capital improvement to maximize your basis.

Sources

This guide is based on IRS Topic 701, Sale of Your Home and IRS Publication 523, Selling Your Home, the two primary IRS references for the Section 121 exclusion, the ownership-and-use test, and depreciation recapture. Exclusion amounts and filing thresholds are set by statute and adjust only when Congress changes them; verify the current-year figures directly at IRS.gov before filing.

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.
Newsletter

The 5-minute money briefing

One email per week. New rates, fed moves, and what to actually do about them.

No spam. Unsubscribe anytime.

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?

Found an inaccurate, outdated, or missing claim? Report a correction. We verify reports against the relevant source before changing a guide or ranking.

Why SwitchWize

SwitchWize was founded on the simple belief that banking should work for people, not the other way around. We break down information barriers with transparent rate comparisons, clear guidance, and simple tools — so every American can decide with confidence.

Read our full ethos