Skip to main content

Worked Examples

Step-by-step calculations showing how HMRC share matching rules work in practice. Click “Try this example” to load the trades directly into the calculator, then swap in your own.

New here? See the full manual for how the calculator works, or the FAQ for common questions about UK CGT.

1

Basic buy and sell

Section 104 pool match with no special rules

Lisa bought 100 AAPL shares on 15 March 2023 at £12.50 per share, paying £11.95 in broker fees. After watching the price rise over the following months, she decided to sell 45 shares on 20 January 2024 at £18.00 per share (with another £11.95 fee). She wants to calculate her capital gain for the 2023/24 tax year.

No same-day or bed & breakfast rules apply — the disposal is matched entirely against the Section 104 pool.

Transactions

DateTypeSymbolQtyPriceFeesCcyFX RateGBP Value
2023-03-15BuyAAPL100£12.50£11.95GBP1.00£1,261.95
2024-01-20SellAAPL45£18.00£11.95GBP1.00£810.00

Calculation

Pool after buy:100 shares. Total cost = (100 × £12.50) + £11.95 fees = £1,261.95. Average = £12.62/share.

Match disposal: No same-day or B&B match. The 45-share sale is matched against the pool.

Allowable cost:(45/100 × £1,261.95) + £11.95 selling fees = £567.88 + £11.95 = £579.83.

Proceeds:45 × £18.00 = £810.00.

Gain:£810.00 − £579.83 = £230.17

Pool after sale:55 shares with £694.07 cost (avg £12.62/share).

2

Same-day rule

Buy and sell on the same day

Marcus bought 200 MSFT shares on 12 February 2024 at £45.00 each. Later that same day, the price jumped and he sold 80 shares at £52.00 each. He then bought another 50 shares at £50.00 to top back up. Each trade cost £9.99 in fees.

When you buy and sell the same share on the same day, the same-day rule takes priority over pool matching. The disposal is matched against same-day acquisitions first. Read the full step-by-step guide →

Transactions (all on 2024-02-12)

DateTypeSymbolQtyPriceFeesCcyFX RateGBP Value
2024-02-12BuyMSFT200£45.00£9.99GBP1.00£9,009.99
2024-02-12SellMSFT80£52.00£9.99GBP1.00£4,160.00
2024-02-12BuyMSFT50£50.00£9.99GBP1.00£2,509.99

Calculation

Same-day acquisitions:200 + 50 = 250 shares acquired on this day. Total cost = £9,009.99 + £2,509.99 = £11,519.98.

Same-day match:80-share disposal matched to same-day acquisitions. Allowable cost = (80/250 × £11,519.98) + £9.99 selling fees = £3,686.39 + £9.99 = £3,696.38.

Proceeds:80 × £52.00 = £4,160.00.

Gain:£4,160.00 − £3,696.38 = £463.62

Pool after netting:250 − 80 = 170 shares enter pool with cost £11,519.98 − £3,686.39 = £7,833.59.

3

Bed & breakfast rule

Repurchase within 30 days of selling

Sarah bought 300 VOD shares on 1 June 2023 at £1.20 each (£11.95 fee). On 5 March 2024, she sold 100 shares at £0.95 hoping to crystallise a loss. However, 15 days later on 20 March 2024, she bought 100 VOD back at £0.98 (£11.95 fee). Each sale also cost £11.95.

Because she repurchased within 30 days, the bed & breakfast rule overrides the pool match. The disposal is matched against the repurchase instead. Read the full step-by-step guide →

Transactions

DateTypeSymbolQtyPriceFeesCcyFX RateGBP Value
2023-06-01BuyVOD300£1.20£11.95GBP1.00£371.95
2024-03-05SellVOD100£0.95£11.95GBP1.00£95.00
2024-03-20BuyVOD100£0.98£11.95GBP1.00£109.95

Calculation

B&B match: The 20 March buy is within 30 days of the 5 March sale. The disposal is matched against the repurchase.

