★ MONEY · HOME SALE CAPITAL GAINS · TAX ON YOUR SALE

Home Sale Capital Gains Calculator: Tax on Your Sale

On the defaults — an $850,000.00 sale, a $400,000.00 purchase, $50,000.00 of improvements, $51,000.00 of selling costs, single, qualified, and a 15% rate — the adjusted basis is $450,000.00, the gain is $349,000.00, the taxable gain is $99,000.00, and the tax is $14,850.00. Put in your sale price, purchase price, improvements, and selling costs, and the calculator runs the full home-sale math — gain, exclusion, taxable gain, and tax — and works backwards when you have a target instead. The 2026 capital gains tax brackets page is a rate table, not a calculator; this page runs the numbers for one sale.

1046

Home sale capital gains calculator

Selling a home is not taxed on the price — it is taxed on the gain, and the gain is the sale price minus what the home cost you, improvements included, minus what selling cost you. Then the exclusion takes $250,000.00 (single) or $500,000.00 (married) off the top, if you pass the 2-of-5-years test. Put in your sale price, purchase price, improvements, and selling costs, and the calculator works out the basis, the gain, the taxable gain, and the tax — and works backwards when you have a target instead.

The price you sold the home for — the starting point of the gain. The default is $850,000.

What you paid for the home — the base of the adjusted basis. The default is $400,000.

Capital improvements that raise your basis — a new roof, an addition, a remodel. The default is $50,000.

What selling cost you — commission, closing costs, fix-up for the sale. The default is $51,000.

Your filing status — it sets the exclusion: $250,000 single, $500,000 married filing jointly.

Did you own and live in the home at least 2 of the last 5 years? The exclusion needs it.

The long-term capital-gains rate on the taxable gain — 0%, 15%, or 20% for most sellers. The default is 15%.

Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $14,850.00Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $14,850.00Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $14,850.00. The adjusted basis is the purchase price plus improvements; the gain is the sale price minus the basis minus selling costs; the taxable gain is the gain minus the exclusion when the ownership-and-use test is met, otherwise the full gain (never below $0); the tax is the taxable gain times the capital-gains rate. This is the standard home-sale exclusion rule, not tax advice — the exclusion needs the 2-of-5-years test, a loss on a personal residence is not deductible, selling costs and improvements must be documented, and the rate depends on income and filing status.

Sale price: $850,000.00

Purchase price: $400,000.00

Improvements: $50,000.00

Selling costs: $51,000.00

Filing status: Single

Ownership-and-use test: Yes

Capital-gains rate: 15.00%

Adjusted basis: $450,000.00

Gain: $349,000.00

Taxable gain: $99,000.00

Tax: $14,850.00

Branch: Married ($500,000 exclusion): Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, married, qualified, rate 15.00%: basis $450,000.00, gain $349,000.00, taxable gain $0.00, tax $0.00

Branch: Test NOT met: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, not qualified, rate 15.00%: basis $450,000.00, gain $349,000.00, taxable gain $349,000.00, tax $52,350.00

Branch: Rate 20%: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 20.00%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $19,800.00

Branch: Rate 0%: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 0.00%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $0.00

Branch: Sale $1,000,000: Sale $1,000,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $499,000.00, taxable gain $249,000.00, tax $37,350.00

Branch: Improvements $100,000: Sale $850,000.00, purchase $400,000.00, improvements $100,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $500,000.00, gain $299,000.00, taxable gain $49,000.00, tax $7,350.00

Branch: Purchase $300,000: Sale $850,000.00, purchase $300,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $350,000.00, gain $449,000.00, taxable gain $199,000.00, tax $29,850.00

Reverse: Sale price for a $0.00 taxable gain: $751,000.00

Reverse: Sale price for a $0.00 taxable gain (rounded): $751,000.00

Exact sale price for a $0.00 taxable gain: 751000.0000

At $751,000.00 the figures are: Sale $751,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $250,000.00, taxable gain $0.00, tax $0.00

At the lower neighbor the figures are: Sale $750,999.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $249,999.00, taxable gain $0.00, tax $0.00

At the upper neighbor the figures are: Sale $751,001.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $250,001.00, taxable gain $1.00, tax $0.15

Reverse verdict: CONTINUOUS

