Taxes

The home sale capital gains exclusion, explained

5 min read · Updated 2026-07-07

When you sell your main home at a profit, a large slice of that profit can be excluded from federal tax. Understanding how much — and what happens above that line — is the difference between a pleasant surprise and an expensive one.

The numbers

Under Section 121 of the tax code, you can exclude up to $250,000 of gain if you file single, or $500,000 if you're married filing jointly, on the sale of a primary residence. Gain above that exclusion is taxed as a long-term capital gain — generally 15%, 20%, or 23.8% (with the net investment income tax) depending on your income.

Who qualifies — the 2-of-5-year test

To claim the full exclusion, you generally must have owned and used the home as your main residence for at least 2 of the 5 yearsbefore the sale. The two years don't have to be continuous. Miss the test and you may get only a partial exclusion, or none — a situation worth reviewing with a tax professional.

Why basis matters most above the exclusion

Here's the mechanic that makes documentation valuable. Your taxable gain is:

sale price − selling costs − adjusted cost basis − exclusion

Once your gain crosses the exclusion, every dollar of documented improvement in your basis reduces the taxable amount dollar-for-dollar — worth roughly 15 to 23.8 cents in federal tax per dollar. On a heavily renovated home, that adds up fast. You can estimate your own number in a minute.

The catch nobody plans for: the exclusion is frozen

Congress set the $250,000 / $500,000 caps in the Taxpayer Relief Act of 1997 and never indexed them to inflation. As home prices climbed, the share of sellers whose gain could be exposed to capital-gains tax has risen from roughly 3% when the caps were enacted to about half of home sales by 2025, according to the Congressional Research Service (RL32978). Indexed to home-price growth since 1998, those caps would be roughly $720,000 and $1.44 million today.

The practical takeaway: even if you're comfortably under the exclusion selling today, appreciation keeps pushing sellers over the line — and the only thing that lowers the bill then is improvements you can prove. Starting the record now is the cheap insurance.

Track it before you forget it

Log your improvements, classified against IRS Pub 523, with the proof kept for the day you sell. Free to start.

For informational and documentation purposes only. This is not tax, legal, or accounting advice and is not a substitute for a CPA. Classifications reference IRS Publication 523 but do not determine whether a specific cost qualifies. Verify with a qualified tax professional before filing.