The purchases (HS284 Example 3, Ms Pierson)
| When | What | Shares | Cost with dealing costs |
|---|---|---|---|
| April 2017 | Buy at 400p, plus £150 costs | 1,000 | £4,150 |
| September 2020 | Buy at 410p, plus £80 costs | 500 | £2,130 |
| Pool | 1,500 | £6,280 | |
First sale: May 2025
- Sells 700 shares at 480p: £3,360, with £100 of costs.
- Cost from the pool: £6,280 × 700 ÷ 1,500 = £2,931.
- Gain: £3,360 − £2,931 − £100 = £329.
- Pool left: 800 shares, £3,349.
Second sale: February 2026
- Sells 400 shares at 520p: £2,080, with £105 of costs.
- Cost from the pool: £3,349 × 400 ÷ 800 = £1,675.
- Gain: £2,080 − £1,675 − £105 = £300.
- Pool left: 400 shares, £1,674 (HMRC's rounded figure).
Both sales are in the 2025-26 tax year, so her gains for the year are £329 + £300 = £629, well inside the £3,000 allowance (if she has no other gains).
Things to remember
- Dealing costs on a purchase are added to the pool's cost; costs on a sale are taken off the gain.
- The pool is an average: it doesn't matter which shares you "really" sold.
- Same-day and 30-day purchases are matched first and kept out of the pool (the 30-day rule).
- Share splits and some company events change the number of shares in the pool without changing its cost. HMRC's helpsheet HS285 covers those.
Working it out with Get My Gains
Get My Gains works out Capital Gains Tax on your shares in your browser, with nothing uploaded, using these same HMRC rules. It reads Trading 212, Freetrade, Interactive Brokers and Hargreaves Lansdown files (other brokers' files can be matched column by column), and leaves out ISA and pension accounts. It's free to check your gains and estimated tax.
Work out your shares tax See an example report
Official guidance
This guide is general information, not tax advice or investment advice. It covers individuals who are UK residents. It is not connected to or endorsed by HMRC. Check HMRC's guidance or ask an accountant before you file.
Figures from HMRC helpsheet HS284 Example 3 (2026), checked against it on 11 Nov 2026. HMRC's text says "February 2025" in one place but "February 2026" in its working; the working is used here.
More guides: shares guides · all guides · the 30-day rule · SA108 boxes 23–27