Home Sale Capital Gains Tax Calculator (2026)

Estimate the federal tax when you sell your main home: the $250,000 / $500,000 exclusion (full or partial), depreciation and rental use, the 0/15/20% capital gains rates stacked on your other income, and the 3.8% investment income tax. From IRS Publication 523.

$750,000

Costs you paid to sell, from the closing statement. That is 6.0% of the price you entered. They reduce the gain.

$400,000

Not the costs of getting the loan (points, appraisal, loan fees, mortgage insurance): those are not part of your basis.

Additions, a new roof, a kitchen remodel, landscaping, a pool. Not repairs or maintenance.

You need 24 of each in the 5 years before the sale (they do not have to be in a row). 24 months is 730 days.

If the home was ever rented or used for business, or you sold another home recently

Count months after 2008 when neither you nor your spouse used the whole home as a main home, up to the last day you did. Months after you last lived there do not count, and neither does up to 2 years of temporary absence for a job change, health or unforeseen event, or qualified military duty.

Your other 2026 income

$90,000

Estimated tax on the sale

$2,850

Tax on $19,000 of taxable gain: 1.1% of your $269,000 gain.

Amount realized (price less selling expenses)$705,000
Adjusted basis (cost + closing costs + improvements − depreciation)$436,000
Gain$269,000
Excluded (Section 121)$250,000
Taxable gain$19,000
Federal income tax on the gain$2,850

How the exclusion works out

You meet the ownership, residence and look-back tests, so the limit is $250,000.

With the gain, your taxable income is $92,900 (it was $73,900 without the sale). Of your long-term gains and dividends, $0 is taxed at 0%, $19,000 at 15%.

When does tax start?

With the costs, improvements and exclusion above, and selling expenses at 6.0% of the price, some of the gain becomes taxable at a sale price of about $729,788 (you are past it).

Not modelled: the disability test and the military, Foreign Service, intelligence and Peace Corps extension of the five-year period; a surviving spouse selling within two years of a death; a home acquired in a like-kind exchange; vacant land; a separate business or rental portion of the property; installment sales; basis from an inheritance, gift or divorce (enter your basis yourself); co-owners (enter only your share); the alternative minimum tax; foreign income; state rules beyond the flat rate you type. Tax on the whole return is figured with the exact 2026 brackets, not the IRS Tax Table, so it can differ by a few dollars.

Estimate only, for federal income tax. It follows IRS Publication 523 (2025) Worksheets 1 to 3, the Schedule D Tax Worksheet with the 2026 amounts in Revenue Procedure 2025-32, and 26 U.S.C. 121 and 1411. Not financial or tax advice; confirm your own figures with your closing statement, your return or a tax professional.

Long-term capital gains rates for 2026: where each one starts

The rate depends on your taxable income (after deductions) including the gain: the gain is stacked on top of the rest of your income, and the part that falls under the first figure is taxed at 0%, the part under the second at 15%, and the rest at 20%. Rev. Proc. 2025-32, section 3.03.

2026 taxable income at which the 0%, 15% and 20% long-term capital gains rates apply, by filing status
Filing status0% up to15% up to3.8% extra tax above (modified AGI)
Single$49,450$545,500$200,000
Married filing jointly$98,900$613,700$250,000
Head of household$66,200$579,600$200,000

Frequently asked questions

Q.How much of the gain on my home is tax-free?

Up to $250,000 if you are single or head of household, and up to $500,000 on a joint return if both spouses meet the residence test (only one has to meet the ownership test), when you owned the home and used it as your main home for at least 24 of the last 60 months before the sale and did not exclude the gain from another home sale in the last 24 months (26 U.S.C. 121; Publication 523). The months do not have to be consecutive.

Example: a single owner bought for $400,000 with $6,000 of closing costs, spent $30,000 on improvements, and sells for $750,000 paying $45,000 of selling costs. The gain is $269,000; $250,000 is excluded, so $19,000 is taxable. With $90,000 of other income the tax is $2,850: all of it at 15%, because the taxable income is above the 0% limit.

