What Is the Capital Gains Tax Calculator?
This calculator estimates the tax you owe when you sell an asset — such as stocks, mutual funds, real estate, or crypto — for more than you paid for it. The taxable amount is your capital gain: the difference between the sale price and your cost basis. You then apply your capital gains tax rate to that gain to find the tax owed. Because tax rates vary by country, holding period, and income level, this tool lets you enter your own rate so it works in any jurisdiction.
How to Use It
Enter three values: the sale price (total amount you received), the cost basis (what you originally paid, including commissions and fees), and your capital gains tax rate as a percentage. Use a short-term rate if you held the asset for a year or less (often taxed as ordinary income) or a long-term rate if you held it longer (often a lower preferential rate). The calculator returns the gain, the tax owed, and your net proceeds after tax.
The Formula Explained
First the gain is computed as Sale Price − Cost Basis. If the result is positive, the tax is
$$\text{Tax} = \left( \text{Sale Price} - \text{Cost Basis} \right) \times \frac{\text{Rate (\%)}}{100}$$If you sold at a loss (a negative gain), no capital gains tax applies, so the tax is zero. Net proceeds equal the sale price minus the tax.
Worked Example
Suppose you bought shares for a cost basis of $6,000 and sold them for $10,000, with a long-term rate of 15%. Your gain is
$$\$10{,}000 - \$6{,}000 = \$4{,}000$$The tax is
$$\$4{,}000 \times 0.15 = \$600$$Your net proceeds are
$$\$10{,}000 - \$600 = \$9{,}400$$
FAQ
What is cost basis? It's the original purchase price plus any acquisition costs like brokerage fees, which reduces your taxable gain.
What if I sold at a loss? There's no capital gains tax on a loss; the tool shows $0 tax. You may be able to use the loss to offset other gains.
Short-term vs long-term rate? Assets held one year or less are usually taxed at higher ordinary-income rates, while longer-held assets typically qualify for lower long-term rates. Enter whichever applies to your situation.