Home Sale Exclusion Calculator: How Much Gain You Can Exclude

By Forrest Baumhover, CFP®, EA · Last verified November 23, 2026 · Updated November 26, 2026

If you owned your main home and lived in it for at least 2 of the 5 years before you sold it, you can generally leave up to $250,000 of the gain out of your taxable income (exclude it), or up to $500,000 on a joint return when both spouses lived there for 2 of those years and either owned it for 2 (IRC §121). The 2 years don't have to be in a row, and time you lived there before you owned it can count. A shorter stay, or a sale within 2 years of your last exclusion, can still qualify for part of the exclusion if you sold because of a move for work, a health need or certain unexpected events.

What you enter stays in your browser. This page does not send it anywhere or save it.

If you own the home with someone who isn't filing a joint return with you, enter only your share of the sale price and basis.

Did you (or, if filing jointly, your spouse) exclude gain on another home sale in the 2 years before this one?
Did you sell mainly because of a change in workplace (for you or someone in your household), a health need (yours or a family member's), or another unexpected event?

What this calculator leaves out

  • How to figure selling costs and adjusted basis; see IRS Publication 523.
  • Rules for business or rental use of the home.
  • Special rules for surviving spouses, military and other service members, and divorce.
  • The tax on any gain you can't exclude.

More from the Desk

More practitioner writing from Forrest Baumhover, CFP®, EA at The Federal Tax Desk on Substack.

This page provides general information about IRS procedures. It is not personalized tax advice, and reading it does not create a practitioner-client relationship with Forrest Baumhover, Fbaum Enterprises LLC, or The Federal Tax Desk. Every situation is different — if real money or a real deadline is on the line, consider having a licensed CPA, EA, or tax attorney review your specific facts before you act.

Subscribe to The Federal Tax Desk

Weekly IRS updates and new free tax tools — written for tax pros, readable by anyone.

Subscribe free →