Sell the home you’ve lived in for years and up to $250,000 of the gain escapes tax, or $500,000 for a couple.

Happy insurance agent meeting with young couple and shaking hands with a man at their home

Older homeowners who bought decades ago often sit on a large paper gain, and many hesitate to sell because they assume the profit will be taxed in full. For a main home, that assumption usually overstates the bill. A long-standing provision of the tax code lets a homeowner shield a substantial share of the gain from tax entirely, and for a married couple the shielded amount doubles. Knowing how the break works, and what it takes to qualify, can turn a dreaded tax question into a straightforward decision about when to downsize.

How the home-sale exclusion works

The tax that worries sellers applies to the gain, not the sale price. Gain is roughly the selling price minus what the owner originally paid, plus the cost of qualifying improvements over the years, so a house bought long ago and improved along the way can carry a gain far smaller than the headline sale figure. The exclusion then removes a large slice of whatever gain remains, which for most retirees selling a modest home wipes out the taxable amount altogether.

Under the rule the IRS lays out in its guidance on selling a home, a single filer can exclude up to 250,000 dollars of gain from the sale of a main home, and a married couple filing jointly can exclude up to 500,000 dollars. The exclusion applies to a primary residence rather than a vacation property or a pure rental, and it is the reason many home sales in retirement produce no federal income tax at all.


Free for readers: For plain-English help keeping more money in retirement, the free Retirement Shield newsletter covers scams, benefits, and money owed, a couple times a week. Subscribe free.

The two-out-of-five-year test

Qualifying comes down to two conditions the tax code calls the ownership test and the use test. To claim the full exclusion, a seller generally must have owned the home for at least two years and lived in it as a main residence for at least two years during the five-year period ending on the date of sale. The two years do not have to be continuous, and the ownership and use periods do not have to line up exactly, which gives some flexibility to people whose living situation changed near the end.

The detailed rules, including worksheets and the fine print on how to count the time, appear in the IRS publication on selling a home. There are limited exceptions that allow a partial exclusion for someone who has to sell early because of a change in job location, a health problem, or certain other unforeseen circumstances, and a surviving spouse may qualify for the larger amount for a period after a spouse’s death. As a general matter, though, a homeowner who has not both owned and used a property for two of the prior five years, or who excluded gain on another home in the two years before the sale, cannot take the full break.

What happens to gain above the limit

Not every sale fits neatly under the ceiling. When the gain on a main home runs past the 250,000 or 500,000 dollar threshold, the excess is not erased; it is treated as a capital gain and taxed accordingly. A long-held home usually produces a long-term gain, which is taxed at the preferential long-term capital-gains rates rather than as ordinary income, so even a taxable slice is often taxed more gently than a paycheck of the same size.

For a couple in a high-cost market who watched a starter home appreciate for forty years, that distinction matters. The first 500,000 dollars of joint gain can escape tax under the exclusion, and only the amount above it enters the capital-gains calculation. Keeping good records of the purchase price and of major improvements is what lets a seller prove a higher basis and shrink the taxable portion.

Basis is where many sellers leave money on the table. The original purchase price, closing costs paid at the time of purchase, and the cost of capital improvements such as a new roof, an addition, or a remodeled kitchen all add to basis and reduce the taxable gain, while routine repairs and ordinary maintenance do not. A homeowner who saved receipts across decades of ownership can often document a basis high enough to pull the gain back under the exclusion. One caution runs the other way: a loss on the sale of a personal residence is not deductible, so the tax break moves in only one direction.

Reporting and the traps to avoid

Even a fully excluded sale sometimes has to be reported. According to the IRS’s real-estate tax tips on the sale of a residence, a seller who receives a Form 1099-S for the transaction must report the sale, and anyone who cannot exclude the entire gain must report it as well. The exclusion can generally be used only once every two years, so selling two homes in quick succession can forfeit the break on the second. Converting a rental back into a primary residence, or selling a home that was partly used for business, also changes the math and can leave part of the gain taxable.

Why the break matters most in retirement

Downsizing is one of the biggest financial moves many people make after they stop working, and the home-sale exclusion is what keeps that move from triggering a large tax bill. A retiree who sells a long-time home to free up cash, move closer to family, or trade a large house for something easier to maintain can often walk away with the entire gain, or nearly all of it, untaxed. Running the numbers before listing, and confirming that the ownership and use tests are met, is the step that locks in the benefit rather than leaving it to chance.

For an older seller sitting on a very large gain, the code offers no way to shelter the whole amount in a single sale. Even then, timing the sale, documenting every dollar of basis, and confirming that both spouses meet the use test are the levers that keep the taxable slice as small as the law allows.


Free for readers: One number can cost or save hundreds a month in retirement. The free Retirement Shield newsletter surfaces the ones worth knowing. Sign up free.

This article was researched and drafted with AI assistance and reviewed against the linked primary sources.

Leave a Reply

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