Capital gains tax when you sell your house
Most people selling their main home pay no federal capital gains tax, thanks to an exclusion of up to $250,000 of gain ($500,000 for married couples). Here is how it works and what happens above it.
Calculate tax on my gainThe home sale exclusion
If the house was your main home, you can exclude up to $250,000 of gain if you are single, or $500,000 if you are married filing jointly. To qualify you must have owned the home and lived in it as your main home for at least two of the five years before the sale, and not used the exclusion on another home in the previous two years. If you fall short because of a job move, health reasons or other unforeseen events, a partial exclusion may still apply.
Working out the gain
The gain is not simply the sale price minus what you paid. Start with the sale price, subtract selling costs such as agent commission and closing costs, then subtract your basis: what you paid for the home plus the cost of improvements (a new roof, an extension, a kitchen remodel; not repairs and maintenance).
Worked example
A married couple bought their home for $300,000, spent $50,000 on improvements, and sell it for $1,000,000 with $60,000 of selling costs. Their gain is $590,000. The first $500,000 is excluded, leaving $90,000 taxable. With $150,000 of other income, the federal tax on that is $13,500, plus any state tax.
When the exclusion does not apply
- Rental and investment property: no exclusion. The whole gain is taxable, and any depreciation you claimed is taxed at up to 25%. A 1031 exchange into another investment property can defer the tax.
- Second homes and vacation homes do not qualify unless they become your main home for two of the five years before sale.
- Home office or rental use: depreciation claimed on part of the home is taxed when you sell even if the rest of the gain is excluded.
Selling an inherited house
If you inherit a house, its basis is usually stepped up to its market value on the date of death. Selling soon afterwards often produces little or no gain. Any rise in value after that date is a long-term gain however long you held it.
Selling a home with a gain above the exclusion? A CPA can check your basis and improvements before you fileWorked figures for other gains: $100,000 · $250,000 · $500,000. Other guides: selling stocks · crypto.