CGT on Shares Calculator

Calculate capital gains tax on share sales. Includes annual exempt amount, basic/higher rates and ISA tip.

Source: GOV.UK, Tax when you sell shares

Konstantin Iakovlev

By Konstantin Iakovlev · Founder, Calks.uk

Last updated: · Verified against HMRC and FCA 2026/27 limits

Rates verified: 28 September 2026

£
£
£
£

Disclaimer

This calculator is for guidance only. It is not financial or tax advice: check anything you rely on against the official source or a qualified adviser. Rates and figures come from HMRC limits and FCA guidance and are reviewed for the 2026/27 tax year. Everything is calculated in your browser; nothing you enter is sent to our servers.

How It Works

Working out capital gains tax on shares starts with the cost side, and the rules do not let you choose which shares you sold. Under section 104 of TCGA 1992, every share of the same class in the same company is pooled together and carries a single average cost. When you sell, the gain is the sale proceeds less that average cost multiplied by the number of shares disposed of, then less allowable expenses such as broker commission and the stamp duty paid on purchase.

Two matching rules jump the queue ahead of the pool. Anything sold is first matched against shares of the same type bought on the same day. Whatever is left is then matched against purchases made in the following 30 days, the rule usually called bed and breakfasting, which exists to stop people crystallising a loss by selling and immediately buying the same holding back. Only once both have been applied does the section 104 pool come into play. Most brokers do not track the pool for you, which is why specialist software such as CGT Sheets or Sharesight tends to fill the gap.

The first £3,000 of gains in a tax year is covered by the annual exempt amount. Above that, gains falling within your basic-rate band are taxed at 18% and gains above it at 24%, the rates that have applied since 30 October 2024. Because gains stack on top of income, a single disposal can straddle the threshold, with the slice that pushes you past the basic-rate limit taxed at the higher figure. Selling 500 shares with a pooled cost of £10 each for £18 each produces a £9,000 receipt, a £4,000 gain, £1,000 of taxable gain after the exemption and £240 of tax at 24%.

A disposal covers more than a straightforward sale, since transferring shares counts too, with transfers to a spouse or to charity the main exceptions. The standard planning move is bed and ISA: selling a holding outside an ISA, using up the annual exempt amount on the gain, then buying it straight back inside the wrapper so future growth sits beyond the reach of tax.

Employee share schemes run on their own rules. Shares from an EMI arrangement can qualify for Business Asset Disposal Relief once the option was granted at least two years before the sale, with no 5% shareholding needed, which taxes the gain at 18% from 6 April 2026 (14% in 2025/26) instead of the 24% higher rate. SAYE and Sharesave shares are bought at a discount and can be moved into an ISA within 90 days for continuing shelter. Shares left in a Share Incentive Plan trust for 5 years attract neither income tax nor CGT, and a Company Share Option Plan avoids income tax where the options are held for at least 3 years.

Losses are the part people forget to claim. A loss on one disposal offsets gains made in the same tax year, so a profitable sale can be netted against a poor one before the exemption is applied. Anything unused carries forward indefinitely against future gains, but only if you claim it within 4 years of the end of the tax year in which the loss arose, through Self Assessment. Paper losses on holdings you still own do not count, however grim the valuation looks, because only realised disposals register.

Example: Selling 500 shares with pooled cost of £10 each

  1. Pooled cost: 500 × £10 = £5,000
  2. Sale proceeds: 500 × £18 = £9,000
  3. Gain: £9,000 − £5,000 = £4,000
  4. Less annual exempt amount: −£3,000
  5. Taxable gain: £1,000 at 24% (higher rate, from 30 Oct 2024) = £240

Source: GOV.UK, Tax when you sell shares

Frequently Asked Questions

When I sell shares, what counts as my cost basis?
All shares of the same class in one company are pooled together under section 104 of TCGA 1992, giving a single average cost per share. When you sell, the gain is the sale proceeds minus that pooled average cost multiplied by the number of shares sold. Broker commission and the stamp duty paid on purchase come off as allowable expenses.
What rate of capital gains tax do I pay on shares?
The first £3,000 of gains each tax year is free under the annual exempt amount. Beyond that, gains sitting within your basic-rate band are taxed at 18% and anything above it at 24%, the rates in force since 30 October 2024. Gains stack on top of income, so one disposal can be taxed partly at each rate where it crosses the basic-rate limit.
What is the 30-day bed and breakfasting rule?
If you sell shares and buy the same type back within the following 30 days, the disposal is matched against that repurchase rather than against the section 104 pool. It stops people banking a loss on paper while keeping the holding. Sales are matched first against same-day purchases, then against the 30-day window, and only then against the pooled average cost.
Can I carry a loss on shares forward to a later tax year?
Yes. Losses first offset gains made in the same tax year, and anything left over carries forward indefinitely against future gains. The condition is that you claim the loss within 4 years of the end of the tax year in which it arose, through Self Assessment. Only realised disposals count, so a holding that has fallen in value but has not been sold gives you nothing to claim.