Home Sale Capital Gains Calculator

Estimate how much of a home sale is actually taxable. This calculator follows the IRS home-sale framework: sale price minus selling costs, adjusted basis, the $250k/$500k exclusion, depreciation recapture, and federal long-term capital gains tax.

Estimated federal tax

$0

Full IRS exclusion appears available.

Gain calculation

Amount realized
$658,000
Adjusted basis
$443,000
Total gain
$215,000
Exclusion used
$215,000

Tax estimate

Taxable capital gain
$0
Depreciation recapture gain
$0
Capital gains tax
$0
Recapture tax estimate
$0

After selling costs and estimated federal tax, this sale leaves about$658,000 before mortgage payoff.

How to use this calculator

  1. Enter the sale price and costs of selling, including agent commissions, transfer taxes, title or escrow fees, and seller credits.
  2. Enter your purchase price, eligible purchase costs, and documented capital improvements. Do not include routine repairs.
  3. Use the ownership/use fields to test the basic 2-out-of-5-year IRS exclusion rules, then review the taxable gain and federal estimate.

How it works: the math

The IRS starts with amount realized: sale price minus selling expenses. Then it subtracts your adjusted basis: purchase price plus eligible purchase costs and capital improvements, minus depreciation. The result is your gain. If you owned and used the home as your main home for at least 24 months in the last 5 years and did not use another home-sale exclusion in the last 2 years, Section 121 can exclude up to $250,000 of gain for single filers or $500,000 for married filing jointly. Gain above that is taxed under the long-term capital gains brackets; depreciation is estimated separately at a 25% recapture rate because it generally cannot be excluded.

A fully worked example. Sell for $700,000 with $42,000 of selling expenses, so amount realized is $658,000. Purchase price was $400,000, eligible purchase costs were $8,000, and capital improvements were $35,000, making adjusted basis $443,000. Gain is $215,000. Because the seller qualifies for the $250,000 exclusion, the full gain is excluded and estimated federal tax is $0.

Source: IRSPublication 523, Selling Your Home, including the ownership/use tests, $250,000/$500,000 exclusion, and worksheets for gain and taxable gain. 2026 long-term capital gains thresholds are from IRS Rev. Proc. 2025-32. This calculator is federal-only and simplified; it does not fully model partial exclusions, nonqualified use after 2008, state tax, or complex rental/business-use allocations.

See how we verify every calculator

Frequently asked questions

How much capital gain can I exclude when selling my home?

If you qualify under the IRS ownership and use tests, you can generally exclude up to $250,000 of gain if single, or $500,000 if married filing jointly. This calculator applies that limit after selling expenses and adjusted basis are calculated.

What counts toward my adjusted basis?

Your adjusted basis usually starts with the purchase price, then adds certain purchase closing costs and documented capital improvements. Repairs and routine maintenance usually do not count. Depreciation you claimed, such as for rental or home-office use, reduces basis.

Are real estate commissions deducted before calculating gain?

Yes. Selling expenses such as agent commissions, transfer taxes, title fees, escrow fees, and certain legal fees reduce the amount realized from the sale. This calculator groups those as selling expenses.

Does my mortgage payoff affect capital gains tax?

No. Your mortgage payoff affects how much cash you walk away with, but it does not reduce taxable gain. Capital gain is based on sale price minus selling costs minus adjusted basis, not sale price minus loan balance.

What if the home was partly rented or used as a home office?

Depreciation you claimed or could have claimed generally cannot be excluded under the home-sale exclusion. This calculator estimates that amount separately as depreciation recapture, but mixed-use property can get complicated enough to require a tax professional.

Does this include state capital gains tax?

No. This is a federal estimate only. Many states tax capital gains as ordinary income, some have special rules, and some have no income tax at all. Use the federal result as the base, then check your state rules.