Housing · Explainer · Next step
Taxes when you sell a home
Selling for more than you paid can mean a tax bill, but a home you lived in has a large exclusion.
How it works
Your gain is the sale price, less selling costs such as the agent's commission, less what you paid plus improvements.
If it was your main home, you owned it and lived in it for at least 2 of the last 5 years, you can exclude up to $250,000 of gain, or $500,000 on a joint return. You cannot use it if you excluded the gain on another home in the last two years.
The rest is taxed as a long-term gain if you held the property more than a year, at 0%, 15%, or 20%, depending on your other taxable income. The gain is stacked on top of that income.
A rental or second home has no exclusion, and extra rules, such as tax on depreciation, can apply.
Worked example
Selling a main home for $800,000
A $300,000 mortgage, $300,000 basis, 6% in selling costs plus $5,000 of repairs, and $90,000 of other taxable income, filing single.
| Selling costs | $53,000 |
|---|---|
| Gain: $800,000 - $53,000 - $300,000 | $447,000 |
| Less the exclusion | $250,000 |
| Taxable gain taxed at 15% | $197,000 |
| Federal tax | $29,550 |
After the mortgage, costs and tax you keep $417,450. On a joint return the $500,000 exclusion would cover the whole gain.
Common mistakes
- Leaving improvements out of what you paid, which raises the gain.
- Assuming the exclusion applies to a rental.
- Forgetting state tax, which this calculator leaves to you.
Check yourself
How much can a married couple filing jointly exclude on a main home?
Up to $500,000 of gain.
How long must you have owned and lived in the home?
At least 2 of the last 5 years.
Work out your own numbers
Read next
How It Really Works explains and calculates. It does not give personal financial advice. Glossary