Reverse: Improvements for a $10,000.00 tax: $82,333.33

Reverse: Improvements for a $10,000.00 tax (rounded): $82,333.33

Exact improvements for a $10,000.00 tax: 82333.3333

At $82,333.33 the figures are: Sale $850,000.00, purchase $400,000.00, improvements $82,333.33, selling costs $51,000.00, single, qualified, rate 15.00%: basis $482,333.33, gain $316,666.67, taxable gain $66,666.67, tax $10,000.00

At the lower neighbor the figures are: Sale $850,000.00, purchase $400,000.00, improvements $82,332.33, selling costs $51,000.00, single, qualified, rate 15.00%: basis $482,332.33, gain $316,667.67, taxable gain $66,667.67, tax $10,000.15

At the upper neighbor the figures are: Sale $850,000.00, purchase $400,000.00, improvements $82,334.33, selling costs $51,000.00, single, qualified, rate 15.00%: basis $482,334.33, gain $316,665.67, taxable gain $66,665.67, tax $9,999.85

Reverse verdict: CONTINUOUS

Reverse: Rate for a $20,000.00 tax: 20.20%

Reverse: Rate for a $20,000.00 tax (rounded): 20.20%

Exact rate for a $20,000.00 tax: 20.2020%

At 20.20% the figures are: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 20.20%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $19,998.00

At the lower neighbor the figures are: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 20.19%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $19,988.10

At the upper neighbor the figures are: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 20.21%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $20,007.90

Reverse verdict: CONTINUOUS

Reverse: Selling costs for a $12,000.00 tax: $70,000.00

Reverse: Selling costs for a $12,000.00 tax (rounded): $70,000.00

Exact selling costs for a $12,000.00 tax: 70000.0000

At $70,000.00 the figures are: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $70,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $330,000.00, taxable gain $80,000.00, tax $12,000.00

At the lower neighbor the figures are: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $69,999.00, single, qualified, rate 15.00%: basis $450,000.00, gain $330,001.00, taxable gain $80,001.00, tax $12,000.15

At the upper neighbor the figures are: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $70,001.00, single, qualified, rate 15.00%: basis $450,000.00, gain $329,999.00, taxable gain $79,999.00, tax $11,999.85

Reverse verdict: CONTINUOUS

Reverse: Purchase price for a $300,000.00 gain: $449,000.00

Reverse: Purchase price for a $300,000.00 gain (rounded): $449,000.00

Exact purchase price for a $300,000.00 gain: 449000.0000

At $449,000.00 the figures are: Sale $850,000.00, purchase $449,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $499,000.00, gain $300,000.00, taxable gain $50,000.00, tax $7,500.00

At the lower neighbor the figures are: Sale $850,000.00, purchase $448,999.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $498,999.00, gain $300,001.00, taxable gain $50,001.00, tax $7,500.15

At the upper neighbor the figures are: Sale $850,000.00, purchase $449,001.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $499,001.00, gain $299,999.00, taxable gain $49,999.00, tax $7,499.85

Reverse verdict: CONTINUOUS

Reverse: Sale price for a $25,000.00 tax: $917,666.67

Reverse: Sale price for a $25,000.00 tax (rounded): $917,666.67

Exact sale price for a $25,000.00 tax: 917666.6667

At $917,666.67 the figures are: Sale $917,666.67, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $416,666.67, taxable gain $166,666.67, tax $25,000.00

At the lower neighbor the figures are: Sale $917,666.66, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $416,666.66, taxable gain $166,666.66, tax $25,000.00

At the upper neighbor the figures are: Sale $917,666.68, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $416,666.68, taxable gain $166,666.68, tax $25,000.00

Reverse verdict: CONTINUOUS

Edge: Sale $501,000: Sale $501,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $0.00, taxable gain $0.00, tax $0.00

Edge: Sale $2,000,000: Sale $2,000,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $1,499,000.00, taxable gain $1,249,000.00, tax $187,350.00

Edge: Selling costs $400,000: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $400,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $0.00, taxable gain $0.00, tax $0.00

Edge: Selling costs $500,000: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $500,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain -$100,000.00, taxable gain $0.00, tax $0.00

