Most Home Sellers Pay Zero Capital Gains Tax

Thanks to Section 121 of the tax code, selling your primary residence is one of the most tax-advantaged transactions available to ordinary households — but the exclusion has specific requirements that trip people up.

The $250,000 / $500,000 Exclusion

You can exclude up to:

  • $250,000 of capital gain if you file Single
  • $500,000 of capital gain if you file Married Filing Jointly

This applies to the gain (sale price minus your adjusted cost basis), not the sale price itself. A home that sold for $600,000 isn’t automatically taxable — what matters is how much more than your basis you received.

The 2-of-5-Year Test

To qualify, you must pass both of these tests during the 5 years ending on the sale date:

TestRequirement
Ownership testYou owned the home for at least 2 years
Use testYou lived in it as your primary residence for at least 2 years

The two years don’t need to be continuous, and you can generally only use this exclusion once every 2 years.

Calculating Your Gain

Your gain is: Sale price − selling costs − adjusted cost basis. Your adjusted basis is your original purchase price plus the cost of major capital improvements (a new roof, an addition, a kitchen remodel) — but not routine repairs or maintenance.

Example

A married couple bought a home for $300,000 and spent $50,000 on a verified capital improvement (a home addition), giving them an adjusted basis of $350,000. They sell the home for $780,000 and pay $40,000 in selling costs (agent commissions, closing costs). Their gain is:

$780,000 − $40,000 − $350,000 = $390,000 gain

Since they’re married filing jointly and pass the 2-of-5-year test, their full $390,000 gain is below the $500,000 exclusion — they owe zero federal capital gains tax on the sale.

What If You Don’t Pass the Test?

If you sell sooner — say, due to a job relocation, health issue, or other unforeseen circumstance — you may qualify for a partial exclusion, prorated based on how much of the 2-year period you actually met. Consult a tax professional; the IRS has specific safe-harbor categories for this.

Gains Above the Exclusion

Any gain above your exclusion amount is taxed as a long-term capital gain (assuming you owned it over a year), at federal rates of 0%, 15%, or 20% depending on your taxable income — generally far lower than ordinary income tax rates.

Investment and Rental Properties

Section 121 only applies to your primary residence. Investment properties and second homes don’t qualify for this exclusion, though a 1031 exchange can defer capital gains tax on investment real estate by rolling proceeds into a new property.

Use Our Calculator

A home sale doesn’t change your regular paycheck withholding, but if you’ll owe tax on a gain above the exclusion, use our free US Paycheck Calculator to estimate your overall tax picture for the year.

Figures reflect 2025 tax year rules. Tax laws change — verify with the IRS or a tax professional.