Capital Gains Tax for Shares Calculator
Estimate your gain, taxable amount, and tax due when you sell shares. Enter your own numbers, then click Calculate.
This calculator is for educational purposes only and does not replace professional tax advice.
How this capital gains tax for shares calculator helps
When you sell stocks, ETFs, or other shares, the tax treatment can reduce your final profit more than you expect. A quick estimate before selling helps you plan better, avoid surprises at filing time, and decide whether to sell now or later.
This calculator gives you a clean estimate of:
- Your cost basis (what you originally paid including fees)
- Your sale proceeds (what you receive after selling fees)
- Your gross capital gain or loss
- Your taxable gain after allowance/exemption
- Your estimated tax due and net profit after tax
Calculation formula used
The calculator uses a straightforward formula:
- Cost Basis = (Shares × Buy Price) + Buy Fees
- Net Sale Proceeds = (Shares × Sell Price) − Sell Fees
- Gross Gain/Loss = Net Sale Proceeds − Cost Basis
- Taxable Gain = Max(Gross Gain − Allowance, 0)
- Tax Due = Taxable Gain × Tax Rate
- Net Profit After Tax = Gross Gain − Tax Due
If your trade results in a loss, tax due is shown as zero in this simplified model.
Example: quick scenario
Suppose you sold 100 shares bought at 25 each and sold at 40 each, paid 10 in buy fees, 10 in sell fees, with a 1,000 allowance and a 15% tax rate.
- Cost basis: 2,510
- Net proceeds: 3,990
- Gross gain: 1,480
- Taxable gain after allowance: 480
- Tax due: 72
- Net profit after tax: 1,408
That simple comparison can change your decision on position sizing or sell timing.
Important tax details to consider
1) Holding period matters in many countries
Some tax systems distinguish short-term and long-term gains. Long-term rates are often lower. If your rules differ by holding period, update the tax rate field with the rate that applies to your exact case.
2) Allowances and exemptions can change yearly
Your annual capital gains allowance may rise or fall with tax law updates. Always use the latest figure for your filing year.
3) Losses can offset gains
This calculator handles one transaction at a time. In real returns, losses from other positions may reduce taxable gains. Keep full records across your portfolio.
4) Corporate actions can affect cost basis
Stock splits, spin-offs, mergers, dividend reinvestment plans, and rights issues may alter your true cost basis. If cost basis is wrong, your gain estimate will be wrong.
Common mistakes investors make
- Forgetting trading fees when calculating gain
- Using average memory values instead of exact broker statements
- Ignoring allowance/exemption thresholds
- Assuming tax applies to total proceeds instead of actual gain
- Not planning for taxes before taking profits
How to use this calculator like a pro
- Pull exact buy/sell confirmations from your broker.
- Enter fees as totals, not per-share guesses.
- Set your current tax-year allowance.
- Use the correct tax rate for your holding period and income band.
- Run multiple scenarios (sell now vs later, partial sale vs full sale).
Who this calculator is best for
This tool is useful for individual investors, beginners building their first taxable account, and experienced traders who want a quick planning estimate before executing a sell order.
Final note
Tax rules vary by country and sometimes by state or province. Use this as a planning calculator, then confirm your final tax treatment with your local tax authority guidance or a qualified accountant.