Edge: Married + sale $1,000,000: Sale $1,000,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, married, qualified, rate 15.00%: basis $450,000.00, gain $499,000.00, taxable gain $0.00, tax $0.00

Edge: Rate 20% + test NOT met: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, not qualified, rate 20.00%: basis $450,000.00, gain $349,000.00, taxable gain $349,000.00, tax $69,800.00

Edge: Improvements $0: Sale $850,000.00, purchase $400,000.00, improvements $0.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $400,000.00, gain $399,000.00, taxable gain $149,000.00, tax $22,350.00

Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $14,850.00. On the defaults an $850,000.00 sale on a $450,000.00 basis leaves a $349,000.00 gain, and the $250,000.00 single exclusion cuts the taxable gain to $99,000.00 — a $14,850.00 tax at 15%. The exclusion is the biggest lever: married filing jointly wipes the tax out entirely, and losing the test more than triples it to $52,350.00.

Married ($500,000 exclusion): Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, married, qualified, rate 15.00%: basis $450,000.00, gain $349,000.00, taxable gain $0.00, tax $0.00.

Test NOT met: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, not qualified, rate 15.00%: basis $450,000.00, gain $349,000.00, taxable gain $349,000.00, tax $52,350.00.

Rate 20%: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 20.00%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $19,800.00.

Rate 0%: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 0.00%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $0.00.

Sale $1,000,000: Sale $1,000,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $499,000.00, taxable gain $249,000.00, tax $37,350.00.

Improvements $100,000: Sale $850,000.00, purchase $400,000.00, improvements $100,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $500,000.00, gain $299,000.00, taxable gain $49,000.00, tax $7,350.00.

Purchase $300,000: Sale $850,000.00, purchase $300,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $350,000.00, gain $449,000.00, taxable gain $199,000.00, tax $29,850.00.

Reverse: the sale price for a $0.00 taxable gain is $751,000.00 (exact 751000.0000); at $751,000.00 the taxable gain is $0.00 — verdict: CONTINUOUS. The improvements for a $10,000.00 tax are $82,333.33 (exact 82333.3333); at $82,333.33 the tax is $10,000.00; $82,332.33 gives $10,000.15 — verdict: CONTINUOUS. The rate for a $20,000.00 tax is 20.20% (exact 20.2020%); at 20.20% the tax is $19,998.00; 20.19% gives $19,988.10 — verdict: CONTINUOUS. The selling costs for a $12,000.00 tax are $70,000.00 (exact 70000.0000); at $70,000.00 the tax is $12,000.00 — verdict: CONTINUOUS. The purchase price for a $300,000.00 gain is $449,000.00 (exact 449000.0000); at $449,000.00 the gain is $300,000.00 — verdict: CONTINUOUS. The sale price for a $25,000.00 tax is $917,666.67 (exact 917666.6667); at $917,666.67 the tax is $25,000.00 — verdict: CONTINUOUS.

Edges: a sale of $501,000.00 gives Sale $501,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $0.00, taxable gain $0.00, tax $0.00. A sale of $2,000,000.00 gives Sale $2,000,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $1,499,000.00, taxable gain $1,249,000.00, tax $187,350.00. Selling costs of $400,000.00 give Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $400,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $0.00, taxable gain $0.00, tax $0.00. Selling costs of $500,000.00 give Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $500,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain -$100,000.00, taxable gain $0.00, tax $0.00 — a loss, not deductible. Married with a sale of $1,000,000.00 gives Sale $1,000,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, married, qualified, rate 15.00%: basis $450,000.00, gain $499,000.00, taxable gain $0.00, tax $0.00. A 20% rate with the test NOT met gives Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, not qualified, rate 20.00%: basis $450,000.00, gain $349,000.00, taxable gain $349,000.00, tax $69,800.00. Improvements of $0 give Sale $850,000.00, purchase $400,000.00, improvements $0.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $400,000.00, gain $399,000.00, taxable gain $149,000.00, tax $22,350.00.

How home sale capital gains are worked out

On the defaults — an $850,000.00 sale, a $400,000.00 purchase, $50,000.00 of improvements, $51,000.00 of selling costs, single, qualified, and a 15% rate — the adjusted basis is $450,000.00, the gain is $349,000.00, the taxable gain is $99,000.00, and the tax is $14,850.00. The whole calculation is four moves: add the improvements to the purchase price for the basis, subtract the basis and the selling costs from the sale price for the gain, subtract the exclusion for the taxable gain, and multiply by the rate for the tax.

