Selling Your Home in 2026? The $250,000 and $500,000 Tax Exclusion, the 2-of-5-Year Test, and the Gain That Still Gets Taxed
If you sell your main home, you may exclude up to $250,000 of gain from federal income tax if you file single, or up to $500,000 if married filing jointly — provided you owned and used it as your main residence for at least two of the five years before the sale.
For plain-language video explanations of related home and money topics, see the Problem Solved channel on YouTube.
Key facts
- Section 121 of the Internal Revenue Code is the law behind the exclusion. It sets the $250,000 limit for single filers and the $500,000 limit for married couples filing jointly.
- The ownership test is owning the home for at least two years out of the five years ending on the sale date. The use test is using it as your main home for at least two years in the same five-year window.
- The two years of ownership and the two years of use do not have to be the same two years, and they do not have to be continuous — they must simply fall inside the five-year window.
- The exclusion is generally available only once every two years. A sale that used the exclusion less than two years earlier can block a second exclusion.
- A partial exclusion is a reduced amount available when a sale before two years is caused by a change in employment, a health reason, or another unforeseen circumstance.
How the Exclusion Works, With the Math
Your gain is the sale price minus your basis, minus selling costs such as agent commissions. Your basis starts with what you paid and grows with the cost of improvements — a new roof, an added room, a replaced heating system — while repairs that merely maintain the home do not count. As a worked example only: a single filer who sells for $600,000, with a basis of $300,000 and $20,000 of selling costs, has a gain of $280,000. The $250,000 exclusion shelters most of it, leaving $30,000 of gain that is generally taxable as a capital gain.
For a married couple filing jointly with the same figures, the $500,000 exclusion would shelter the entire $280,000 gain. That difference is why filing status matters as much as the sale price: the same home, the same profit, and a different tax result. Keep in mind that the exclusion shelters gain only; it does not erase tax on depreciation you claimed while the home was rented, which follows different rules — see our guide to depreciation recapture when a rental property is sold.
The 2-of-5-Year Test, and Its Exceptions
The five-year window ends on the sale date, so count backwards from closing, not from listing. Short absences, such as a holiday or a temporary work assignment, generally still count as use of the home, while a long rental period may not. If you owned the home for years but rented it out for the last three, the use test may fail even though the ownership test passes — both tests must be met.
Several exceptions soften the rule. Service members, Foreign Service personnel, and intelligence officers on qualified extended duty may suspend the five-year window for up to ten years. A spouse who receives the home in a divorce generally counts the other spouse's ownership and use time. And if a move is forced by a job change, a health problem, a divorce, or another unforeseen circumstance, a partial exclusion may apply even before two years. Document the reason: a letter from an employer, medical records, or a divorce decree is the evidence that supports the claim.
When Only Part of the Gain Is Sheltered
Three situations leave part of the gain taxable. The first is a gain larger than the exclusion, as in the example above. The second is a sale within two years of a previous exclusion, which generally blocks the new exclusion entirely unless an exception applies. The third is mixed use: if part of the home was rented out or used for business, the exclusion may cover only the residential portion, and depreciation claimed during that period may be recaptured as taxable income.
State tax rules add another layer. Some states follow the federal exclusion, others do not, and a few tax the gain differently. Before you assume the federal result is your final bill, check your state's treatment of home sale gains for the year of the sale.
What to Do Before You Close
Start with records, because the exclusion is only as good as your proof. Gather the purchase closing statement, receipts and contracts for improvements, and the sale closing statement showing costs. If you made improvements over many years, reconstructing them from memory after the sale is unreliable; a simple file, kept as you go, is worth more than any later estimate.
Next, run the numbers before you accept an offer, not after. Knowing whether your gain sits below or above the exclusion changes how you negotiate: a seller with a large taxable gain may prefer a price that keeps the gain within the shelter, while a seller comfortably below it has no tax reason to resist a higher price. If you are weighing a move into a smaller home, our guide to downsizing for retirement covers the timing and cost questions that sit alongside the tax decision. Finally, if you receive a Form 1099-S, if any gain is taxable, or if you fail either test, plan to report the sale and keep the supporting documents with your return.
Who Benefits From This — and Who Does Not
Long-term owners of a main home benefit most, especially married couples filing jointly, whose $500,000 shelter covers the gain on most ordinary family homes. Owners who improved their home over the years benefit too, because every documented improvement raises the basis and shrinks the taxable gain. Owners forced to move early for work, health, or divorce benefit from the partial exclusion, which turns an all-or-nothing rule into a fairer fraction.
Owners of rental property and second homes do not benefit, because the exclusion is for a main home; a property that was never your main residence does not qualify. Owners who sold another home and used the exclusion within the last two years do not benefit in full, because the once-every-two-years rule blocks a second exclusion. And owners with no records of purchase price or improvements do not benefit as much as they should, because an unproven basis is a smaller basis — and a larger taxable gain.
This article is general information only, not legal, tax, or financial advice. Tax law and state rules change, and individual circumstances — divorce, military service, rental periods, and prior exclusions — change the result, so confirm your position with a qualified tax professional before you file.
Frequently Asked Questions
Who benefits from the home sale tax exclusion?
Owners who lived in the home as their main residence for at least two of the last five years benefit most, because they can exclude up to $250,000 of gain if filing single, or up to $500,000 if married filing jointly, from federal income tax.
Who does not benefit from the exclusion?
Owners of rental or investment property, second homes, and owners who used the exclusion on another sale within the last two years do not benefit in full, because the exclusion applies to a main home and generally only once every two years.
How do I start, step by step, before I sell?
First, work out your basis: what you paid, plus the cost of improvements, minus any depreciation claimed. Second, subtract your basis and selling costs from the sale price to find your gain. Third, check the ownership and use tests over the last five years. Fourth, keep the records that prove each figure. Fifth, confirm whether any gain above the exclusion must be reported.
What if I owned and lived in the home for less than two years?
You may still qualify for a partial exclusion if you sold because of a change in employment, a health reason, or another unforeseen circumstance. The partial amount is generally based on the fraction of the two-year period you met, so keep documents that prove the reason for the move.
Do I have to report the sale on my tax return?
Not always. If the entire gain is excluded and you received no tax form reporting the sale, you may not need to report it, but you must report the sale if you received a Form 1099-S, if any gain is taxable, or if you do not meet the exclusion tests. Check the current IRS instructions for your filing year.