How UK share and crypto CGT matching works
HMRC’s share identification rules, in order: same-day, 30-day, then the Section 104 pool. The same rules for shares and cryptoassets. The figures are a working paper: matched disposals, not a tax bill.
What we compute
For each matched disposal: proceeds, allowable cost, gain or loss, and taxable gain after the annual exemption. The exemption is the one for the tax year of the sell date. Supported, confirmed brought-forward losses can also reduce taxable gain.
Losses across tax years
Gains and losses are netted within each year first. Unused losses enter the carried-forward balance only after you confirm the underlying losses were reported to HMRC. Earlier confirmed losses reduce later net gains only to that year’s annual exemption; the remainder stays available for later years.
You can record a documented external opening balance from one originating year before your recorded disposal history. Gainly tracks ordinary unrestricted losses from 2008–09 onwards and does not submit or verify claims. Other gains, missing history, restricted losses and special reliefs need separate reconciliation. Changes to the matched evidence invalidate the affected reporting confirmation until you review it.
What we do not compute
Tax due. Gainly does not apply CGT rates, income-tax bands, or “you owe”. Taxable gain after the exemption is the last figure.
Identification order
The same order applies to shares and cryptoassets. Gainly matches in this sequence.
- 1
Same-day (TCGA s.105)
Buys on the same calendar day as the sale are matched first. If there is more than one buy that day, they are averaged into one acquisition.
- 2
30-day (TCGA s.106A)
Then buys in the 30 calendar days after the sale (bed and breakfast).
- 3
Section 104 (TCGA s.104)
Then the average-cost pool for what remains. Holdings on Home are this pool: units, pool cost, and average cost.
Section 104 pooling: a worked example
Suppose you buy 100 shares at £10 each, then another 100 of the same shares at £20 each. Both purchases enter the pool before the sale, with no other transactions or fees. The pool holds 200 shares with a total allowable cost of £1,000 + £2,000 = £3,000. Dividing £3,000 by 200 gives an average cost of £15 per share.
You hold 200 shares with a total pool cost of £3,000: an average cost of £15 per share. You sell 50 shares for £25 each, with no fees and no purchases of the same shares on the sale date or in the next 30 days.
- Sale proceeds
- £1,250
- 50 × £25
- Allowable cost
- £750
- 50 × £15
- Capital gain
- £500
- £1,250 − £750
This gain is before losses and the annual exemption. It is not tax due.
Selling 50 shares removes £750 of allowable cost from the pool. The remaining pool holds 150 shares with a cost of £2,250, still averaging £15 per share. The £500 gain contributes to the disposal’s tax year; losses and that year’s annual exemption determine the taxable gain.
If you buy the same shares on the sale date or in the next 30 days, matching takes priority over the pool and this example’s cost calculation may change.
Spouse and civil partner transfers
Transfers to a spouse or civil partner are treated as no gain / no loss (TCGA s.58). Units leave the Section 104 pool without a gain on that transfer.
Fund equalisation and notional income
The first distribution after you buy into a fund can include equalisation. That part is a return of capital, so it comes off allowable cost. On accumulation units, income that is reinvested or reported to you but not paid out (including excess reportable income from offshore funds) adds to allowable cost. Both figures are on the fund’s tax voucher.
Gainly applies each one to the asset’s whole Section 104 pool on its date, not to a single Group 2 purchase. Units don’t change. Each adjustment is listed under the asset on Gains, with the pool cost before and after.
Share splits and consolidations
Record the number of new shares for each old share, using the effective date. Gainly changes quantities and average cost while preserving total allowable cost and original acquisition dates, including matches across a split date. Match quantities are shown in the units used on the sale date.
Splits take effect before trades on that UTC date. Enter those trades in the new share units. Only same-class share, ETF and fund splits without cash consideration are supported. Cash in lieu of fractional entitlements, mergers, rights issues, changes of share class and crypto reorganisations need separate treatment.
Fees
Buy-side fees go into allowable cost. Sell-side fees come off proceeds (TCGA s.38).
Tax year and annual exemption
The UK tax year starts on 6 April. Gainly uses the sell date in UTC. That year’s annual exemption comes off gains. Holdings on Home are the current Section 104 snapshot; they are not scoped to the year control.
Simulate a sale
Simulate uses units × the current Section 104 average, against this tax year only. It is not a same-day or 30-day rematch, and it is not a tax bill.
Sources
Matching guidance checked against the HMRC sources below on .
- HMRC share reorganisations and identification (CG51701)
- HMRC same-day and 30-day share matching rules (CG51560)
- HMRC shares and Capital Gains Tax helpsheets (HS284)
- HMRC cryptoasset pooling and matching rules (CRYPTO22200)
- CG57705 — unit trust equalisation payments
- CG57707 — accumulation units
Not financial advice. Always verify the figures with a tax professional.
Questions
What is a Section 104 pool?
Shares or tokens of the same asset that are not matched to a same-day or 30-day acquisition sit in one pool (TCGA s.104). The pool has a quantity and a total cost. A disposal from the pool takes allowable cost at the average: pool cost × units sold ÷ units in the pool. Holdings on Home are this pool: units, pool cost, and average cost.
What is same-day and 30-day matching?
Before the pool is used, a disposal is matched to acquisitions of the same asset on the same calendar day (TCGA s.105). If there is more than one buy that day, they are averaged. What is still unmatched is then matched to acquisitions in the 30 calendar days after the sale (TCGA s.106A, bed and breakfast). Only the remainder uses the Section 104 pool.
Does Gainly calculate tax owed?
No. For each matched disposal Gainly shows proceeds, allowable cost, gain or loss, and taxable gain after the annual exemption for the tax year of the sell date. It does not apply CGT rates, income-tax bands, or say what you owe.
Do shares and crypto use the same rules?
Yes. HMRC’s share identification rules apply to cryptoassets as well: same-day, then 30-day, then the Section 104 pool. Spouse and civil partner transfers are no gain / no loss for both.
Explore the rules with worked examples
Our capital gains guides explain pooling, the 30-day rule, preparing records and the annual exemption in more detail. This method page describes Gainly’s implementation and its limits.
Try the matching
Import a CSV or add trades by hand. Free to try in this browser. Create an account when you want the trades on every device.