UK Matching Rules (S104/S105/S106A)
A complete guide to the UK’s three-tier share identification rules as applied to cryptocurrency — the same-day rule (Section 105), the 30-day bed & breakfasting rule (Section 106A), and the Section 104 pool.
What Are the UK Matching Rules?
Section titled “What Are the UK Matching Rules?”When you dispose of cryptocurrency, HMRC requires a specific order for determining which acquisition cost to use. These are known as the share identification rules (originally designed for shares, now applied to crypto under HMRC’s Cryptoassets Manual).
The rules determine which tokens you are treated as selling — and therefore which cost basis applies to the disposal.
The three rules, in mandatory order:
- Same-day rule (TCGA 1992, Section 105) — Match disposals to same-day acquisitions
- 30-day rule (TCGA 1992, Section 106A) — Match remaining disposal to acquisitions in the next 30 calendar days
- Section 104 pool (TCGA 1992, Section 104) — Match remaining disposal against the weighted average pool
Each rule is applied in sequence. Only tokens not consumed by Rule 1 pass to Rule 2. Only tokens not consumed by Rules 1 or 2 pass to Rule 3.
Rule 1: Same-Day Rule (Section 105)
Section titled “Rule 1: Same-Day Rule (Section 105)”How It Works
Section titled “How It Works”All acquisitions and disposals of the same token on the same calendar day are consolidated into a single acquisition and a single disposal. The disposal is then matched against the same-day acquisition.
Key points:
- “Same day” means the same calendar date — timestamps don’t matter. A buy at 9am and a sell at 5pm are same-day matched.
- Multiple buys on the same day are consolidated into one acquisition (total quantity, total cost).
- Multiple sells on the same day are consolidated into one disposal (total quantity, total proceeds).
- If disposal quantity > acquisition quantity: the excess passes to Rule 2.
- If acquisition quantity > disposal quantity: excess tokens enter the Section 104 pool.
Worked Example (HMRC CRYPTO22252)
Section titled “Worked Example (HMRC CRYPTO22252)”Setup: 5,000 token B in pool, pooled cost £500.
| Time | Transaction | Quantity | Amount |
|---|---|---|---|
| Morning | Sell | 1,000 | £800 |
| Afternoon | Buy | 1,600 | £1,000 |
| Evening | Sell | 500 | £600 |
Step 1 — Consolidate:
- Total disposal: 1,500 tokens for £1,400
- Total acquisition: 1,600 tokens for £1,000
Step 2 — Same-day match:
- 1,500 tokens of the 1,600 acquired are matched to the disposal
- Allowable cost: £1,000 × (1,500 ÷ 1,600) = £937.50 (rounded up to £938)
Step 3 — Calculate gain:
- Gain: £1,400 - £938 = £462
Step 4 — Excess to pool:
- 100 unmatched tokens (£62 cost) enter the Section 104 pool
- Pool becomes: 5,100 tokens, £562
Why the Same-Day Rule Exists
Section titled “Why the Same-Day Rule Exists”Without this rule, you could buy crypto at a low price, then sell your existing (higher-cost) holdings the same day to generate an artificial loss — while ending up with the same position. The same-day rule forces you to use the actual same-day purchase cost.
Rule 2: 30-Day Rule (Section 106A — “Bed & Breakfasting”)
Section titled “Rule 2: 30-Day Rule (Section 106A — “Bed & Breakfasting”)”How It Works
Section titled “How It Works”After same-day matching, any remaining disposal quantity is matched against acquisitions in the next 30 calendar days. This is forward-looking only — acquisitions before the disposal date are not considered.
Key points:
- Day 0 = the disposal date. The window covers day 1 through day 30 after disposal.
- If you sell on January 15, acquisitions from January 16 through February 14 are in the window.
- Within the window, acquisitions are matched in chronological order (earliest first).
- Earliest disposal gets priority when multiple disposals compete for the same acquisition.
- Matched acquisitions are diverted — they never enter the Section 104 pool.
- Partially matched acquisitions: cost is apportioned pro-rata.
Worked Example (HMRC CRYPTO22253)
Section titled “Worked Example (HMRC CRYPTO22253)”Setup: Rachel has 2,000 token C in pool, pooled cost £1,000.
| Date | Transaction | Quantity | Amount |
|---|---|---|---|
| 31 Mar | Sell | 1,000 | £400 |
| 20 Apr | Sell | 500 | £150 |
| 21 Apr | Buy | 700 | £175 |
| 28 Apr | Buy | 500 | £100 |
| 1 May | Buy | 500 | £150 |
Matching for 31 Mar disposal (30-day window: 1 Apr — 30 Apr):
- 21 Apr acquisition: all 700 tokens matched (£175)
- 28 Apr acquisition: 300 of 500 tokens matched (£100 × 300/500 = £60)
- Total matched: 1,000 tokens
- Gain: £400 - £175 - £60 = £165
Matching for 20 Apr disposal (30-day window: 21 Apr — 20 May):
- 28 Apr acquisition: 200 remaining tokens matched (£100 × 200/500 = £40)
- 1 May acquisition: 300 of 500 tokens matched (£150 × 300/500 = £90)
- Total matched: 500 tokens
- Gain: £150 - £40 - £90 = £20
Unmatched: 200 tokens from 1 May (£60 cost) enter the pool.
Why This Rule Matters
Section titled “Why This Rule Matters”Named after the old practice of “bed & breakfasting” — selling shares at end of day and rebuying the next morning to crystallise a loss while keeping the same position. The 30-day rule prevents this by forcing the disposal to use the repurchase cost instead of the pool’s average cost.
Impact on losses: If you sell at a loss and rebuy within 30 days, the 30-day rule typically reduces or eliminates the loss. The repurchase cost replaces the pool’s average cost for that disposal. This is not a “loss denial” — the loss simply doesn’t arise because a different (usually similar) cost is used.
Rule 3: Section 104 Pool
Section titled “Rule 3: Section 104 Pool”How It Works
Section titled “How It Works”Any disposal quantity remaining after same-day and 30-day matching is removed from the Section 104 pool at the pool’s weighted average cost per token.
Pool mechanics:
- Each cryptocurrency has its own separate pool
- The pool tracks two values: total quantity and total cost
- Acquisitions that aren’t matched by Rules 1 or 2 are added to the pool
- Disposals use pro-rata cost:
cost = pool_cost × (tokens_disposed ÷ pool_quantity)
Worked Example (HMRC CRYPTO22251)
Section titled “Worked Example (HMRC CRYPTO22251)”Setup: Victoria has 150 token A in pool, total cost £126,000.
She sells 50 tokens for £300,000. No same-day or 30-day acquisitions exist.
Calculation:
- Pool cost for 50 tokens: £126,000 × (50 ÷ 150) = £42,000
- Gain: £300,000 - £42,000 = £258,000
- Remaining pool: 100 tokens, £84,000
How Acquisitions Enter the Pool
Section titled “How Acquisitions Enter the Pool”Only unmatched acquisitions enter the pool:
- If an acquisition is consumed by the same-day rule, it never enters the pool
- If an acquisition is consumed by the 30-day rule, it never enters the pool
- Only acquisitions with no matching disposal (or with remaining unmatched quantity) are added to the pool
This is a critical detail — the pool’s average cost depends on which acquisitions were diverted by the matching rules.
All Three Rules Together
Section titled “All Three Rules Together”Worked Example (HMRC CRYPTO22256)
Section titled “Worked Example (HMRC CRYPTO22256)”Setup: Gulferaz has 100,000 token F in pool, total cost £300,000.
| Date | Transaction | Quantity | Amount |
|---|---|---|---|
| 31 Jul | Buy | 10,000 | £45,000 |
| 31 Jul | Sell | 30,000 | £150,000 |
| 5 Aug | Sell | 20,000 | £100,000 |
| 6 Aug | Buy | 50,000 | £225,000 |
| 7 Aug | Sell | 100,000 | £150,000 |
31 Jul disposal (30,000 tokens, £150,000):
- Same-day match: 10,000 tokens from 31 Jul acquisition (£45,000)
- 30-day match: 20,000 of 50,000 from 6 Aug acquisition (£225,000 × 20,000/50,000 = £90,000)
- Gain: £150,000 - £45,000 - £90,000 = £15,000
5 Aug disposal (20,000 tokens, £100,000):
- No same-day acquisitions
- 30-day match: 20,000 of remaining 30,000 from 6 Aug (£225,000 × 20,000/50,000 = £90,000)
- Gain: £100,000 - £90,000 = £10,000
7 Aug disposal (100,000 tokens, £150,000):
- No same-day acquisitions
- No 30-day acquisitions (remaining 10,000 from 6 Aug are unmatched — they enter the pool)
- Pool update: Original 100,000 tokens (£300,000) + 10,000 unmatched from 6 Aug (£45,000) = 110,000 tokens (£345,000)
- Pool cost for 100,000: £345,000 × (100,000/110,000) = £313,636
- Loss: £150,000 - £313,636 = -£163,636
Total for tax year: £15,000 + £10,000 - £163,636 = -£138,636 net loss
How PrivateACB Implements These Rules
Section titled “How PrivateACB Implements These Rules”Two-Pass Algorithm
Section titled “Two-Pass Algorithm”PrivateACB uses a two-pass algorithm to handle the forward-looking 30-day rule:
Pass 1 — Build match table:
- Scans all transactions for the asset
- For each disposal: identifies same-day acquisitions, then scans forward 30 days for matching acquisitions
- Records which acquisition tokens are allocated to which disposals
- Handles competition (multiple disposals wanting the same acquisition tokens)
Pass 2 — Process chronologically:
- For each acquisition: if matched to a disposal, the cost is allocated to that disposal. If unmatched, the tokens enter the Section 104 pool.
- For each disposal: uses the pre-computed match costs (from Pass 1) plus pool cost for any remaining quantity. Calculates gain or loss.
This ensures correct results even in complex scenarios with competing disposals and split acquisitions.
Viewing Match Details
Section titled “Viewing Match Details”After calculation, you can see exactly which rules were applied:
- Capital Gains Detail report — Each disposal shows its match type (same-day, 30-day, pool, or mixed) with colour-coded badges and cost breakdown columns
- Pool History report — Shows which acquisitions were diverted by matching rules (never entered the pool) and the pool’s running balance
- Audit Provenance report — Section E shows detailed match composition with match distribution statistics
Edge Cases
Section titled “Edge Cases”Multiple Disposals Competing for the Same Acquisition
Section titled “Multiple Disposals Competing for the Same Acquisition”When two disposals both fall within 30 days of the same acquisition, the earliest disposal gets priority.
Example: You sell on January 5 and January 20. An acquisition on January 25 is within 30 days of both disposals. The January 5 disposal is matched first.
Disposal Quantity Exceeds Available Matches
Section titled “Disposal Quantity Exceeds Available Matches”If same-day and 30-day matching can’t cover the full disposal quantity, the remainder comes from the pool. PrivateACB shows this as a “mixed” match type in reports.
Acquisition Fully Consumed by Matching
Section titled “Acquisition Fully Consumed by Matching”An acquisition can be split across multiple disposals. Once fully consumed, no tokens from that acquisition enter the pool. The Pool History report shows “diverted” annotations for these acquisitions.
Zero-Gain Same-Day Round Trip
Section titled “Zero-Gain Same-Day Round Trip”If you buy and sell the exact same quantity at the exact same price on the same day, the result is a £0 gain. The pool is unaffected.
Common Misconceptions
Section titled “Common Misconceptions””The 30-day rule denies losses”
Section titled “”The 30-day rule denies losses””Not quite. Unlike the US wash sale (which calculates a loss then denies it) or Canada’s superficial loss (which denies and adds back), the UK 30-day rule simply changes which cost is used. If you sell at a loss and rebuy within 30 days, the repurchase cost replaces the pool cost — so the loss is typically smaller or doesn’t arise at all. But it’s not a “denial” mechanism.
”I can avoid the 30-day rule by waiting 31 days”
Section titled “”I can avoid the 30-day rule by waiting 31 days””Yes, but consider whether the price may move against you during that time. The tax savings from using pool cost instead of the repurchase cost may not be worth the market risk.
”Same-day means exact timestamp”
Section titled “”Same-day means exact timestamp””No. It’s the calendar date. A buy at 9am and a sell at 11pm on the same calendar day are same-day matched.
”The pool average cost changes when I sell”
Section titled “”The pool average cost changes when I sell””No. Selling from the pool removes tokens at the current average cost. The average cost per token stays the same — only the total pool quantity and total pool cost decrease proportionally.
”Tokens matched by the 30-day rule still enter my pool”
Section titled “”Tokens matched by the 30-day rule still enter my pool””No. Matched tokens are diverted — they bypass the pool entirely. This is why the pool balance shown in the Pool History report may be different from what you’d expect if you simply added up all acquisitions.
HMRC References
Section titled “HMRC References”- TCGA 1992, Section 104 — Section 104 holding (the pool)
- TCGA 1992, Section 105 — Same-day identification rule
- TCGA 1992, Section 106A — 30-day bed & breakfasting rule
- HMRC Cryptoassets Manual:
- CRYPTO22200 — Pooling overview
- CRYPTO22251 — Example 1: Basic pool disposal
- CRYPTO22252 — Example 2: Same-day rule
- CRYPTO22253 — Example 3: 30-day rule
- CRYPTO22254 — Example 4: Same-day + pool
- CRYPTO22255 — Example 5: 30-day + pool
- CRYPTO22256 — Example 6: All three rules
- CRYPTO22257 — Example 7: Crypto-to-crypto exchange
- HMRC Capital Gains Manual:
- CG51560 — Share identification rules
Related Guides
Section titled “Related Guides”- UK Capital Gains Calculation — Overview of the UK calculation dashboard and workflow
- UK Capital Gains Formulas — Technical formulas for pool cost, matching cost allocation, and gain/loss
- UK Tax Reports — Guide to SA108, Capital Gains Detail, Pool History, Income, and Audit Provenance reports
Last Updated: March 2026 PrivateACB Version: 2.4