For a household that bought its home decades ago, the sale price on the way out can be several times what was paid on the way in. That built-in gain is exactly what the tax code treats as taxable profit, and on a long-held property in an appreciated market it can reach well into six figures. A single provision in the federal rules is the reason most retirees never write a check on it: the home-sale exclusion, which erases a large slice of that gain before the Internal Revenue Service can touch it.
The Section 121 exclusion and the two tests behind it
The break lives in Section 121 of the tax code, and the amounts are fixed. A single seller can exclude up to $250,000 of gain on a principal residence, and a married couple filing jointly can exclude up to $500,000, as the agency spells out in IRS Topic 701. Gain is measured against the home’s cost basis — the purchase price plus qualifying improvements — not against the full sale price, so the exclusion often wipes out the entire taxable amount for owners who never traded up to a more expensive house.
Qualifying is not automatic. The seller must clear two separate hurdles during the five years leading up to the sale: an ownership test, requiring ownership of the home for at least two of those years, and a use test, requiring that the property served as the principal residence for at least two of them. The two years do not have to be continuous, and the exclusion can generally be claimed only once in any two-year period, a limit aimed at frequent flippers rather than long-term owners.
Free retirement updates: Keep more of a Social Security check and savings with plain-English updates on the changes, deadlines, and costly mistakes retirees miss. Subscribe free.
How couples reach the full $500,000
The jump from the single figure to the married figure has its own conditions, and they trip up more sellers than the headline number suggests. To claim the full $500,000, a couple must file jointly, and while only one spouse needs to satisfy the ownership test, both spouses must independently meet the use test by having lived in the home as a principal residence for the required period. If one spouse falls short of the use test — a common situation after a later-in-life marriage — the couple’s exclusion drops back to $250,000, and the difference can translate into tens of thousands of dollars in tax on the same sale.
Widowed sellers get a narrow but valuable extension of the joint amount. A surviving spouse who sells within two years of a partner’s death can generally still claim the full $500,000 exclusion, provided the couple would have qualified had the sale happened before the death. That window matters because many people delay selling a longtime home while grieving, and missing it can cut the available exclusion in half at the worst possible moment.
Sellers who cannot meet the full two-year tests are not always shut out. The rules allow a reduced, prorated exclusion for an owner forced to sell early because of a change in workplace location, a health condition, or certain other unforeseen circumstances such as a divorce, a death in the family, or a job loss that makes the mortgage unaffordable. In those cases the exclusion is scaled to the fraction of the two-year period the owner actually satisfied, so someone who lived in the home for one year before a qualifying move can still shelter half of the single or joint cap.
Why the thresholds bite harder every year
The $250,000 and $500,000 figures carry a quiet flaw for long-term owners: they have not been adjusted for inflation since Congress created them in 1997. Home values have climbed sharply in the decades since, so a modest house bought in the 1980s or 1990s can now carry a gain that exceeds even the couple’s exclusion. When that happens, the excess is taxed as a long-term capital gain, and the details on how to calculate and report it appear in the agency’s homeowner guidance, Publication 523. Keeping records of every capital improvement made over the years is the practical defense, because each documented improvement raises the basis and shrinks the taxable gain that remains.
One carve-out catches owners who once rented the property or claimed a home-office deduction. Any depreciation taken on the home after May 6, 1997, cannot be sheltered and is taxed when the house sells, regardless of the $250,000 or $500,000 exclusion. Stretches when the home served as a rental rather than a residence can also carve a slice of the gain out of the break, so a house that spent years as an investment before becoming a primary home rarely qualifies for the full exclusion. Owners in that situation should map out the taxable portion before listing, rather than discovering it at closing.
The record that determines what stays tax-free
For retirees, the home sale is frequently the single largest financial event of the later years, and the exclusion is what keeps most of the proceeds available for the next chapter rather than surrendered to tax. The amount that ultimately escapes tax turns on a chain of specifics — filing status, which spouse meets which test, the sale date relative to a partner’s death, and the basis built up through years of improvements. Each of those is defined in the federal home-sale rules, and confirming them against Topic 701 before a closing date is set is what separates a fully sheltered gain from an avoidable tax bill.
This article was produced with the assistance of artificial intelligence and reviewed by The Financial Wire editorial team.
More Financial Reading
- What really happens to your joint savings account when you die?
- Bank statements: how long to keep them and when to toss them



