Section 104 pool calculator for crypto, in Excel
Bought the same coin at five different prices? HMRC doesn't use any one of them. It uses your average cost across every purchase, which is the "Section 104 pool". Here's how it works, how to build it in Excel, and where a simple version goes wrong.
What the Section 104 pool is
For each type of token you hold, HMRC treats all your coins as one pot with one total cost (CRYPTO22200). Every purchase adds coins and cost to the pot. Every sale takes out coins, along with a proportional slice of the cost.
Allowable costs like exchange fees are added to the cost when you buy, and deducted from proceeds when you sell.
Worked example: Bitcoin
| Date | Event | BTC | £ paid / received | Pool BTC | Pool cost £ |
|---|---|---|---|---|---|
| 3 Jun 2024 | Buy | 0.5 | 10,000 | 0.5 | 10,000 |
| 8 Jan 2025 | Buy | 0.5 | 20,000 | 1.0 | 30,000 |
| 15 Aug 2025 | Sell | 0.4 | 16,000 | 0.6 | 18,000 |
The gain on the August sale
| Step | £ |
|---|---|
| Proceeds | 16,000 |
| Allowable cost: £30,000 × (0.4 ÷ 1.0) | (12,000) |
| Gain | 4,000 |
The pool carries on with 0.6 BTC at £18,000, an average of £30,000 per BTC. The next sale takes its cost from there.
The Excel formulas
For a single token, with trades in date order (column B = "Buy" or "Sell", C = quantity, D = £ amount including fees), the running pool is:
| Column | Meaning | Formula (row 3) |
|---|---|---|
| E | Pool quantity | =E2 + IF(B3="Buy", C3, -C3) |
| F | Cost taken out on a sale | =IF(B3="Sell", G2 * C3 / E2, 0) |
| G | Pool cost | =G2 + IF(B3="Buy", D3, -F3) |
| H | Gain on a sale | =IF(B3="Sell", D3 - F3, "") |
Row 2 holds your opening pool (zero if you're starting fresh). Copy row 3 down for every trade.
Other things the pool has to handle
- Swaps: swapping ETH for SOL is a sale of ETH (out of the ETH pool) and a purchase of SOL (into the SOL pool), both valued in pounds at the time.
- Gas fees paid in crypto: spending ETH on gas is itself a small disposal of ETH.
- Foreign currency: trades in USD or EUR need converting to pounds on the day. Gainsheet uses Bank of England daily rates.
- One pool per token, not one pool per exchange. BTC on Coinbase and BTC on Kraken go in the same pool.
- Transfers between your own wallets aren't disposals, so they don't touch the pool (though network fees may).
A ready-made version
Gainsheet is an Excel workbook that does all of this: same-day, then 30-day, then Section 104 matching, for every token, with imports for Coinbase, Kraken and Binance, Bank of England FX, and the SA108 box figures at the end. Nothing is hidden: every match is a formula you can click into and check. No macros, and your data never leaves your computer.
Free cheat sheet Free Lite workbook Full version (£39)