Five things about the model are worth stating plainly. First, the adjusted basis is the purchase price plus improvements — $400,000.00 + $50,000.00 = $450,000.00 — and only capital improvements count: a new roof or an addition raises the basis, a coat of paint does not. Second, the gain is the sale price minus the basis minus the selling costs — $850,000.00 − $450,000.00 − $51,000.00 = $349,000.00. Third, the taxable gain is the gain minus the exclusion when the ownership-and-use test is met — $349,000.00 − $250,000.00 = $99,000.00 — and it is never below $0.00: a gain smaller than the exclusion is simply untaxed. Fourth, the exclusion is $250,000.00 single and $500,000.00 married filing jointly, and it needs the 2-of-5-years test: you must have owned and lived in the home at least 2 of the last 5 years. And fifth, the tax is the taxable gain times the capital-gains rate — $99,000.00 × 15% = $14,850.00 — and the rate depends on your income and filing status. This is the standard home-sale exclusion rule, not tax advice — the exclusion needs the 2-of-5-years test, a loss on a personal residence is not deductible, selling costs and improvements must be documented, and the rate depends on your income and filing status; check the current IRS rules or a tax professional for your situation.

The worked example, line by line

Setup: $850,000.00 sale, $400,000.00 purchase, $50,000.00 improvements, $51,000.00 selling costs, single, qualified, 15%.

Line 1 — add the improvements to the purchase price. The adjusted basis is $400,000.00 + $50,000.00 = $450,000.00.

Line 2 — subtract the basis and the selling costs from the sale price. The gain is $850,000.00 − $450,000.00 − $51,000.00 = $349,000.00.

Line 3 — subtract the exclusion. The taxable gain is $349,000.00 − $250,000.00 = $99,000.00 — the single exclusion, because the ownership-and-use test is met.

Line 4 — multiply by the rate. The tax is $99,000.00 × 15% = $14,850.00.

Every branch, checked

Married ($500,000 exclusion): Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, married, qualified, rate 15.00%: basis $450,000.00, gain $349,000.00, taxable gain $0.00, tax $0.00 — the $500,000.00 exclusion swallows the whole $349,000.00 gain, so the taxable gain is $0.00 and the tax is $0.00.

Test NOT met: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, not qualified, rate 15.00%: basis $450,000.00, gain $349,000.00, taxable gain $349,000.00, tax $52,350.00 — with no exclusion the whole $349,000.00 gain is taxable, and the tax is $52,350.00 — more than triple the default.

Rate 20%: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 20.00%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $19,800.00 — the same $99,000.00 taxable gain at 20% gives a $19,800.00 tax.

Rate 0%: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 0.00%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $0.00 — at a 0% rate the tax is $0.00 whatever the gain.

Sale $1,000,000: Sale $1,000,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $499,000.00, taxable gain $249,000.00, tax $37,350.00 — a $1,000,000.00 sale lifts the gain to $499,000.00, the taxable gain to $249,000.00, and the tax to $37,350.00.

Improvements $100,000: Sale $850,000.00, purchase $400,000.00, improvements $100,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $500,000.00, gain $299,000.00, taxable gain $49,000.00, tax $7,350.00 — $100,000.00 of improvements lifts the basis to $500,000.00, cuts the gain to $299,000.00, and the tax to $7,350.00 — improvements pay for themselves twice over.

Purchase $300,000: Sale $850,000.00, purchase $300,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $350,000.00, gain $449,000.00, taxable gain $199,000.00, tax $29,850.00 — a $300,000.00 purchase cuts the basis to $350,000.00, lifts the gain to $449,000.00, and the tax to $29,850.00.

The reverses, worked backwards

Sale price for a $0.00 taxable gain: $751,000.00 — the exact sale price is 751000.0000. At the displayed $751,000.00 the gain is $250,000.00, exactly the single exclusion, so the taxable gain is $0.00 and the tax is $0.00. $750,999.00 gives a $249,999.00 gain, still $0.00 of tax; $751,001.00 gives a $250,001.00 gain, a $1.00 taxable gain, and a $0.15 tax. The star is DOLLARS.

