TaxesIntermediate6 min read

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

A $560,000 'gain' that owes zero tax
Marcus and Elena bought their house in 2004 for $240,000 and sell in 2026 for $800,000 — a raw gain of $560,000, which is $60,000 over the $500k married exclusion. Panic? No — the gain is measured against their cost BASIS, not their purchase price. Basis = purchase price + qualifying closing costs + capital improvements. Over 22 years they added a $45,000 kitchen remodel, a $30,000 addition, a $15,000 roof, and $12,000 of landscaping and driveway work: $102,000 of improvements. They also pay a 6% selling commission ($48,000), which reduces the sale proceeds. Taxable gain: $800,000 − $48,000 − $240,000 − $102,000 = $410,000 — comfortably under $500k. Federal tax owed: $0. Without the improvement records, their gain on paper is $512,000 and they'd owe 15% on $12,000 — $1,800 lost purely to missing receipts, and far more for bigger gains.

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.

The situations that break the exclusion
Rental and home-office use create 'depreciation recapture' — depreciation you claimed (or could have claimed) is taxed at up to 25% no matter what, and years the home was a rental before becoming your residence generate 'non-qualified use' that prorates away part of the exclusion. Widowed spouses keep the full $500k only if they sell within two years of the death. And house flippers don't qualify at all — the exclusion is for homes you actually lived in. If any of these apply, spend a few hundred dollars on a CPA before listing, not after closing.

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

ExpenseRaises basis?Notes
Kitchen or bath remodelYesFull cost, including labor
New roof, HVAC, water heaterYesReplacement systems count
Addition, deck, fence, drivewayYesAnything that adds to the home
Landscaping (permanent)YesTrees, retaining walls, sprinklers
Repainting a roomNoMaintenance, not improvement
Fixing a leak or broken windowNoRepairs maintain, don't add
Closing costs at purchaseYes (most)Title, legal, recording fees
Mortgage interest / insuranceNoNever basis; separate deductions
Improvements vs. repairs: the folder test

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 3
Under the Section 121 exclusion, how much home-sale gain can a married couple filing jointly exclude tax-free?

Not quite — try again.

The Worth letter

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