Taxes & Paycheck · Formula v1.0

Capital Gains Tax Calculator

Estimate taxable gain and tax from proceeds, basis, costs and rate.

Make the gain explicit before applying a rate. Enter sale proceeds in dollars, adjusted tax basis in dollars, selling costs in dollars and estimated tax rate in percent (15 means 15%). At the worked-example inputs, the estimated capital-gains tax is $2,850. The taxable gain is the profit after basis and selling costs, and the tax is the gain times the rate. On the example, $19,000 of gain at 15% is $2,850. Timing matters: waiting past one year to sell usually cuts the rate sharply, and offsetting gains with losses, or selling in a low-income year when the rate may be 0%, can reduce the tax. It returns estimated capital-gains tax, taxable gain.

FreeNo sign-upInputs stay in-browserCSV exportReviewed August 17, 2026
LAST REVIEWEDAugust 17, 2026Inputs stay in your browser
Live calculation

Enter your numbers

Calculated result
Estimated capital-gains tax$2,850
Taxable gain$19,000
Sensitivity check

What if estimated tax rate changes?

-10% input$2,565
0% input$2,850
+10% input$3,135

Transparent method

The formula

Estimated tax = (proceeds − basis − selling costs) × tax rate

Worked example

Estimated capital-gains tax$2,850
Taxable gain$19,000

Example inputs

Sale proceeds$50,000
Adjusted tax basis$30,000
Selling costs$1,000
Estimated tax rate15.0%

How to interpret the result

The gain being taxed is proceeds minus basis minus selling costs, not the sale price alone, and basis is often more than the original purchase price once improvements, reinvested dividends or prior adjustments are factored in. Leaving basis understated overstates the taxable gain, sometimes substantially, on an asset held for years with several additions to its cost along the way.

Before you rely on it

What to check

Confirm your basis figure includes every legitimate addition, improvements, reinvested distributions, adjustments, not just the original purchase price.

The common error

Where people go wrong with capital gains tax calculator

Using the original purchase price alone as basis on an asset that's had capital improvements or reinvested distributions added over time. That understatement inflates the taxable gain beyond what's actually owed.

Sensitivity evidence

How estimated tax rate changes the estimated capital-gains tax

Capital Gains Tax Calculator: estimated capital-gains tax and taxable gain across a range of estimated tax rate, every other input held at the worked-example value.
Estimated tax rateEstimated capital-gains taxTaxable gain
11.0%$2,090$19,000
13.0%$2,470$19,000
15.0%worked example$2,850$19,000
17.0%$3,230$19,000
19.0%$3,610$19,000

Every input, tested

Which input moves the estimated capital-gains tax most

Capital Gains Tax Calculator: estimated capital-gains tax with each input moved on its own, every other input held at the worked-example value.
InputTested fromToEstimated capital-gains tax at each endSwing
Sale proceeds$45,000$55,000$2,100 to $3,600$1,500 (53%)
Adjusted tax basis$27,000$33,000$3,300 to $2,400$900 (32%)
Estimated tax rate13.0%17.0%$2,470 to $3,230$760 (27%)
Selling costs$900$1,100$2,865 to $2,835$30 (1.1%)

Two variables at once

Estimated capital-gains tax by estimated tax rate and sale proceeds

Capital Gains Tax Calculator: estimated capital-gains tax at each combination of estimated tax rate (rows) and sale proceeds (columns).
Estimated tax rate \ Sale proceeds$40,000$50,000$60,000
11.0%$990$2,090$3,190
13.0%$1,170$2,470$3,770
15.0%$1,350$2,850$4,350
17.0%$1,530$3,230$4,930
19.0%$1,710$3,610$5,510

Step by step

The worked example, input by input

Worked-example inputs and the results they produce for the capital gains tax calculator.
InputValue used
Sale proceeds$50,000
Adjusted tax basis$30,000
Selling costs$1,000
Estimated tax rate15.0%
Estimated capital-gains tax$2,850
Taxable gain$19,000

Where the inputs come from

Sale proceeds are what you received, adjusted tax basis is what you paid plus improvements and reinvested dividends, and selling costs are commissions and fees. The tax rate depends on your holding period and income: assets held over a year get long-term rates of 0%, 15% or 20% depending on taxable income, while shorter holdings are taxed at ordinary rates. Add 3.8% for the net investment income tax if your income is above the threshold. Get basis from your brokerage's cost-basis report.

Using the estimated capital-gains tax in a real decision

Compare after-tax proceeds when choosing among assets to sell.

When the result stops applying

A single flat rate is a simplification, since a gain can span more than one rate band. Special rates apply to collectibles and depreciation recapture on real estate. The home sale exclusion, inherited assets with stepped-up basis and gifts have different rules. State taxes add to the total. Losses can offset gains and up to $3,000 of ordinary income.

What to compare it with

Plan losses with the tax-loss harvesting calculator, and check the stock and crypto profit calculators for the pre-tax result. The federal income tax page shows how gains stack on ordinary income. The tax-equivalent yield calculator compares taxable and tax-free returns.

People also ask

Frequently asked questions

What is the long-term capital gains tax rate?

Generally 0%, 15% or 20% depending on taxable income, for assets held more than a year. Short-term gains are taxed at ordinary income rates.

How do I find my cost basis?

Look at your broker's cost-basis report or trade confirmations, and add commissions and improvements. For inherited assets, basis is usually the value at the owner's death.

Can losses reduce my capital gains tax?

Yes. Losses offset gains of the same year, and up to $3,000 of excess loss offsets ordinary income, with the rest carried forward.

Common taxes & paycheck questions

Sources and evidence