Improvements for a $10,000.00 tax: $82,333.33 — the exact improvements are 82333.3333. At the displayed $82,333.33 the gain is $316,666.67, the taxable gain is $66,666.67, and the tax is $10,000.00 (exact to the cent). $82,332.33 gives $10,000.15; $82,334.33 gives $9,999.85. The star is DOLLARS.

Rate for a $20,000.00 tax: 20.20% — the exact rate is 20.2020%. At the displayed 20.20% the tax is $19,998.00, $2.00 under the $20,000.00 target — rounding. 20.19% gives $19,988.10. The star is a PERCENT.

Selling costs for a $12,000.00 tax: $70,000.00 — the exact selling costs are 70000.0000. At $70,000.00 the gain is $330,000.00, the taxable gain is $80,000.00, and the tax is $12,000.00 (exact). $69,999.00 gives a $12,000.15 tax; $70,001.00 gives an $11,999.85 tax. The star is DOLLARS.

Purchase price for a $300,000.00 gain: $449,000.00 — the exact purchase price is 449000.0000. At $449,000.00 the gain is $300,000.00 (exact). $448,999.00 gives a $300,001.00 gain; $449,001.00 gives a $299,999.00 gain. The star is DOLLARS.

Sale price for a $25,000.00 tax: $917,666.67 — the exact sale price is 917666.6667. At the displayed $917,666.67 the gain is $416,666.67, the taxable gain is $166,666.67, and the tax is $25,000.00 (exact to the cent). $917,666.66 gives a $25,000.00 tax; $917,666.68 gives a $25,000.00 tax. The star is DOLLARS.

What the defaults assume

The defaults are an $850,000.00 sale, a $400,000.00 purchase, $50,000.00 of improvements, $51,000.00 of selling costs, single, qualified, and a 15% rate — basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $14,850.00. With a sale of $501,000.00, Sale $501,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $0.00, taxable gain $0.00, tax $0.00 — the sale exactly covers the basis and costs, so there is no gain at all. With a sale of $2,000,000.00, Sale $2,000,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $1,499,000.00, taxable gain $1,249,000.00, tax $187,350.00. With selling costs of $400,000.00, Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $400,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $0.00, taxable gain $0.00, tax $0.00 — the costs eat the whole gain. With selling costs of $500,000.00, Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $500,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain -$100,000.00, taxable gain $0.00, tax $0.00 — a loss, and a loss on a personal residence is not deductible. With married filing jointly and a $1,000,000.00 sale, Sale $1,000,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, married, qualified, rate 15.00%: basis $450,000.00, gain $499,000.00, taxable gain $0.00, tax $0.00 — the $500,000.00 exclusion swallows the whole gain. With a 20% rate and the test NOT met, Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, not qualified, rate 20.00%: basis $450,000.00, gain $349,000.00, taxable gain $349,000.00, tax $69,800.00. With improvements of $0, Sale $850,000.00, purchase $400,000.00, improvements $0.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $400,000.00, gain $399,000.00, taxable gain $149,000.00, tax $22,350.00.

Output · formula · meaning

