Capital Gains Tax Calculator (Shares)
Estimate your capital gains tax when you sell shares. Enter your buy/sell details, costs, allowance, and tax rates.
How this capital gains tax calculator on shares works
This calculator gives you a practical estimate of tax when you sell shares at a profit. It starts with your total buying cost and total selling proceeds, then adjusts for fees, capital losses, and any annual exemption you enter. Finally, it applies either a short-term or long-term tax rate based on your holding period.
It is useful for quick planning before you sell, especially when comparing whether to sell now or wait until you pass a long-term holding threshold.
Core formula used
- Total purchase cost = (shares × buy price) + buying fees
- Total sale proceeds = (shares × sell price) − selling fees
- Net capital gain = sale proceeds − purchase cost
- Adjusted gain = net gain − loss offsets
- Taxable gain = max(0, adjusted gain − annual allowance)
- Capital gains tax = taxable gain × applicable tax rate
Input guide for better estimates
1) Number of shares and prices
Use your actual filled quantity and executed prices, not target or limit prices. Even small price differences can materially change the taxable gain on large positions.
2) Fees and costs
Include trading commissions and eligible transaction costs. These typically increase your cost basis (on buy) or reduce your proceeds (on sell), which can reduce taxable gains.
3) Holding period
Many tax systems apply different rates depending on how long you held the shares. If your jurisdiction uses a 12-month test, keep the long-term threshold at 12. If different, update it in the calculator.
4) Annual allowance and loss offsets
If your tax regime allows an annual exemption or prior-year losses, include them. These can significantly reduce your taxable amount before the rate is applied.
Worked example
Suppose you bought 100 shares at 25 each and sold at 40 each. If total buy and sell fees are 10 each, your raw gain is reduced by costs. If you have a 3,000 allowance and are on a 15% long-term rate, your tax may be zero if your taxable gain is fully covered by the allowance. The calculator shows each step clearly so you can see exactly where the number comes from.
Common mistakes when calculating CGT on shares
- Ignoring broker costs and duties.
- Using rounded prices instead of actual execution prices.
- Applying the wrong rate for your holding period.
- Forgetting to include capital losses carried forward.
- Assuming all gains are taxable without considering exemptions.
Planning tips before you sell
- Model multiple sale dates to compare short-term vs long-term rates.
- Consider partial sales across tax years where permitted.
- Use realized losses strategically to offset gains.
- Keep complete transaction records for every buy and sell lot.
Record-keeping checklist
- Trade confirmations for each purchase and sale.
- Broker statements showing fees and taxes paid.
- Corporate action records (splits, mergers, spin-offs).
- Dividend reinvestment details (if applicable).
- Prior-year tax filings showing carried losses.
Disclaimer: This calculator provides an estimate for educational use and planning. Tax rules vary by country and personal circumstances. Always confirm with current local tax law or a qualified tax professional before filing.