Allowable cost (B&B):(100 × £0.98) + £11.95 buy fee + £11.95 sell fee = £98.00 + £23.90 = £121.90.

Proceeds:100 × £0.95 = £95.00.

Loss:£95.00 − £121.90 = −£26.90

Without B&B (what Sarah expected): Pool cost = (100/300 × £371.95) + £11.95 = £135.93. Loss = £95.00 − £135.93 = −£40.93.

Effect on pool: Pool remains at 300 shares / £371.95. The repurchased shares do NOT enter the pool — they were consumed by the B&B match.

4

Section 104 pool (multiple buys)

Building a position over time, then selling

James has been building a position in VWRL over several years. He bought 200 shares on 1 September 2022 at £75, added 150 more on 15 February 2023 at £80, and another 100 on 1 November 2023 at £85. Each buy cost £11.95 in fees. On 15 June 2024, he sold 250 shares at £95 (£11.95 fee).

All purchases are aggregated into a single Section 104 pool with a weighted average cost. When he sells, the cost is drawn proportionally. Read the full step-by-step guide →

Transactions

DateTypeSymbolQtyPriceFeesCcyFX RateGBP Value
2022-09-01BuyVWRL200£75.00£11.95GBP1.00£15,011.95
2023-02-15BuyVWRL150£80.00£11.95GBP1.00£12,011.95
2023-11-01BuyVWRL100£85.00£11.95GBP1.00£8,511.95
2024-06-15SellVWRL250£95.00£11.95GBP1.00£23,750.00

Calculation

Pool total:450 shares. Cost = £15,011.95 + £12,011.95 + £8,511.95 = £35,535.85. Avg = £78.97/share.

Match: No same-day or B&B. Pool match for 250 shares.

Allowable cost:(250/450 × £35,535.85) + £11.95 selling fee = £19,742.14 + £11.95 = £19,754.09.

Proceeds:250 × £95.00 = £23,750.00.

Gain:£23,750.00 − £19,754.09 = £3,995.91

Pool after sale:200 shares with £15,793.71 cost (avg £78.97/share).

5

Stock split

Buy, stock split, then sell in two tranches

Rachel bought 15 AMZN shares on 10 January 2022 at $2,800 each ($9.99 fee, FX rate 1.3215). On 6 June 2022, Amazon executed a 20-for-1 stock split — her 15 shares became 300 shares. She sold 100 shares on 20 September 2023 at $145 ($4.99 fee, FX 1.2631) and another 80 on 12 August 2024 at $180.50 ($4.99 fee, FX 1.3033).

A stock split does NOT trigger a disposal. The total cost basis stays the same — it's just spread across more shares, reducing the per-share cost proportionally.

Transactions

DateTypeSymbolQty / RatioPriceFeesCcyFX RateGBP Value
2022-01-10BuyAMZN15$2,800.00$9.99USD1.3215£31,789.63
2022-06-06SplitAMZN20:1
2023-09-20SellAMZN100$145.00$4.99USD1.2631£11,479.69
2024-08-12SellAMZN80$180.50$4.99USD1.3033£11,079.57

Calculation

Pool after buy (pre-split)

15 shares. Cost = (15 × $2,800 ÷ 1.3215) + ($9.99 ÷ 1.3215) = £31,782.07 + £7.56 = £31,789.63.

After 20:1 split

15 × 20 = 300 shares. Total cost unchanged: £31,789.63. New avg = £105.97/share.

Disposal 1: Sell 100 shares (2023-09-20)

Allowable cost: (100/300 × £31,789.63) + ($4.99 ÷ 1.2631) = £10,596.54 + £3.95 = £10,600.49.

Proceeds: 100 × $145 ÷ 1.2631 = £11,479.69.

Gain: £11,479.69 − £10,600.49 = £879.20

Disposal 2: Sell 80 shares (2024-08-12)

