Capital Gains Tax Calculator
Enter what you paid, what you sold for, how many units, and your applicable capital-gains tax rate to estimate your gain, the tax owed, and your profit after tax.
Enter the sale details
What you paid per unit, per share, or per coin.
What you sold each unit for.
Number of units, shares, or coins sold. Fractions allowed.
Your applicable effective rate. It depends on your income, holding period, and country — short-term versus long-term in the US, or the 50% inclusion rule in Canada.
A $3,000.00 capital gain, less $450.00 in estimated tax.
- Capital gain
- $3,000.00
- Tax owed
- $450.00
- Return
- 60.00%
How capital gains tax is estimated
The capital gain is the difference between total proceeds and total cost — sale price times quantity, minus purchase price times quantity. Tax owed applies your effective capital-gains rate to a positive gain only; a loss produces no tax here. Net profit is the gain minus the estimated tax. Your rate depends on your income, how long you held the asset, and your country: the US taxes short-term gains as ordinary income and long-term gains at preferential rates, while Canada includes 50% of a gain in taxable income. Enter the effective rate that applies to you.
Capital gain = (Sale − Purchase) × QuantityTax owed = max(Capital gain, 0) × (Rate ÷ 100)Net profit = Capital gain − Tax owed- Purchase
- Purchase price per unit
- Sale
- Sale price per unit
- Quantity
- Units, shares, or coins sold
- Rate
- Your effective capital-gains rate
100 units bought at $50, sold at $80, taxed at 15%
Suppose you bought 100 units at $50 each and sold them at $80 each, with a 15% capital-gains rate. Total cost is $5,000 and total proceeds are $8,000, for a $3,000 capital gain — a 60% return. Tax owed is 15% of $3,000, which is $450, leaving a net profit after tax of $2,550.
This is an educational estimate based only on the values you enter. It does not determine your actual tax rate, and it is not tax advice.
What this calculator assumes
- You enter a single effective capital-gains rate — this tool does not decide short-term versus long-term treatment for you.
- Losses (a negative gain) produce no tax here and are not carried forward or offset against other gains.
- Purchase and sale prices are per unit, and the same quantity is used for both.
- Commissions, fees, and the Canadian 50% inclusion rule are not applied automatically — fold them into your rate or prices if needed.
- Money values are rounded to the nearest cent for display.
Capital gains FAQ
What rate should I enter?
Enter your effective capital-gains rate. In the US that depends on whether the gain is short-term (taxed as ordinary income) or long-term (0%, 15%, or 20% for most filers). In Canada, only 50% of the gain is taxable, so your effective rate on the full gain is roughly half your marginal rate.
What if I sold at a loss?
If your sale price is below your purchase price, the capital gain is negative and this calculator shows no tax owed. Real tax rules for using losses to offset gains vary by country and are not modeled here.
Sources and review notes
- U.S. Internal Revenue Service — Topic No. 409, Capital Gains and Losses
- Canada Revenue Agency — Capital gains
Methodology last checked Jul 14, 2026. Formula implementation is covered by deterministic unit tests. No tax professional review is claimed yet.