The home sale exclusion
Federal tax law lets many homeowners exclude part or all of the gain on the sale of a main home. If you owned the home and lived in it as your main home for at least 2 of the 5 years before the sale, you may exclude up to $250,000 of gain. Married couples filing jointly may exclude up to $500,000 if they meet the rules.
The 2 years don't have to be in a row, and the ownership and living tests can be met at different times within the 5 years.
How to figure your gain
- Start with your sale price.
- Subtract selling costs, such as agent commissions, transfer taxes you pay and other closing costs.
- Subtract your cost basis: what you paid for the home plus certain purchase costs and the cost of improvements.
- The result is your gain. Compare it with the exclusion you qualify for.
A worked example
This is a hypothetical example. You bought for $300,000 and spent $50,000 on a renovation, so your basis is $350,000. You sell for $650,000 and pay $10,000 in selling costs, so you net $640,000. Your gain is $640,000 minus $350,000, or $290,000.
A married couple filing jointly who meet the tests could exclude all $290,000. A single filer could exclude up to $250,000, leaving $40,000 that may be taxable.
What counts as an improvement
Improvements add value, extend the home's life or adapt it to new uses. Routine repairs and upkeep usually don't count.
- Additions, finished basements and new decks
- A new roof, HVAC system or windows
- Kitchen and bathroom remodels
- Not usually: painting, patching or fixing a leak
When the exclusion is limited
You may not get the full exclusion in some situations, including:
- You owned or lived in the home less than 2 of the last 5 years.
- You used part of the home for business or as a rental.
- You used the exclusion on another home sale within the last 2 years.
- You claimed depreciation for a home office or rental. That portion is generally taxable.
Partial exclusions
If you sell before meeting the 2-year tests because of a job change, a health reason or certain unforeseen events, you may qualify for a reduced exclusion. The amount depends on how long you met the tests. The rules are specific, so check with a tax professional.
Tax rates on any taxable gain
If you owned the home for more than a year, any taxable gain is generally a long-term capital gain, taxed at lower federal rates than ordinary income. Higher earners may also owe an additional investment income tax. Many states tax capital gains too, and rules vary by state.
Keep good records
Save your closing statements from when you bought and sold, plus receipts and permits for improvements. Good records make it easier to support your basis if you ever need to.


