How to calculate profit on shares after tax
Profit before tax = sale value − purchase value − fees. Tax is charged on a positive result, and what remains is your net profit.
Example: you buy 10 shares at 100 and sell at 130, with 10 in total fees. The result before tax is 1,300 − 1,000 − 10 = 290. At a 20% capital gains tax you pay 58 and keep 232 — a 22.97% return on the 1,010 you spent. With no tax, the return is 28.71%.
Capital gains tax
- Rates and allowances differ by country — for example 18–24% in the UK above the annual exempt amount, 0/15/20% on long-term gains in the US, and 26.375% in Germany including the solidarity surcharge.
- Many countries let you offset losses against gains, sometimes carrying them forward to later years.
- Tax-advantaged accounts (such as ISAs or retirement accounts) can shelter gains entirely.
Break-even selling price
The calculator also shows the price at which a sale breaks even after fees: (purchase value + fees) ÷ number of shares. In the example that is 101 per share.
Frequently asked questions
Should dividends go into this calculator?
No — dividends are usually taxed separately. The calculator works out the profit from selling.
What tax rate should I enter?
The capital gains rate that applies to you, or 0% for investments held in a tax-free account.