Capital Gains Tax Calculator

This free capital gains tax calculator estimates the tax you owe on the profit from selling an investment — stocks, property, crypto, or other assets — based on your purchase price, sale price, and how long you held it. Because short-term and long-term gains are often taxed very differently, the holding period matters as much as the profit itself. Enter your figures and the calculator estimates your capital gain and the tax due.

How to Use the Calculator

  1. Enter the purchase price (cost basis).
  2. Enter the sale price.
  3. Enter the holding period and your tax rate.
  4. Calculate — see the gain and the estimated tax.

How Capital Gains Tax Works

Capital Gain = Sale Price − Purchase Price (cost basis)

Tax = Capital Gain × Applicable Rate

If you sell for less than you paid, you have a capital loss, which can often offset other gains. For example, buying at $5,000 and selling at $8,000 is a $3,000 gain; at a 15% long-term rate, the tax is $450.

Short-Term vs Long-Term Gains

TypeHolding PeriodTypical Tax Treatment
Short-termOne year or lessTaxed as ordinary income (higher)
Long-termMore than one yearTaxed at lower capital gains rates

Holding an asset for more than a year often qualifies for significantly lower long-term capital gains rates, which is why timing a sale can reduce your tax.

Ways to Reduce Capital Gains Tax

Note: Tax rules vary by country, state, and asset. This is an estimate; consult a tax professional.

Frequently Asked Questions

How is capital gains tax calculated?

Subtract your purchase price from the sale price to find the gain, then apply the relevant tax rate. A $3,000 gain at 15% is $450 in tax.

What is the difference between short-term and long-term gains?

Short-term gains (assets held one year or less) are usually taxed as ordinary income, while long-term gains (held over a year) are taxed at lower rates.

What is cost basis?

Cost basis is what you originally paid for an asset, including certain fees. Your capital gain is the sale price minus the cost basis.

Can capital losses reduce my tax?

Yes — capital losses can offset capital gains, and in some jurisdictions a limited amount can offset ordinary income, reducing your tax.

Is this capital gains tax calculator free?

Yes — it is completely free, requires no signup, and estimates your gain and tax.