Home Sale Capital Gains Calculator
How much of your home sale profit is taxable, and the tax on it
Last updated: October 2026 · IRC section 121 and IRS Publication 523
Sale and basis
Agent commission, title, escrow and transfer taxes you paid.
Title insurance, recording fees, legal fees. Not loan costs or points.
Additions, new roof, remodels. Not repairs.
Ownership and use
Your tax situation
Your state's top marginal rate is a reasonable estimate.
Taxable gain
$60,000
of $310,000 total gain
Gain excluded
$250,000
full exclusion, limit $250,000
Estimated tax on the sale
$9,000
federal, NIIT and state
Breakdown
- Amount realized (price minus selling costs)
- $705,000
- Adjusted basis
- $395,000
- Gain on sale
- $310,000
- Section 121 exclusion
- - $250,000
- Federal income tax on the gain (long-term rates)
- $9,000
- Net investment income tax (3.8%)
- $0
- State tax
- $0
- Cash after selling costs and tax (before paying off the mortgage)
- $696,000
How tax on a home sale works
Start with your gain: the sale price minus selling costs, minus your adjusted basis (purchase price plus closing costs and improvements, less any depreciation). If you owned and lived in the home for two of the last five years, section 121 of the tax code lets you exclude up to $250,000 of that gain, or $500,000 on a joint return. Anything above the exclusion is a capital gain, taxed at long-term rates if you owned the home for more than a year.
Worked examples (2026)
Fully excluded. A single owner sells for $600,000 with $36,000 of selling costs. She paid $300,000 and spent $50,000 on improvements, so the gain is $564,000 - $350,000 = $214,000. She has lived there ten years, so the whole gain is excluded and no tax is due.
Over the limit. A married couple sells for $1,200,000 with $72,000 of costs. Their basis is $500,000, so the gain is $628,000. After the $500,000 exclusion, $128,000 is taxable. With $150,000 of other income, their taxable income before the gain is $117,800, already past the $98,900 top of the 0% band, so all $128,000 is taxed at 15%: $19,200. Their income including the gain is $278,000, $28,000 over the $250,000 threshold, so they also owe 3.8% x $28,000 = $1,064 of net investment income tax.
Moved early for work. A single owner who lived in the home for 12 months and relocated for a new job gets 12/24 of $250,000, a $125,000 exclusion.
Key rules
- The $250,000 and $500,000 limits are set in law and not adjusted for inflation (IRS Publication 523).
- Depreciation claimed after May 6, 1997 for a home office or rental use cannot be excluded and is taxed at up to 25%.
- Non-qualified use after 2008, such as renting the home before moving in, reduces the exclusion in proportion to the time involved.
- You can use the exclusion once every two years.
- 2026 long-term capital gains rates: 0% up to $49,450 of taxable income for single filers ($98,900 joint), 15% up to $545,500 ($613,700 joint), then 20% (Rev. Proc. 2025-32).
Related tools and reading
For other assets use the capital gains tax calculator. If the home was a rental, the rental property calculator covers the investment side. Planning the next purchase? Try the home affordability calculator or the rent vs buy calculator. Sellers with investments can compare the crypto tax calculator, and see the whole year in the US tax calculator. For bracket context read the 2026 tax brackets guide.
Frequently asked questions
How much profit on a home sale is tax free?
Up to $250,000 of gain, or $500,000 for a married couple filing jointly, if you owned the home and lived in it as your main home for at least two of the five years before the sale, and you have not used the exclusion on another home in the past two years. For a joint $500,000, either spouse can meet the ownership test but both must meet the use test.
How do I calculate the gain on my house?
Gain is the amount realized minus your adjusted basis. The amount realized is the sale price minus selling costs such as agent commissions, title fees and transfer taxes paid by you. Adjusted basis is what you paid, plus certain closing costs and the cost of improvements that added value or extended the home's life, minus any depreciation you claimed. Repairs and maintenance do not add to basis.
Can I get a partial exclusion if I sell before two years?
Yes, if the main reason for the sale is a change in place of employment, health, or an unforeseen circumstance such as a divorce, a death in the family, or multiple births from one pregnancy. The exclusion is prorated: the shorter of your ownership or use period, divided by 24 months, times $250,000 or $500,000. Living there 12 months gives half the exclusion.
What tax rate applies to a home sale gain?
Gain above the exclusion on a home owned for more than a year is a long-term capital gain, taxed at 0%, 15% or 20% depending on your total taxable income. Gain from depreciation you took for a home office or rental use is taxed as unrecaptured section 1250 gain, at your ordinary rate but no more than 25%. High earners may also owe the 3.8% net investment income tax on the taxable part of the gain, plus state income tax.
What if I rented the house out before living in it?
Since 2009, gain is split between periods of qualified and non-qualified use. Years when the home was not your main residence (for example a rental or second home) before your last period of living there reduce the exclusion proportionally: 2 years of rental out of 10 years of ownership means 20% of the gain cannot be excluded. Time after you move out, within the five-year window, does not count against you.
Can I deduct a loss on the sale of my home?
No. A loss on the sale of a personal residence is not deductible. It is only deductible if the property was held as a rental or for investment at the time of sale.
Do I have to report the sale of my home?
You must report it if you received a Form 1099-S, or if any part of the gain is taxable. If the entire gain is excluded and you did not get a 1099-S, you generally do not need to report it, but keep records of your purchase price and improvements in case the IRS asks.