Pool: 200 shares, £21,193.08 cost. Allowable: (80/200 × £21,193.08) + ($4.99 ÷ 1.3033) = £8,477.23 + £3.83 = £8,481.06.

Proceeds: 80 × $180.50 ÷ 1.3033 = £11,079.57.

Gain: £11,079.57 − £8,481.06 = £2,598.51

6

Multi-currency (GBP, EUR, USD)

Trades in three different currencies

Amir holds a diversified portfolio across three markets: UK (SHEL in GBP), Europe (ASML in EUR), and US (AAPL in USD). He bought positions in each during 2023 and sold partial holdings in 2024. Each trade uses the HMRC exchange rate for that month.

For CGT, all amounts must be converted to GBP at the exchange rate on the trade date. Both the acquisition cost and disposal proceeds are converted separately, so FX movements create additional gains or losses.

Transactions

DateTypeSymbolQtyPriceFeesCcyFX RateGBP Value
2023-04-10BuySHEL400£24.80£11.95GBP1.00£9,931.95
2023-06-15BuyASML8€650.00€9.99EUR1.1489£4,534.76
2023-09-20BuyAAPL30$175.00$4.99USD1.2631£4,160.39
2024-02-15SellSHEL200£27.50£11.95GBP1.00£5,500.00
2024-05-10SellASML4€920.00€9.99EUR1.1714£3,141.54
2024-08-20SellAAPL15$225.00$4.99USD1.3033£2,589.58

Calculation

SHEL (GBP — no FX conversion)

Pool: 400 shares, cost £9,931.95. Sell 200: allowable = (200/400 × £9,931.95) + £11.95 = £4,977.93.

Proceeds: £5,500.00. Gain: £5,500.00 − £4,977.93 = £522.07

ASML (EUR — FX rate 1.1489 at buy, 1.1714 at sell)

Pool: 8 shares, cost = (8 × €650 + €9.99) ÷ 1.1489 = £4,534.76. Avg = £566.85/share.

Sell 4: allowable = (4/8 × £4,534.76) + (€9.99 ÷ 1.1714) = £2,267.38 + £8.53 = £2,275.91.

Proceeds: 4 × €920 ÷ 1.1714 = £3,141.54. Gain: £3,141.54 − £2,275.91 = £865.63

AAPL (USD — FX rate changed from 1.2631 to 1.3033)

Pool: 30 shares, cost = (30 × $175 + $4.99) ÷ 1.2631 = £4,160.39. Avg = £138.68/share.

Sell 15: allowable = (15/30 × £4,160.39) + ($4.99 ÷ 1.3033) = £2,080.20 + £3.83 = £2,084.02.

Proceeds: 15 × $225 ÷ 1.3033 = £2,589.58. Gain: £2,589.58 − £2,084.02 = £505.56

Total gains across all three

£522.07 + £865.63 + £505.56 = £1,893.26

Note: for AAPL, the rate rose from 1.2631 to 1.3033 dollars per pound between buy and sell — i.e. the pound strengthened against the dollar. Each dollar of proceeds therefore converts to slightly fewer pounds, modestly trimming the GBP gain relative to the dollar share-price rise.

7

RSU vest — keep all shares

Taxes paid in cash, all shares retained

Priya received an RSU vest of 50 AMZN shares on 15 February 2024 when the market price was $178.50 (FX rate 1.2690). She paid income tax and NICs through payroll in cash, so she kept all 50 shares. On 10 September 2024, she sold 20 shares at $195.00 (FX 1.3032, $4.99 fee).

For CGT, an RSU vest is an acquisition at market value on the vest date. Income tax paid on vesting is separate. The CGT cost basis is the market price at vest, converted to GBP. No fees on the vest itself (shares are delivered by the employer).

Transactions

DateTypeSymbolQtyPriceFeesCcyFX RateGBP Value
2024-02-15Buy (Vest)AMZN50$178.50$0.00USD1.2690£7,033.10
2024-09-10SellAMZN20$195.00$4.99USD1.3032£2,992.63

