Selling

Capital gains tax on selling your home

The Section 121 exclusion, how your gain is actually calculated, and when you might owe tax.
By Lighthouse Companies, LLC · Updated · 2 min read

Most home sellers owe nothing in capital gains tax — but understanding why, and confirming you actually qualify, matters before you assume it.

The Section 121 exclusion

If the home was your primary residence and you owned and lived in it for at least 2 of the last 5 years before the sale, you can exclude up to $250,000 in gain from federal capital gains tax if you're single, or $500,000 if you're married filing jointly. The 2-of-5-year requirement doesn't need to be continuous — it just needs to add up to 24 months within that 5-year window.

How your gain is actually calculated

Gain is not simply sale price minus purchase price. The real formula is: sale price, minus selling costs (commission, closing costs), minus your adjusted cost basis. Your adjusted basis is your original purchase price plus the cost of capital improvements you've made over the years (a new roof, an addition, a kitchen remodel) — routine repairs and maintenance don't count, but real improvements do.

Example: You bought for $320,000, spent $40,000 on a kitchen remodel and a new roof over the years (adjusted basis now $360,000), and sell for $560,000 with $35,000 in selling costs. Your gain = $560,000 - $35,000 - $360,000 = $165,000. As a married couple, that's fully covered by the $500,000 exclusion — you owe nothing in federal capital gains tax on this sale.

When you might actually owe tax

  • Gain exceeds your exclusion amount: only the amount above $250,000/$500,000 is taxable, not the whole gain.
  • It wasn't your primary residence: investment properties and second homes don't qualify for the Section 121 exclusion (though a 1031 exchange may defer tax on an investment property — a separate, more complex strategy).
  • You don't meet the 2-of-5-year test: certain exceptions exist for job relocation, health reasons, and other unforeseen circumstances that can allow a partial exclusion even if you sell sooner.
  • You used the exclusion on another home sale within the last 2 years: generally you can only use it once every 2 years.

Keep records

Save receipts and records for every capital improvement for as long as you own the home — they directly reduce your taxable gain when you eventually sell. This is exactly the kind of record-keeping mentioned in the Learning Center's tax-benefits article, and it matters most at the moment of sale.

Tax laws and thresholds can change, and individual situations vary. This is educational information, not tax advice — consult a licensed CPA or tax professional to confirm your actual liability before you sell.

Lighthouse provides educational information, not a personal loan quote, lending decision, or legal or financial advice. Verify the figures against your documents and ask your lender, servicer, or a qualified professional about your circumstances.

Capital gains tax on selling your home · Lighthouse