OutputFormulaWhat it means
Sale priceinput$850,000.00.
Purchase priceinput$400,000.00.
Improvementsinput$50,000.00.
Selling costsinput$51,000.00.
Filing statusinputSingle.
Ownership-and-use testinputYes.
Capital-gains rateinput15.00%.
Adjusted basispurchase price + improvements$450,000.00.
Gainsale price − basis − selling costs$349,000.00.
Taxable gaingain − exclusion (if qualified), never below $0$99,000.00.
Taxtaxable gain × capital-gains rate$14,850.00.
Sale price for a $0.00 taxable gainexact 751000.0000$751,000.00 → $751,000.00.
$1 less than the R1 star$750,999.00Sale $750,999.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $249,999.00, taxable gain $0.00, tax $0.00.
$1 more than the R1 star$751,001.00Sale $751,001.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $250,001.00, taxable gain $1.00, tax $0.15.
Improvements for a $10,000.00 taxexact 82333.3333$82,333.33 → $82,333.33.
$1 less than the R2 star$82,332.33Sale $850,000.00, purchase $400,000.00, improvements $82,332.33, selling costs $51,000.00, single, qualified, rate 15.00%: basis $482,332.33, gain $316,667.67, taxable gain $66,667.67, tax $10,000.15.
$1 more than the R2 star$82,334.33Sale $850,000.00, purchase $400,000.00, improvements $82,334.33, selling costs $51,000.00, single, qualified, rate 15.00%: basis $482,334.33, gain $316,665.67, taxable gain $66,665.67, tax $9,999.85.
Rate for a $20,000.00 taxexact 20.2020%20.20% → 20.20%.
0.01pp below the R3 star20.19%Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 20.19%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $19,988.10.
0.01pp above the R3 star20.21%Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 20.21%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $20,007.90.
Selling costs for a $12,000.00 taxexact 70000.0000$70,000.00 → $70,000.00.
$1 less than the R4 star$69,999.00Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $69,999.00, single, qualified, rate 15.00%: basis $450,000.00, gain $330,001.00, taxable gain $80,001.00, tax $12,000.15.
$1 more than the R4 star$70,001.00Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $70,001.00, single, qualified, rate 15.00%: basis $450,000.00, gain $329,999.00, taxable gain $79,999.00, tax $11,999.85.
Purchase price for a $300,000.00 gainexact 449000.0000$449,000.00 → $449,000.00.
$1 less than the R5 star$448,999.00Sale $850,000.00, purchase $448,999.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $498,999.00, gain $300,001.00, taxable gain $50,001.00, tax $7,500.15.
$1 more than the R5 star$449,001.00Sale $850,000.00, purchase $449,001.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $499,001.00, gain $299,999.00, taxable gain $49,999.00, tax $7,499.85.
Sale price for a $25,000.00 taxexact 917666.6667$917,666.67 → $917,666.67.
$0.01 less than the R6 star$917,666.66Sale $917,666.66, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $416,666.66, taxable gain $166,666.66, tax $25,000.00.
$0.01 more than the R6 star$917,666.68Sale $917,666.68, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $416,666.68, taxable gain $166,666.68, tax $25,000.00.
Married ($500,000 exclusion)same modelSale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, married, qualified, rate 15.00%: basis $450,000.00, gain $349,000.00, taxable gain $0.00, tax $0.00.
Test NOT metsame modelSale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, not qualified, rate 15.00%: basis $450,000.00, gain $349,000.00, taxable gain $349,000.00, tax $52,350.00.
Rate 20%same modelSale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 20.00%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $19,800.00.
Rate 0%same modelSale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 0.00%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $0.00.
Sale $1,000,000same modelSale $1,000,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $499,000.00, taxable gain $249,000.00, tax $37,350.00.
Improvements $100,000same modelSale $850,000.00, purchase $400,000.00, improvements $100,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $500,000.00, gain $299,000.00, taxable gain $49,000.00, tax $7,350.00.
Purchase $300,000same modelSale $850,000.00, purchase $300,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $350,000.00, gain $449,000.00, taxable gain $199,000.00, tax $29,850.00.

Who uses this

  • The seller on an $850,000.00 sale: they learn the tax is $14,850.00 — and they check the $751,000.00 reverse to see the sale price at which the taxable gain first hits $0.00.
  • The married couple selling the same house: they learn the tax is $0.00 — and they check the $500,000.00 exclusion to see how much gain it shelters.
  • The seller who renovated: they learn $100,000.00 of improvements cuts the tax to $7,350.00 — and they check the $82,333.33 reverse to see the improvements that give a $10,000.00 tax.
  • The seller who moved out early: they learn losing the 2-of-5-years test raises the tax to $52,350.00 — and they check the 20% branch to see the worst case at $69,800.00.

Accuracy & limitations

The math is first-principles: the adjusted basis is the purchase price plus improvements; the gain is the sale price minus the basis minus the selling costs; the taxable gain is the gain minus the exclusion when the ownership-and-use test is met, otherwise the full gain, never below $0.00; the tax is the taxable gain times the capital-gains rate. Every figure is rounded to cents half-up, and intermediate money values are rounded to cents before the next step. What the model cannot do is tell you what YOUR tax will be: it is the standard home-sale exclusion rule only — it does NOT check whether you really meet the 2-of-5-years test, whether the home was ever rented out or used for business, or whether a partial exclusion applies; it does NOT model state capital-gains tax, the 3.8% net investment income tax, or depreciation recapture on a former rental; it does NOT add the cost of the sale beyond the selling costs you enter; and it assumes a single long-term rate on the whole taxable gain, while real rates are banded by income. A loss on a personal residence is not deductible. Use it to size the tax before you sell, then check the current IRS rules or a tax professional for your situation.

