Most homeowners who sell their primary residence pay zero federal tax on the profit — but only if they meet two specific tests the IRS checks closely. Miss either one and the exclusion shrinks or disappears entirely.
How Much of the Gain Is Actually Excluded
Single filers can exclude up to $250,000 of capital gain on the sale of a primary home; married couples filing jointly can exclude up to $500,000. This applies to the profit — the difference between your adjusted sale price and your cost basis — not the sale price itself. A couple who bought a home for $300,000 and sells it for $750,000 has a $450,000 gain, which falls entirely under the $500,000 exclusion and owes nothing on it.
The Ownership and Use Tests
To qualify, you must have owned the home and lived in it as your primary residence for at least two of the five years immediately before the sale. Those two years don't need to be consecutive, and short absences (vacations, seasonal work) still count as periods of use. This is the test freelancers who move frequently for work most often fail without realizing it.
Partial Exclusion for an Early Sale
If you sell before hitting the two-year mark because of a job change, health issue, or another qualifying unforeseen circumstance, you may still claim a partial exclusion proportional to the time you did live there. This is a narrow exception, not a general rule — casual reasons for selling early (wanting a bigger house, market timing) do not qualify.
What Reduces Your Excludable Gain — Basis and Improvements
Your cost basis isn't just the purchase price. It includes qualifying capital improvements made over the years (additions, a new roof, major renovations), which increase your basis and reduce your taxable gain. Keep every improvement receipt for as long as you own the home — this is the single most overlooked way homeowners overpay tax on a sale.
The Home Office and Rental-Use Trap
If you claimed depreciation on a home office or rented out part of the property, that portion is treated separately. Depreciation you claimed (or should have claimed) as a business expense generally must be 'recaptured' — taxed at up to 25% — even on a home sale that otherwise qualifies for the full exclusion.
Frequently asked questions
Can I use the exclusion more than once?
Yes, but generally only once every two years. You can't claim it again on a new home sale if you already used it within the prior 24 months.
Do I need to report the sale if the gain is fully excluded?
If you received a Form 1099-S, you generally still need to report the sale on your return, even if the entire gain qualifies for exclusion.
What if my gain exceeds the exclusion limit?
Only the amount above $250,000 (or $500,000 for joint filers) is taxable as a capital gain, at long-term capital gains rates if you owned the home more than a year.