How the exclusion works
Section 121 is the reason most sellers owe nothing. It wipes out a large slice of gain on a primary residence, and you can use it once every two years.
- Confirm eligibility. You owned the home and used it as your primary residence for at least two of the five years before the sale.
- Build the basis. Purchase price, buying costs, and every capital improvement you can document.
- Apply the exclusion. $250,000 single, $500,000 married filing jointly. Only the gain above that is taxable.
- Check the rate. The remaining gain stacks on your income and lands in the 0%, 15%, or 20% bucket.
Records worth keeping
- Improvement receipts - Every remodel, addition, and system replacement raises your basis and lowers the taxable gain.
- Buying costs - Title insurance, escrow, recording, and transfer taxes paid at purchase all add to basis.
- Selling costs - Commission, title, escrow, and transfer tax at the sale subtract from the price before the gain is measured.
- Depreciation history - If the home was ever a rental, the depreciation you claimed comes back as recapture at up to 25% and is not covered here.
Frequently asked questions
Do I have to pay tax when I sell my house?
Most primary-residence sellers do not. Section 121 lets you exclude up to $250,000 of gain filing single or $500,000 filing jointly, provided you owned and lived in the home for at least two of the last five years. Above that threshold, the excess is taxed as a long-term capital gain.
How is my gain calculated?
Start with the sale price, subtract selling costs, then subtract your adjusted basis. Basis is what you paid plus buying costs plus any capital improvements. Repairs and maintenance do not count - a new roof does, repainting the same roof does not.
What counts as a capital improvement?
Anything that adds value, prolongs the life of the property, or adapts it to a new use: a kitchen remodel, an addition, a new HVAC system, landscaping, or a fence. Keep receipts - without them the basis increase is hard to defend if you are audited.
What if I rented the home for a while?
The exclusion still works if the home was your primary residence for two of the last five years, but depreciation taken after May 1997 is recaptured at up to 25% and does not qualify for the exclusion. This calculator does not model depreciation recapture.
What are the 0%, 15%, and 20% rates?
Long-term gains stack on top of your ordinary income. The 0% band covers roughly the first $48,000 of taxable income for a single filer, 15% runs to about $533,000, and 20% applies above that. Joint filers roughly double those thresholds. The IRS adjusts them each year, so check the current figures before you file.
When does the 3.8% net investment tax apply?
When modified adjusted gross income exceeds $200,000 filing single or $250,000 filing jointly, the smaller of your net investment income or the excess is taxed an extra 3.8%. Home sale gain counts as investment income for this test.
Federal estimate only, covering section 121 and long-term capital gains rates. It does not include state tax, depreciation recapture, or the partial exclusion for hardship cases. Talk to a tax professional before you file.