Cite this calculatorBright Side Kit. “Home Sale Capital Gains Calculator: Tax on Your Sale” brightoolbox.com, 2026. Method: adjusted basis = purchase price + improvements; gain = sale price − adjusted basis − selling costs; taxable gain = gain − exclusion ($250,000 single / $500,000 married filing jointly) when the ownership-and-use test is met, otherwise the full gain, never below $0; tax = taxable gain × capital-gains rate. This is the standard home-sale exclusion rule, not tax advice. Reverses: the sale price for a $0.00 taxable gain is $751,000.00 (exact 751000.0000; at $751,000.00 the gain is $250,000.00 and the taxable gain is $0.00); the improvements for a $10,000.00 tax are $82,333.33 (exact 82333.3333; at $82,333.33 the tax is $10,000.00); the rate for a $20,000.00 tax is 20.20% (exact 20.2020%; at 20.20% the tax is $19,998.00); the selling costs for a $12,000.00 tax are $70,000.00 (exact 70000.0000; at $70,000.00 the tax is $12,000.00); the purchase price for a $300,000.00 gain is $449,000.00 (exact 449000.0000; at $449,000.00 the gain is $300,000.00); the sale price for a $25,000.00 tax is $917,666.67 (exact 917666.6667; at $917,666.67 the tax is $25,000.00). Defaults: Sale $850,000.00, purchase $400,000.00, improvements $50,000.00, selling costs $51,000.00, single, qualified, rate 15.00%: basis $450,000.00, gain $349,000.00, taxable gain $99,000.00, tax $14,850.00. Bright Side Kit. "Home Sale Capital Gains Calculator: Tax on Your Sale" https://brightoolbox.com/home-sale-capital-gains/ Accessed October 26, 2026.
Embed this calculator

Frequently asked questions

How much tax do I owe on an $850,000 home sale?

$14,850.00. On the defaults — an $850,000.00 sale, a $400,000.00 purchase, $50,000.00 of improvements, $51,000.00 of selling costs, single, qualified, and a 15% rate — the basis is $450,000.00, the gain is $349,000.00, the taxable gain is $99,000.00, and the tax is $14,850.00.

What is the $250,000 home sale exclusion?

$250,000.00 of gain is tax-free for a single filer who meets the test — $500,000.00 married filing jointly. You must have owned and lived in the home at least 2 of the last 5 years. On the defaults the $250,000.00 exclusion cuts a $349,000.00 gain to a $99,000.00 taxable gain.

What sale price gives zero taxable gain as a single filer?

$751,000.00. At a $751,000.00 sale the gain is $250,000.00 — exactly the single exclusion — so the taxable gain is $0.00 and the tax is $0.00. At $750,999.00 the gain is $249,999.00, still $0.00 of tax.

What if I did not live in the home for 2 years?

The tax is $52,350.00. Without the exclusion the whole $349,000.00 gain is taxable at 15%. At a 20% rate with the test not met, the tax is $69,800.00.

Do improvements lower my tax?

Yes — they raise your basis. $100,000.00 of improvements lifts the basis to $500,000.00, cuts the gain to $299,000.00, and the tax to $7,350.00. Improvements of $82,333.33 give a $10,000.00 tax.

What capital-gains rate applies to my sale?

15% on the defaults — $14,850.00. At 0% the tax is $0.00 and at 20% it is $19,800.00. The rate depends on your income and filing status, so check the current brackets before you sell.

Can I deduct a loss on my home sale?

No. Selling costs of $500,000.00 give a −$100,000.00 loss, and the taxable gain is $0.00 — but the loss is not deductible on a personal residence.

What sale price gives a $25,000 tax?

$917,666.67. The exact sale price is 917666.6667: at $917,666.67 the gain is $416,666.67, the taxable gain is $166,666.67, and the tax is $25,000.00.