When you sell your home for more than you paid, the profit is technically a capital gain — but a special exclusion lets most sellers owe nothing. The rules reward using the home as your primary residence and keeping good records of improvements. Knowing how the exclusion works can save you tens of thousands of dollars.
The primary-residence exclusion
If you sell your main home, you can exclude up to $250,000 of gain if you are single, or up to $500,000 if you are married filing jointly. To qualify, you must have owned and lived in the home as your primary residence for at least two of the five years before the sale. The two years do not need to be continuous. This exclusion is one of the largest tax breaks available to ordinary households.
Calculating the actual gain
Your gain is the sale price minus selling costs and your adjusted basis, which is the purchase price plus the cost of qualifying improvements. Capital improvements like a new roof, addition, or remodeled kitchen raise your basis and shrink the taxable gain, while routine repairs do not. This is why keeping receipts for major home projects matters. A carefully tracked basis can keep even a large sale within the exclusion.
When you owe tax anyway
Gain above the exclusion is taxed at long-term capital gains rates if you owned the home more than a year. You also lose part of the exclusion if you fail the two-year tests, though partial exclusions exist for moves caused by a job change, health, or other unforeseen circumstances. Second homes and pure rental properties do not qualify for the exclusion at all. High-value homes in expensive markets are the most likely to generate a taxable gain.
The frequency limit and records
You can use the exclusion only once every two years, so frequent home-flippers cannot claim it on back-to-back sales. Depreciation claimed while renting the home out must also be recaptured and taxed even if the rest of the gain is excluded. Keeping closing statements and improvement receipts is the best protection if the IRS questions your basis. Good records turn a potentially taxable sale into a tax-free one.
A married couple bought a home for $400,000, spent $60,000 on a renovation, and sold for $850,000. Their adjusted basis is $460,000, so the gain is $390,000 — fully covered by the $500,000 exclusion, leaving them owing no capital gains tax.
Key takeaways
- You can exclude up to $250,000 of home-sale gain if single, or $500,000 if married filing jointly.
- You must have owned and lived in the home for two of the last five years.
- Capital improvements raise your basis and reduce the taxable gain; repairs do not.
- Gain above the exclusion is taxed at long-term capital gains rates.
- The exclusion can be used only once every two years.
Common mistakes
- Forgetting to add capital improvements to your basis and overstating the gain.
- Selling before meeting the two-of-five-year residence test.
- Assuming a rental property or second home qualifies for the exclusion.
FAQ
Do I have to buy another home to avoid the tax?
No — the old rollover rule was replaced years ago, so the exclusion applies whether or not you buy a new home.
What if my gain is larger than the exclusion?
Only the portion above your $250,000 or $500,000 exclusion is taxable, and it is taxed at long-term capital gains rates.