Selling a home you have lived in can shield a large share of the gain from tax.

Couple sitting among moving boxes in new home

Decades of ownership can turn a modest home purchase into a six-figure paper profit, and the prospect of surrendering part of it at tax time keeps some retirees from selling at all. A long-standing provision in the tax code was built for exactly that situation, letting a qualifying seller keep a large slice of the gain out of taxable income entirely. The break matters most for people who bought a house long ago, watched its value climb, and are now weighing a move to something smaller.

How the home-sale exclusion works

Under the rule the IRS calls the exclusion on the sale of a main home, a single filer can exclude up to $250,000 of capital gain from the sale, and a married couple filing jointly can exclude up to $500,000, according to IRS Topic No. 701. The exclusion applies to the gain, not the sale price, so it is measured against the profit above what the owner originally paid plus the cost of qualifying improvements over the years.

That distinction is where many sellers miscount. Someone who bought a house for $90,000 in the 1980s and sells it for $520,000 has a raw gain near $430,000, but a home addition, a new roof, and other capital improvements raise the cost basis and shrink the taxable figure. For a married couple, the first $500,000 of that adjusted gain can escape tax completely, often leaving little or nothing to report.


Free retirement updates: Keeping more of a lifetime of savings often comes down to knowing which rules apply before a big transaction. Get free, plain-English updates that help retirees hold on to more of their money.

The ownership and use tests that unlock it

Qualifying for the full exclusion turns on two separate tests. The ownership test requires that the seller owned the home for at least two of the five years ending on the sale date, and the use test requires that it served as a main residence for at least two of those same five years. The two-year periods do not have to overlap, which gives some flexibility to owners whose living situations changed near the end.

For a couple filing jointly to claim the full $500,000, either spouse can satisfy the ownership test, but both generally must meet the use test, and neither can have claimed the exclusion on another home sale within the prior two years. That last limit means the break is not available on back-to-back sales; it can generally be used only once every two years.

When part of the gain still gets taxed

Gain above the exclusion amount is treated as a capital gain and taxed at long-term rates for a home held more than a year. A single seller with an $80,000 gain owes nothing, while a single seller with a $400,000 gain excludes $250,000 and reports the remaining $150,000. Depreciation claimed on the property, such as for a home office or a rental period, generally cannot be excluded and is recaptured separately.

Sellers who fall short of the two-year tests are not always shut out. A partial exclusion may be available when the sale is tied to a change in workplace, a health condition, or certain unforeseen circumstances, prorated based on the time the tests were met. Widows and widowers have a narrower opening as well: a surviving spouse can generally claim the full $500,000 exclusion if the home is sold within two years of the spouse’s death and the other conditions are satisfied.

Which improvements raise the cost basis

Because the exclusion is measured against gain rather than sale price, the cost basis is the number that decides how much profit is even taxable, and years of home improvements can lift it substantially. The tax code separates capital improvements, which add to basis, from routine repairs, which do not. Additions such as a new room, a finished basement, a replacement roof, central air conditioning, updated plumbing or wiring, and a kitchen remodel generally count, as the agency spells out in Publication 523 on selling a home. Ordinary upkeep, such as repainting a wall, fixing a leak, or patching a floor, does not.

The practical hurdle is proof. A seller who claims a higher basis needs records to back it up, which is why keeping receipts, contracts, and permits across decades of ownership pays off at closing. For a house improved steadily over thirty or forty years, the accumulated basis can be tens of thousands of dollars above the original purchase price, pulling the taxable gain well below the exclusion line before the $250,000 or $500,000 break is even applied.

Reporting the sale even when nothing is owed

A tax-free result does not always mean a silent one. If a seller receives a Form 1099-S reporting the transaction, the sale must be reported on the tax return even when the entire gain is excluded, as the agency notes in its real estate tax tips. The sale also must be reported whenever any part of the gain cannot be excluded.

The practical takeaway for an older homeowner weighing a move is to add up every capital improvement made over the years before assuming a large tax bill is coming, since those costs raise the basis and can pull the taxable gain below the exclusion line. Keeping the closing statements, improvement receipts, and prior-return records makes the difference between a smooth filing and a scramble, especially for a house that has appreciated for thirty or forty years.

This article was researched and drafted with the assistance of AI and reviewed by The Financial Wire editorial team.

More Financial Reading

Leave a Reply

Your email address will not be published. Required fields are marked *