A home bought decades ago for a modest sum can be worth many times that today, and selling it turns years of paper appreciation into a real capital gain. For most other investments, that gain would be fully taxable. The tax code carves out a large exception for a main home, letting a qualifying seller keep a substantial slice of the profit free of federal tax. For retirees who bought early and are now downsizing, that exclusion can be the single largest tax break of the transaction.
The Section 121 home-sale exclusion
The break comes from Section 121 of the Internal Revenue Code. Under the IRS rules for the sale of a main home, a single filer can exclude up to $250,000 of gain from the sale, and a married couple filing jointly can exclude up to $500,000. The gain is the sale price minus selling costs and minus the property’s adjusted basis, which is the original purchase price plus the cost of qualifying improvements made over the years. Only the profit above the exclusion amount is subject to capital-gains tax, so a couple with a $400,000 gain on a long-held home may owe nothing at all, while a couple with a $650,000 gain would be taxed only on the $150,000 above the limit. The dollar thresholds are set by statute and are not adjusted for inflation, which means the same caps that applied years ago still apply today.
Free retirement updates: Want plain-English help keeping more of your money in retirement? The free Retirement Shield newsletter covers the benefits, deadlines, and money mistakes that cost retirees, a couple times a week. Subscribe free.
The ownership and use test
The exclusion is not automatic. To qualify, a seller must pass what the IRS calls the ownership-and-use test, meaning the property was owned and used as a main home for at least two of the five years ending on the date of sale. The two years do not have to be continuous, and they do not have to overlap, which gives some flexibility to owners who spent time elsewhere. For a married couple to claim the full $500,000, both spouses must meet the use test and at least one must meet the ownership test, and neither can have excluded gain on another home sale within the prior two years. That last rule caps how often the break can be used: the full exclusion is generally available only once every two years, so it cannot be stacked on rapid successive sales. A special provision protects a recent widow or widower: a surviving spouse who has not remarried can still claim the full $500,000 exclusion if the home is sold within two years of the other spouse’s death, as long as the couple met the ownership-and-use tests before the death.
Where the exclusion shrinks or disappears
Several situations reduce or eliminate the benefit. A home used partly as a rental or a home office may carry taxable depreciation that must be recaptured regardless of the exclusion. A vacation house or investment property that was never a main home does not qualify at all. Time a property spent as a rental before or after it served as the owner’s residence can create a period of nonqualified use that limits how much gain can be excluded. Sellers who do not meet the full two-year test may still claim a partial exclusion if the sale was driven by a change in employment, a health condition, or certain unforeseen circumstances, and that partial amount is prorated by the share of the two-year requirement actually met, so an owner who qualifies for half the period can still shelter up to $125,000 as a single filer or $250,000 as a couple. The IRS publication on selling a home lays out the worksheets for calculating basis, figuring the gain, and applying any partial exclusion.
Careful records are what make the exclusion work in practice. Keeping receipts for major improvements raises the property’s basis and lowers the taxable gain, and documenting the dates a home served as a main residence proves the use test if the return is ever questioned. For a longtime owner, the difference between a well-documented sale and a poorly documented one can be tens of thousands of dollars in tax. The exclusion rewards those who bought and stayed, but only if the sale meets the tests and the paperwork backs it up.
Putting the exclusion to work with real numbers
The mechanics are easier to see with figures attached. Suppose a couple bought a house in the 1980s for $80,000 and, over the decades, spent $120,000 on a new roof, an addition, and other capital improvements. Their adjusted basis is $200,000. If they sell today for $750,000 and pay $50,000 in agent commissions and closing costs, the amount realized is $700,000 and the taxable gain is $500,000. Because a married couple filing jointly can exclude up to $500,000, the entire gain disappears and they owe no federal capital-gains tax. Had the same home been owned by a single filer, only $250,000 would be excluded and the remaining $250,000 would be taxed at capital-gains rates. The example shows why records of every improvement matter: the $120,000 the couple documented is what lifted their basis and shrank the gain, and without those receipts the taxable profit would have been $120,000 larger.
The math also explains a squeeze facing homeowners who are sitting on very large gains. In parts of the country where prices have soared, a long-held home can carry a gain well above $500,000, and every dollar of profit above the cap is fully taxable. Because the $250,000 and $500,000 limits are fixed in the statute and never indexed to inflation, that ceiling covers less real appreciation with each passing year, and the earliest buyers in the hottest markets are the ones most likely to find part of their gain exposed despite doing everything the exclusion requires.
This article was produced with the assistance of artificial intelligence and reviewed by The Financial Wire editorial team.
More Financial Reading
- How many CDs can you park at 1 bank? FDIC rules you must know
- The ideal retirement withdrawal rate so your savings actually last