Q.What counts in my cost basis, and what doesn't?

Your basis is what you paid, plus the closing costs of buying that are part of the price (abstract and title fees, legal fees, recording fees, survey fees, transfer taxes, owner's title insurance), plus improvements that add value or prolong the life of the home (an addition, a new roof, a remodeled kitchen, landscaping), less depreciation and certain credits and casualty payments. Repairs and maintenance (painting, fixing leaks) are not added, and neither are the costs of getting the loan: points, appraisal and credit report fees, mortgage insurance, loan fees (Publication 523, Basis Adjustments). Selling costs are subtracted from the sale price, not added to basis; the effect on the gain is the same.

Q.I haven't lived there 2 years. Do I owe tax on all of the gain?

Not necessarily. If the main reason for selling was a work-related move (a new job at least 50 miles farther from the home), a health-related move, or an unforeseeable event (a death, divorce, unemployment, a disaster and similar), you get a partial exclusion: the shortest of the months you lived there, the months you owned it, and the months since your last exclusion, divided by 24, times $250,000 (Publication 523, Worksheet 1; each spouse separately on a joint return). Example: sold after 12 months for a work move: 12 ÷ 24 × $250,000 = $125,000. With a $200,000 gain, $75,000 would be taxable. Without a qualifying reason there is no exclusion at all.

Q.What tax rate applies to the taxable part?

A home you owned for more than a year is a long-term capital asset, so the taxable gain is taxed at 0%, 15% or 20% depending on where it lands on top of your other taxable income (the table above), not on the gain alone. A couple with $300,000 of other income and a $100,000 taxable gain (after a $500,000 exclusion on a $600,000gain) pays 15% on all of it: $15,000, because their taxable income is already above $98,900.

The taxable gain also counts as net investment income, so if your modified AGI (with the gain) is over $200,000 ($250,000 joint) you pay an extra 3.8% on the smaller of the gain and the excess over that threshold (26 U.S.C. 1411): $3,800 for the couple above. The part of the gain excluded under section 121 is never net investment income (Instructions for Form 8960).

Q.What if I rented the home out or used part of it for a home office?

Depreciation you took, or could have taken, after May 6, 1997 cannot be excluded; it is taxed as unrecaptured section 1250 gain, at your ordinary rate up to a maximum of 25%. If you also had months after 2008 when the home was not your main home (before you last lived there), part of the rest of the gain is allocated to those months and cannot be excluded either: months of nonqualified use divided by months owned. Publication 523's own example: bought for $400,000, rented for 2 years ($20,000 of depreciation), lived in it for 2 years, sold for $700,000 after 5 years of ownership: $20,000 recaptured, $120,000 allocated to the rental years and taxed as long-term gain, and the other $180,000 excluded. Rental months after the last day you lived there do not count against you. This calculator does not handle a separately rented part of the property, such as one unit of a duplex.

Q.Do I have to report the sale if all of the gain is excluded?

You must report it if part of the gain is taxable, if you received a Form 1099-S (report it on Form 8949 even with no taxable gain), or if you choose to report a gain you could exclude. If none of those applies, you do not have to report the sale (Publication 523, Reporting Gain or Loss on Your Home Sale). A loss on the sale of your main home is not deductible.

Q.Why might my tax software or an accountant get a different number?

Common reasons: the Tax Table, which this calculator replaces with the exact bracket formula (a difference of a few dollars); state tax (this uses one flat rate you type); credits, the alternative minimum tax or other income items that are not in the inputs; a gain that is partly from a rental or business portion of the property; a basis that has other adjustments (energy credits, casualty losses, a spouse's date-of-death value step-up); and dates: the tests count to the date of sale, which is the date on Form 1099-S or the date title transferred.

Sources