Finance

Capital Gains Tax Calculator

When you sell an asset for more than you paid, the profit is a capital gain. In the US, gains held over a year are taxed at lower long-term rates, while shorter holdings use your ordinary income rate. Enter your cost basis, sale proceeds, holding period and the two tax rates, and the calculator shows the gain, the rate applied, the tax owed and your after-tax profit — updating as you type.

Estimates only. This tool is provided for educational purposes and is not financial advice. It models the figures you enter — it does not know your credit terms, local taxes, or fees. Talk to a licensed adviser before making a decision.

$
$
%
%

How to use the capital gains tax calculator

  1. Enter your cost basis — the total you paid, including purchase price and fees.
  2. Enter the sale proceeds — what you received after selling.
  3. Enter the holding period in years. One year or more counts as long-term.
  4. Enter your short-term and long-term tax rates as percentages.
  5. Read the gain, the rate applied, the tax owed and your after-tax profit.

Worked example

You buy an asset for $10,000 and sell it 2 years later for $15,000. The gain is $5,000. Because you held it over a year, the 15% long-term rate applies, so the tax is $750 and your after-tax profit is $4,250.

The math

gain = sale proceeds - cost basis

long-term if holding >= 1 year, else short-term

rate = long-term rate if long-term else short-term rate

tax = gain x rate% / 100 (only if gain > 0)

after-tax profit = gain - tax

This uses the US distinction between short-term gains (taxed as ordinary income) and long-term gains (taxed at lower rates). Your actual rate depends on your income bracket and country rules.

Frequently asked questions

What is a capital gain?

A capital gain is the profit you make when you sell an asset — such as stocks, crypto or property — for more than its cost basis (what you paid plus buying fees).

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

In the US, assets held for one year or more get long-term capital gains rates, which are usually lower. Assets held under a year are taxed at your ordinary income rate (short-term).

Do I pay tax if I lose money?

No. If your sale proceeds are below your cost basis, you have a capital loss, not a gain. Losses can often offset other gains or a limited amount of ordinary income.

Are dividends included?

No. This calculator looks only at the gain from buying and selling the asset. Qualified dividends are taxed separately, usually at the long-term capital gains rate.

Does this apply outside the US?

The short- vs long-term split is a US rule. Other countries have their own rates and holding-period rules, so use this as a rough estimate and check your local tax authority.

Related tools