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 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.