Calculation

Pool at vest:50 shares. Cost = 50 × $178.50 ÷ 1.2690 = £7,033.10. Avg = £140.66/share.

Allowable cost:(20/50 × £7,033.10) + ($4.99 ÷ 1.3032) = £2,813.24 + £3.83 = £2,817.07.

Proceeds:20 × $195.00 ÷ 1.3032 = £2,992.63.

Gain:£2,992.63 − £2,817.07 = £175.57

Pool after sale:30 shares with £4,219.86 cost.

8

RSU vest — sell to cover taxes

Employer sells shares to pay income tax

David received an RSU vest of 100 GOOGL shares on 1 April 2024 at $155.20 (FX 1.2693). His employer sold 40 shares immediately at the same price to cover income tax and NICs. He kept the remaining 60 shares. On 15 November 2024, he sold 30 at $172.00 (FX 1.2952, $4.99 fee). The sell-to-cover has no brokerage fee (done internally by employer).

The sell-to-cover triggers the same-day rule. Since it happens at the same price as the vest, the CGT gain is effectively zero on that transaction.

Transactions

DateTypeSymbolQtyPriceFeesCcyFX RateGBP Value
2024-04-01Buy (Vest)GOOGL100$155.20$0.00USD1.2693£12,227.21
2024-04-01Sell (Tax)GOOGL40$155.20$0.00USD1.2693£4,890.88
2024-11-15SellGOOGL30$172.00$4.99USD1.2952£3,983.94

Calculation

Disposal 1: Sell-to-cover (same-day rule)

Same-day acquisition: 100 shares at $155.20 ÷ 1.2693 = £12,227.21.

Allowable cost for 40 shares: 40/100 × £12,227.21 = £4,890.88.

Proceeds: 40 × $155.20 ÷ 1.2693 = £4,890.88.

Gain: £0.00

Pool after same-day netting

60 shares enter pool with cost £12,227.21 − £4,890.88 = £7,336.33. Avg = £122.27/share.

Disposal 2: Sell 30 shares (pool match)

Allowable cost: (30/60 × £7,336.33) + ($4.99 ÷ 1.2952) = £3,668.16 + £3.85 = £3,672.02.

Proceeds: 30 × $172.00 ÷ 1.2952 = £3,983.94.

Gain: £3,983.94 − £3,672.02 = £311.92

9

RSU vest — sell all immediately

Convert entire vest to cash on the same day

Emma received an RSU vest of 75 MSFT shares on 15 June 2024 at $430.00 (FX 1.2709). She sold all 75 shares immediately on the same day at the same price, converting everything to cash. No brokerage fees (employer-facilitated sale).

This is the simplest RSU scenario. Since acquisition and disposal happen at the same price on the same day, the same-day rule produces a zero gain.

Transactions

DateTypeSymbolQtyPriceFeesCcyFX RateGBP Value
2024-06-15Buy (Vest)MSFT75$430.00$0.00USD1.2709£25,375.72
2024-06-15SellMSFT75$430.00$0.00USD1.2709£25,375.72

Calculation

Same-day rule: 75-share disposal matched against same-day acquisition of 75 shares.

Allowable cost:75 × $430.00 ÷ 1.2709 = £25,375.72.

Proceeds:75 × $430.00 ÷ 1.2709 = £25,375.72.

Gain:£25,375.72 − £25,375.72 = £0.00 (no gain, no loss)

Even though Emma received £25,375.72 in cash, she has no capital gain. The income tax on the vest was handled through payroll. Employees who sell RSUs immediately often have no CGT to report — the tax was already collected as employment income at vest.

10

Transfer to a spouse

No-gain/no-loss transfer between partners

