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.
- 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:
- Maximum gain excluded
- $250,000
- 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.
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.
- Does not raise basis (repairs/maintenance)
- Repainting a room
- Does not raise basis (repairs/maintenance)
- Fixing a leak or patching drywall
- Does not raise basis (repairs/maintenance)
- Replacing a broken window pane
- Does not raise basis (repairs/maintenance)
- 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.
Where You Likely Stand
- What it likely means
- No federal capital gains tax owed on the sale
- What it likely means
- Only the excess is taxed at capital gains rates, not the full gain
- What it likely means
- A prorated partial exclusion may still apply
- 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.
- Section 121 exclusion applies?
- Yes
- Notes
- Up to $250,000 single / $500,000 married
- Section 121 exclusion applies?
- No
- Notes
- Gain is generally fully taxable
- Section 121 exclusion applies?
- Partially
- Notes
- Depreciation recapture still applies even if other gain is excluded
- 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
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?
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?
The 5-minute money briefing
One email per week. New rates, fed moves, and what to actually do about them.
No spam. Unsubscribe anytime.
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?
Found an inaccurate, outdated, or missing claim? Report a correction. We verify reports against the relevant source before changing a guide or ranking.