The One Number That Matters
Sell your house at a profit and the first question isn't "what's my tax rate." It's "how much of this gain is invisible to the IRS." For most people, the answer is a lot of it — and for a growing minority, not nearly enough.
The rule is Section 121 of the tax code. It lets you wipe out up to $250,000 of gain on the sale of your main home if you're single, or $500,000 if you're married filing jointly. Not deferred. Not taxed at a lower rate. Just gone, excluded from income entirely, as if it never happened.
That's an enormous benefit. It's arguably the single best tax break the average American ever gets, and most homeowners use it without ever knowing its name. But it has cracks. The number hasn't moved in nearly thirty years, the tests trip people up, and the gain that spills over the cap gets taxed at full freight. So let's walk it.
§ 01How the Exclusion Actually Works
Your gain is not your sale price. It's the sale price minus your "basis" — roughly what you paid plus what you put into the house. We'll come back to basis, because people get it badly wrong and overpay. But assume for now you've got the number.
Say you're single. You bought for $400,000, you're selling for $620,000, and your basis after improvements is $440,000. Your gain is $180,000. That's under $250,000, so the whole thing is excluded. You owe zero federal capital gains tax. You don't even report the sale unless you receive a Form 1099-S.
Now flip it. Same house, but you're married and you're selling for $1.05 million on a $440,000 basis. Gain is $610,000. You exclude $500,000. The remaining $110,000 is a long-term capital gain, taxed at 0%, 15%, or 20% depending on your income — and possibly hit with the 3.8% surtax on top. That's the part that surprises people. The exclusion is generous, but it's a ceiling, not a guarantee.
Want to see what that $110,000 overflow actually costs at your income? Drop it into the capital gains calculator — it'll stack the gain on your other income and show the federal, NIIT, and state pieces.
§ 02The Two Tests You Have to Pass
To claim the full exclusion you have to clear two hurdles, and they're separate.
The ownership test. You owned the home for at least 24 months out of the five years ending on the sale date.
The use test. You lived in it as your principal residence for at least 24 months out of that same five-year window.
The 24 months don't have to be continuous. You can move out, rent it for a while, move back — what counts is the total time inside the five-year lookback. And there's a third, quieter rule that catches flippers: you can't have claimed the Section 121 exclusion on another home sale in the two years before this one. One bite every two years.
For married couples the tests split in a particular way. Only one spouse needs to pass the ownership test, but both have to pass the use test to get the full $500,000. If only one spouse lived there two years, you're capped at $250,000. This trips up newlyweds who sell one partner's pre-marriage house too soon.
§ 03Why the Cap Is a Problem Now
Here's the part Congress would rather you didn't notice. The $250,000 and $500,000 figures were set by the Taxpayer Relief Act of 1997. They have never been indexed to inflation. They are the exact same numbers today as they were when a gallon of gas cost $1.22.
The standard deduction adjusts every year. Tax brackets adjust. The estate tax exemption adjusts. This one doesn't. And in the meantime, the median US home price has roughly tripled. A couple who bought a modest place in San Jose or Seattle in 2002 and is selling in 2026 can easily be sitting on $800,000 of gain — $300,000 of which is now fully taxable.
This is why the home-sale exclusion has crept onto the policy agenda. There have been repeated proposals — the "More Homes on the Market Act" among them — to double the caps or finally index them. As of mid-2026, none has passed. So the planning has to assume the frozen number, and for longtime owners in expensive metros, that increasingly means a real tax bill.
§ 04What Happens to the Gain Above the Cap
Spill over the exclusion and the excess is a plain long-term capital gain — assuming you owned the house more than a year, which by definition you did if you passed the ownership test. So it rides the 2026 long-term brackets:
| Rate | Single (taxable income) | Married Filing Jointly |
|---|---|---|
| 0% | Up to $49,450 | Up to $98,900 |
| 15% | $49,450 – $545,500 | $98,900 – $613,700 |
| 20% | Over $545,500 | Over $613,700 |
And remember the gain stacks on top of your other income. If you and your spouse have $200,000 of ordinary taxable income and a $110,000 taxable home gain, that gain mostly sits in the 15% band. But sell a big enough house and the top slice can tip into 20% — plus the 3.8% Net Investment Income Tax once your modified AGI clears $250,000 (married) or $200,000 (single). In a high-tax state, your all-in rate on that overflow can brush 30%.
§ 05Your Basis Is Bigger Than You Think
This is where people leave money on the table. Your basis isn't just the purchase price. It's the purchase price plus capital improvements — and most homeowners forget to track them across a decade of ownership.
What counts: a new roof, an addition, a kitchen remodel, central air, a finished basement, new windows, landscaping that adds value, a replaced HVAC system. What doesn't: routine repairs and maintenance — fixing a leak, repainting, patching the driveway. The line is "does it add value or extend the home's life" versus "does it just keep things working."
Every dollar of qualifying improvement raises your basis, which lowers your gain, which can be the difference between fitting under the exclusion and owing tax. A couple who put $90,000 into renovations over fifteen years and never kept the receipts can hand the IRS a few thousand dollars they didn't owe. Keep the records. Closing costs and selling costs — the agent's commission especially — come off the gain too.
§ 06The Partial Exclusion Nobody Claims
Didn't live there a full two years? You're not automatically locked out. If you sold early for a qualifying reason, you get a prorated exclusion — and people miss this constantly.
The qualifying reasons are a change in place of employment, a health issue, or "unforeseen circumstances" the IRS recognizes — divorce, a job loss, multiple births from a single pregnancy, a natural disaster, and others spelled out in Pub. 523. If you lived there 12 of the 24 months and had to relocate for a new job 400 miles away, you don't get the full $250,000 — you get half of it, $125,000. That's still a $125,000 exclusion most people in that spot don't realize they qualify for.
The proration is based on the shortest of the time periods you met, divided by 24 months, times the full cap. It's a real number and it's worth running before you assume an early sale costs you the whole break.
§ 07The Home-Office and Rental Trap
If you ever rented the place out or claimed depreciation for a home office, the exclusion doesn't fully cover you. Any depreciation you took (or were allowed to take) after May 6, 1997 is recaptured — taxed at a maximum 25% rate — and it can't be excluded under Section 121. The exclusion erases appreciation, not depreciation.
So a house you lived in but also ran a depreciated home office out of for years has two layers at sale: the appreciation (potentially excluded) and the recaptured depreciation (taxed at up to 25%, no exclusion). It's not a reason to skip the home-office deduction while you own — it's a reason to know the bill is coming when you sell.
And if the property converted from a rental to your residence, there's a "non-qualified use" rule that can prorate the exclusion based on the years it wasn't your home. This is the corner of Section 121 where you genuinely want a professional running the numbers.
§ 08What to Do Before You Sell
Most of the value here is in the prep, not the filing. A short list:
- Reconstruct your basis. Pull every improvement receipt you can find. This is the highest-leverage hour you'll spend.
- Check the two-year clock. If you're a few months short of 24 months of use, waiting can be worth tens of thousands. If a qualifying life event forced the sale, run the partial exclusion.
- Mind the timing of a big overflow. If your gain exceeds the cap, the taxable slice stacks on your income — selling in a lower-income year (between jobs, post-retirement) can drop the overflow from the 20% band to 15%, or even 0%.
- Couples, both live there. Don't sell one spouse's pre-marriage home before both of you clear the two-year use test, or you forfeit half the exclusion.
- Spilling well over the cap? Consider loss harvesting elsewhere. A taxable home gain can be offset by realized capital losses in your brokerage account. See tax-loss harvesting and the wash sale rule.
§ 09Key Takeaways
The exclusion is $250,000 single, $500,000 married — and it's a ceiling. Profit under it is invisible to the IRS. Profit over it is a long-term capital gain at 0/15/20% plus possible NIIT.
You need two of the last five years of ownership and use, and you can't have used the exclusion in the prior two years.
The cap is frozen at 1997 levels. In expensive markets, longtime owners increasingly blow past it — basis tracking and sale timing are what limit the damage.
Depreciation and rental use punch holes in it. Recaptured depreciation is taxed up to 25% and can't be excluded.
Run your specific gain through the capital gains calculator to see what, if anything, you'd owe on the overflow — then read the full 2026 capital gains guide for the rates and strategies behind it.
Sources: IRC §121 (exclusion of gain from sale of principal residence); IRS Topic No. 701 and Publication 523 (Selling Your Home); IRS Rev. Proc. 2025-32 (2026 long-term capital gains breakpoints); IRC §1411 (Net Investment Income Tax). This is general information, not tax advice.