Oliver bought 500 SHEL shares on 10 January 2023 at £24.50 each (£11.95 fee). On 1 May 2024, he transferred 200 shares to his spouse Charlotte. He wants to know if this triggers any CGT, and what cost basis Charlotte receives.

Transfers between spouses (or civil partners) are no-gain/no-loss disposals under HMRC rules (TCGA 1992 s58). The transferor disposes at a price that produces neither gain nor loss. The recipient inherits that same cost basis. Read the full step-by-step guide →

Transactions (Oliver's records)

DateTypeSymbolQtyPriceFeesCcyFX RateGBP Value
2023-01-10BuySHEL500£24.50£11.95GBP1.00£12,261.95
2024-05-01TransferSHEL200£0.00GBP1.00

Calculation

Oliver's pool:500 shares, cost = (500 × £24.50) + £11.95 = £12,261.95. Avg = £24.52/share.

Transfer (no-gain/no-loss):200 shares leave at proportional cost: 200/500 × £12,261.95 = £4,904.78. Deemed proceeds = £4,904.78.

Oliver's gain:£4,904.78 − £4,904.78 = £0.00

Oliver's pool after:300 shares with £7,357.17 cost.

What happens for Charlotte?

Charlotte's cost basis: She receives 200 shares at £4,904.78 (i.e. £24.52/share). This is Oliver's original cost — NOT the market value on transfer date.

If Charlotte sells at £27.80: Gain = (200 × £27.80) − £4,904.78 = £5,560.00 − £4,904.78 = £655.22.

Key point: The gain is calculated from Oliver's original purchase price. The tax liability is deferred, not eliminated.

Spouse transfers are commonly used to utilise both partners' Annual Exempt Amounts (£3,000 each in 2024/25), effectively doubling the household's tax-free allowance. The transfer itself costs nothing in CGT.

11

Merging same-day trades

Several same-day buys combine into one

Two purchases of BP on the same day (200 at £5 and 200 at £6) are mergedinto a single purchase of 400 shares at £5.50. A same-day sale of 300 shares is then matched against this merged buy — so merging directly affects the cost. Read the full step-by-step guide →

Transactions

DateTypeSymbolQtyPriceFeesCcyFX RateGBP Value
12 May 2026BuyBP200£5.00£0.00GBP1.00£1,000.00
12 May 2026BuyBP200£6.00£0.00GBP1.00£1,200.00
12 May 2026SellBP300£6.50£0.00GBP1.00£1,950.00

Calculation

Merged purchase:200 × £5 + 200 × £6 = £2,200 for 400 shares (£5.50 average).

Same-day sell 300 @ £6.50: proceeds £1,950, allowable cost 300 × £5.50 = £1,650.

Gain:£1,950 − £1,650 = £300.00(100 remaining shares enter the pool at £5.50).

12

All three rules in one sale

Same-day + bed & breakfast + pool, then taxed

A single sale of 3,000 SHEL is split across all three matching rules: 500 same-day, 500 bed & breakfast, and 2,000 from the pool — each with a different cost. This is the realistic case where the rules combine. Read the full step-by-step guide →

Transactions

DateTypeSymbolQtyPriceFeesCcyFX RateGBP Value
1 Sep 2025BuySHEL2,500£10.00£0.00GBP1.00£25,000.00
15 May 2026BuySHEL500£14.00£0.00GBP1.00£7,000.00
15 May 2026SellSHEL3,000£15.00£0.00GBP1.00£45,000.00
5 Jun 2026BuySHEL500£14.50£0.00GBP1.00£7,250.00

Calculation

Same-day (500): cost 500 × £14 = £7,000, gain £500.

Bed & breakfast (500): matched to the 5 Jun buy-back, cost 500 × £14.50 = £7,250, gain £250.

Section 104 pool (2,000): cost 2,000 × £10 = £20,000, gain £10,000.

Total gain:£500 + £250 + £10,000 = £10,750. After the £3,000 allowance, £7,750 is taxable (£1,395–£1,860 tax depending on your income band).