Selling your home: the $250k/$500k capital gains exclusion
The biggest tax break most families ever get — how Section 121 works, and the paperwork habit that can save you five figures.
When you sell your home for more than you paid, that profit is a capital gain — but unlike stock gains, the tax code hands homeowners an enormous shield. Section 121 lets you exclude up to $250,000 of gain if single, $500,000 if married filing jointly, completely tax-free. No age requirement, no rollover into a new house, reusable every two years. For most families it's the largest single tax break of their lives. And with home prices where they are, a growing number of longtime owners are quietly outgrowing it — which is where the paperwork habit comes in.
The two tests you must pass
- Ownership test: you owned the home for at least 2 of the 5 years before the sale.
- Use test: it was your main home for at least 2 of those 5 years. The two years don't need to be continuous, and for married couples only one spouse must pass ownership, but BOTH must pass use for the full $500k.
- Frequency limit: you can't have used the exclusion on another home sale within the previous 2 years.
- Partial exclusion: fail the tests because of a job relocation (50+ miles), health reasons, or qualifying 'unforeseen circumstances' (divorce, multiple births, death), and you get a prorated exclusion — living there 12 of the 24 months gets you half the cap, which is still plenty for most gains.
The math, start to finish
Basis: the paperwork that becomes money
Capital improvements raise your basis; repairs don't. A new roof, addition, remodel, HVAC system, deck, fence, or finished basement counts. Fixing a leak, repainting a room, or replacing a broken window pane doesn't. The IRS distinction is roughly 'adds value or prolongs life' versus 'maintains condition.' Keep a single folder (digital is fine) with every improvement invoice for as long as you own the home plus three years after selling. Nobody regrets this folder; plenty of people staring at a $700,000 gain regret not having it.
If your gain exceeds the exclusion
- Only the excess is taxed, at long-term capital gains rates (0%, 15%, or 20%) plus the 3.8% net investment income tax at higher incomes.
- Rebuild your basis first — decades of forgotten improvements routinely knock tens of thousands off the taxable gain.
- Time the sale for a lower-income year if you can (retirement year, sabbatical), since the gains bracket keys off your total income.
- A big gain year is the perfect year to harvest losses in your brokerage account and to bunch charitable giving.
- Widowed? The two-year window matters enormously — and the half of the home inherited from a spouse gets a stepped-up basis on top of it.
What raises basis — and what doesn't
| Expense | Raises basis? | Notes |
|---|---|---|
| Kitchen or bath remodel | Yes | Full cost, including labor |
| New roof, HVAC, water heater | Yes | Replacement systems count |
| Addition, deck, fence, driveway | Yes | Anything that adds to the home |
| Landscaping (permanent) | Yes | Trees, retaining walls, sprinklers |
| Repainting a room | No | Maintenance, not improvement |
| Fixing a leak or broken window | No | Repairs maintain, don't add |
| Closing costs at purchase | Yes (most) | Title, legal, recording fees |
| Mortgage interest / insurance | No | Never basis; separate deductions |
Why this matters more every year
The $250,000/$500,000 caps were set in 1997 and have never been adjusted for inflation. Median home prices have roughly quadrupled since then, which means a threshold designed to exempt virtually everyone now catches ordinary long-tenured owners in expensive metros — a couple who bought a Bay Area or Seattle house in the late 1990s can be sitting on a seven-figure gain with a half-million-dollar shield. Congress periodically proposes indexing the exclusion, but until that happens, the population of home sellers who owe capital gains tax grows every year, and the improvement folder shifts from nice-to-have to five-figure asset. If you've owned your home more than a decade in an appreciating market, spend one afternoon reconstructing your improvement history now, while contractors' invoices are still findable — not the week before closing twenty years from now.
The bottom line
Live in a home you own for two years and the tax code forgives up to half a million dollars of profit — the most generous recurring break most households will ever touch. Your jobs are simple: know the two-of-five-year tests before you sell, keep every improvement receipt to fatten your basis, and get real advice if the home ever did duty as a rental or office. The exclusion does the heavy lifting; the folder of receipts handles the rest.
One last timing note for anyone close to the line: the two-year clocks are measured to the day, and sellers have blown five-figure exclusions by closing a few weeks early. If you're approaching the two-year mark on either the ownership or use test, a modest delay in the closing date is usually the cheapest tax planning available in all of real estate. Conversely, if you must sell early for a qualifying reason — the job move, the health event — document the reason contemporaneously, because the partial exclusion depends on proving it.
Check your understanding
1 of 3Not quite — try again.
Get smarter about money every week
One email, no spam — practical guides and Worth updates. Unsubscribe anytime.
Put this into practice
Worth tracks your accounts, budgets, and goals — so the concepts in this article aren't just theory.
Start free trial