AbraCalc

Capital Gains Tax Calculator

Calculate capital gains tax on an asset sale from your sale proceeds, cost basis, and applicable capital-gains rate.

Embed this tool on your site

How to use this tool

  1. Enter your net sale proceeds (after selling costs).
  2. Enter your cost basis (purchase price plus buying costs and improvements).
  3. Enter your applicable capital-gains rate (e.g. 0%, 15%, or 20% for US long-term gains).
  4. Read your gain, tax, net gain, and net proceeds.

Estimate the tax on an investment sale. Enter what you sold it for, what you paid (your cost basis), and your capital-gains rate to see the gain, the tax, and what you keep.

Formula

Capital gain = Sale proceeds − Cost basis

Capital gains tax = max(0, Capital gain) × Rate

Net gain after tax = Capital gain − Tax  |  Net proceeds after tax = Proceeds − Tax

A loss (negative gain) produces zero tax in this estimate; losses may be deductible or carried forward depending on your jurisdiction.

How it works

Capital gains tax applies to the profit when you sell an asset for more than its cost basis. The gain equals sale proceeds minus cost basis; tax is the gain multiplied by your applicable capital-gains rate. If the sale is a loss, this calculator reports zero tax — real loss treatment (offsetting other gains, carryforwards) is jurisdiction-specific.

Rates depend on holding period and income. In the United States, assets held longer than a year (long-term) are commonly taxed at 0%, 15%, or 20%, while assets held a year or less (short-term) are taxed at ordinary income rates. Because the right rate is jurisdiction- and year-specific, you enter it directly so the math stays correct across tax years and countries. Include purchase and sale costs in your basis and proceeds for an accurate gain.

Prepared by the AbraCalc Tax Desk for educational use. This is an estimate, not tax advice; confirm your rate and rules with your tax authority (for the United States, the IRS).

Worked example

Sell for $15,000, bought for $10,000, taxed at 15%

  1. Capital gain = 15,000 − 10,000 = 5,000.
  2. Gain is positive, so tax = 5,000 × 15% = 750.
  3. Net gain after tax = 5,000 − 750 = 4,250.
  4. Net proceeds after tax = 15,000 − 750 = 14,250.

Capital gains tax = $750.00, net gain after tax = $4,250.00

Capital gains tax on a $5,000 gain by rate

Capital gains rateTax on $5,000 gainNet gain after tax
0%$0$5,000
10%$500$4,500
15%$750$4,250
20%$1,000$4,000
25%$1,250$3,750
28%$1,400$3,600
37%$1,850$3,150

Key terms

Capital gain
The profit from selling an asset: sale proceeds minus cost basis.
Cost basis
What you paid for an asset, including commissions and qualifying improvements.
Long-term vs short-term
Long-term gains come from assets held beyond a threshold (one year in the US) and are usually taxed at lower rates than short-term gains.
Capital loss
A negative gain (sold for less than basis); may offset gains or be carried forward subject to local rules.

Frequently asked questions

What is the difference between long-term and short-term capital gains?
Long-term gains come from assets held longer than the local threshold (one year in the US) and are usually taxed at preferential rates such as 0%, 15%, or 20%. Short-term gains (held a year or less in the US) are typically taxed at your ordinary income rate.
How do I find my cost basis?
Cost basis is generally what you paid for the asset plus purchase commissions and qualifying improvements. For reinvested dividends or inherited assets, special basis rules may apply.
What happens if I sell at a loss?
This calculator reports zero capital gains tax on a loss. In practice a capital loss may offset other capital gains and, subject to limits, reduce ordinary income or be carried to future years.

References & sources