Capital Gains Tax Share Matching Rules: Same Day, 30 Day and Section 104 Pool Explained (2026/27)
How HMRC decides which shares you have sold for Capital Gains Tax purposes in 2026/27 — the same-day rule, the 30-day rule, and the Section 104 pool for older holdings.
Why HMRC needs a matching rule at all
Shares are fungible — one share in a company is identical to another share of the same class in the same company. If you bought 500 shares in a company in 2015, another 300 in 2019, and another 200 in 2023, all at different prices, and then sell 400 shares today, there needs to be a consistent rule for deciding which of those shares — and therefore which cost — you are treated as having sold, since you cannot physically distinguish one share certificate from another.
Capital Gains Tax Calculator
Calculate Capital Gains Tax on property, shares and other assets for 2025/26.
Open Capital Gains Tax calculatorThe three-step matching order
HMRC's rules apply matching in a strict, mechanical sequence:
- Same-day rule: shares sold are first matched against any shares of the same class in the same company bought on the same day as the sale.
- 30-day rule: any remaining shares sold are then matched against shares bought in the following 30 days after the sale (this is the rule that defeats simple bed-and-breakfasting).
- Section 104 pool: any shares still not matched are treated as coming from the pool of all other shares held in that company, at the average cost of everything in the pool.
This order applies automatically — there is no election or choice available to identify a specific historical batch of shares as the one being disposed of, unlike the "specific identification" methods available in some other countries' tax systems.
How the Section 104 pool actually works
The Section 104 pool is essentially a running total: every time you buy shares in a company (that are not caught by the same-day or 30-day rules relative to some other transaction), you add the number of shares and their cost into the pool. The pool then has a single average cost per share, calculated as total pooled cost ÷ total pooled shares.
Worked example
Suppose an investor's Section 104 pool for a company builds up as follows:
| Transaction | Shares | Cost | Pool total shares | Pool total cost | Average cost/share |
|---|---|---|---|---|---|
| Buy | 500 | £1,000 | 500 | £1,000 | £2.00 |
| Buy | 300 | £1,500 | 800 | £2,500 | £3.125 |
| Buy | 200 | £1,600 | 1,000 | £4,100 | £4.10 |
If the investor now sells 400 shares (assuming no same-day or 30-day matching applies) at £6 each:
- Sale proceeds: 400 × £6 = £2,400
- Cost matched from the pool: 400 × £4.10 = £1,640
- Gain: £2,400 − £1,640 = £760
After the sale, the pool reduces proportionally: remaining shares = 1,000 − 400 = 600, remaining cost = £4,100 − £1,640 = £2,460, keeping the same average cost per share of £4.10 for any future disposal.
Corporate actions and the pool
- Bonus issues (free additional shares issued to existing shareholders) increase the number of shares in the pool with no additional cost added, which reduces the average cost per share proportionally.
- Stock splits work similarly — more shares, same total cost, lower average cost per share.
- Rights issues (where shareholders pay to buy additional shares, often at a discount) add both new shares and new cost to the pool, recalculating the average accordingly.
Keeping accurate records of every purchase, sale, and corporate action affecting a holding is essential for correctly maintaining the Section 104 pool over what can be a multi-decade holding period.
Bed & ISA Calculator UK 2026/27 — CGT Cost and Long-Term Benefit
Calculate the CGT cost of selling investments outside an ISA and the long-term tax-free benefit of rebuying inside a Stocks & Shares ISA.
Open Bed & ISA calculatorWhy this matters for practical tax planning
Understanding the matching order explains why attempts to manipulate the timing of gains or losses by trading around a sale — buying back shares too soon — usually fail to achieve the intended tax result, since the newly bought shares simply get matched against the sale instead of the older pool. Investors wanting to realise a gain or loss while retaining broadly similar market exposure should generally look at genuinely different (though economically similar) investments, or use the bed-and-ISA route, rather than attempting to trade the identical shares within the 30-day window.
Frequently asked questions
Why do share matching rules exist for Capital Gains Tax?
When you have bought shares in the same company at different times and different prices, and then sell only some of them, HMRC needs a consistent rule to decide which specific shares (and therefore which cost) are treated as being sold, since shares are fungible and cannot be individually identified once pooled together.
What order are shares matched in for CGT purposes?
In order: first against shares bought on the same day as the sale, then against shares bought in the following 30 days, and finally against the Section 104 pool, which holds all other shares in that company bought at different times, averaged together into a single pooled cost.
What is the Section 104 pool?
It is a single pooled record of all shares in a particular company that you hold, excluding any caught by the same-day or 30-day rules, with a single averaged cost per share calculated by adding up the total cost of all shares ever added to the pool and dividing by the total number of shares, adjusted for any subsequent purchases, sales, or corporate actions.
Does buying more shares in the same company add to the pool or create a separate holding?
It normally adds to the Section 104 pool (assuming it is not caught by the same-day or 30-day rules relative to a specific sale), increasing both the total shares held and the total pooled cost, which changes the average cost per share used for any future disposal from that pool.
How do I calculate the average cost per share in the Section 104 pool?
Divide the total pooled cost (the sum of all amounts paid for shares added to the pool, adjusted for any capital returns or rights issues) by the total number of shares in the pool at that point, giving a single average cost per share used for any future disposal, regardless of which specific purchase the shares 'came from' originally.
What happens to the pool when I sell only some of my shares?
You reduce both the number of shares in the pool and the total pooled cost proportionally, based on the average cost per share at the time of sale, leaving the remaining shares in the pool with the same average cost per share as before the sale.
Do share matching rules apply to funds and unit trusts in the same way?
Yes, broadly the same same-day, 30-day and pooling principles apply to identical units or shares in a fund, collective investment or unit trust, treating each specific fund or share class as its own separately pooled holding.
Does a stock split or bonus issue affect the Section 104 pool?
Yes. A bonus issue or stock split typically increases the number of shares in the pool without any new cost being added, which reduces the average cost per share proportionally, while a rights issue (where you pay for new shares) adds both new shares and new cost to the pool in the normal way.
Can I choose which shares to treat as sold if I have different purchase batches?
No. Unlike some other jurisdictions that allow investors to specify which identified lot of shares they are selling, UK CGT rules apply the same-day, 30-day and Section 104 pooling rules automatically and mechanically — there is no choice or election available to identify a specific historical purchase batch as the one being sold.
Do these matching rules apply inside an ISA or pension?
No, because there is generally no Capital Gains Tax to calculate on disposals within an ISA or pension in the first place, so the share matching rules are only relevant for shares and investments held outside a tax-advantaged wrapper.
Try the calculators
Capital Gains Tax Calculator
Calculate Capital Gains Tax on property, shares and other assets for 2025/26.
Bed & ISA Calculator UK 2026/27 — CGT Cost and Long-Term Benefit
Calculate the CGT cost of selling investments outside an ISA and the long-term tax-free benefit of rebuying inside a Stocks & Shares ISA.
Related reading
Bed and Breakfast CGT Rule Explained: The 30-Day Trap
The bed and breakfasting CGT rule blocks same-asset repurchases within 30 days. Learn how the share matching rules work and how to use your 2026/27 allowance legally.
Bed and Breakfasting Shares: The 30-Day Rule for Capital Gains Tax (2026/27)
Why selling and immediately rebuying the same shares no longer works for realising a Capital Gains Tax loss or gain in 2026/27, and what the 30-day rule actually does.
Capital Loss Harvesting: How to Use Capital Losses to Reduce Your CGT Bill 2026/27
Capital losses must be reported and used against gains in the same year or carried forward. Bed-and-ISA and Bed-and-SIPP also avoid crystallising gains.