Home Sale Exclusion
When you sell your main home, up to $250,000 of gain is excluded from tax, or $500,000 for a married couple filing jointly. At the 15% long-term capital gain rate alone, a full $500,000 exclusion keeps $75,000 of cash in your pocket.
Reviewed by Ebot Mbi, CPA, EA · Last reviewed October 9, 2026
Who it fits
- Homeowners who have owned and lived in the home at least two of the last five years
- Long-time owners with large appreciation
- Couples planning a downsize in retirement
- Owners moving early for a new job, health, or unforeseen circumstances, who may get a partial exclusion
Who it's not for
- Investment or rental property that was never your main home
- Second homes and vacation homes
- Anyone who excluded gain on another home sale within the past two years
How it works
You must own the home and use it as your main residence for at least two of the five years before the sale. The two years do not have to be consecutive.
Married couples get $500,000 if either spouse meets the ownership test, both meet the use test, and neither used the exclusion in the prior two years. A surviving spouse can still use $500,000 if the home is sold within two years after the death.
Gain is the sale price minus selling costs, minus your basis. Basis is what you paid plus capital improvements, such as additions, a new roof, or a remodel. Keep those receipts for as long as you own the home.
If you sell early because of a job change, health, or certain unforeseen events, a partial exclusion is available in proportion to the time you lived there.
Depreciation you claimed for a home office or rental use after May 6, 1997 is not excluded and is taxed at up to 25%. Time after 2008 when the home was a rental before you moved in can also reduce the exclusion.
Illustrative example
Illustrative: a married couple bought their home in 2012 for $400,000 and spent $100,000 on improvements. They sell in 2026 for $1,150,000, with $60,000 of selling costs. Their other income is $200,000.
- Amount realized: $1,150,000 − $60,000 = $1,090,000
- Basis: $400,000 + $100,000 = $500,000
- Gain: $1,090,000 − $500,000 = $590,000
- Exclusion: $500,000; taxable gain: $90,000
- Capital gain tax at 15%: $90,000 × 15% = $13,500
- Net investment income tax: MAGI $290,000 − $250,000 = $40,000 × 3.8% = $1,520
- Total federal tax: $13,500 + $1,520 = $15,020
The couple pays $15,020 instead of tax on the full $590,000 gain; the exclusion keeps at least $75,000 of tax off the return.
The rules
| Rule | Citation |
|---|---|
| Up to $250,000 of gain ($500,000 joint) on a main home is excluded if owned and used two of the last five years. | IRC §121(a), (b) |
| A partial exclusion applies for sales due to a change in employment, health, or unforeseen circumstances. | IRC §121(c) |
| Gain from depreciation claimed after May 6, 1997 is not excluded. | IRC §121(d)(6) |
| Periods of nonqualified use after 2008 reduce the excluded gain. | IRC §121(b)(5) |
Watch-outs
- Missing improvement records can cost real money. Without them, basis is just the purchase price.
- Converting a rental into your residence does not make all the gain excludable; the rental years can reduce it.
- Gain above the exclusion counts toward the 3.8% net investment income tax threshold.
- Selling one month short of two years can cost the full exclusion unless a partial-exclusion reason applies.
What we do
We rebuild your basis from closing statements and improvement records, compute the excluded and taxable gain, and plan the sale date when the two-year test or a partial exclusion is close. Texas has no state income tax, so the federal return is the whole calculation.
Questions
Do I have to buy another home to get the exclusion?
No. That was the old rule. The exclusion applies whether or not you buy again.
I rented my home out for a year before selling. Do I lose the exclusion?
Not if you still meet the two-of-five-year test. Rental after you move out generally does not reduce it, but depreciation from that year is taxed.
Can we each use $250,000 if only one spouse owns the home?
On a joint return, $500,000 applies if either spouse owns it and both lived there two of the five years.
