LearnCoinsBuzzReviewsSecurityGlossarySearchStart Here →
Beginner · Learning Resource

How to Calculate Crypto Capital Gains in the UK (Pooling, Same-Day & 30-Day Rules)

Working out a crypto capital gain in the UK isn't as simple as sale price minus purchase price. HMRC uses a specific set of matching rules to decide which cost counts against each disposal. This is a general explanation of that methodology, not personal tax advice.

💡

The 20-second version

To find a gain you take the disposal proceeds and subtract an allowable cost. HMRC decides which cost to use with three matching rules in order: Same-Day, then the 30-day rule, then the Section 104 pool (your average cost). Get the matching right and the maths is simple arithmetic. Always check HMRC's current guidance or a qualified accountant for your own position.

Advertisement

Read this first

⚠️

This is education, not tax advice

Tax rules, rates and allowances change, and your situation is unique. Nothing here is personal advice. Always check the current official HMRC guidance (the Cryptoassets Manual, CRYPTO22000 onwards) or speak to a qualified accountant before you file.

What 'disposal' and 'cost basis' actually mean

Capital Gains Tax (CGT) is triggered by a disposal. In HMRC's view a disposal is much broader than just cashing out to pounds. It generally includes selling crypto for fiat, swapping one token for another, spending crypto on goods or services, and gifting it to anyone other than a spouse or civil partner. If you're unsure whether a swap counts, see our overview of whether you pay tax when swapping crypto.

Your cost basis (HMRC calls it the allowable cost) is what you're allowed to subtract from the disposal proceeds. It usually includes what you paid for the coins plus certain transaction costs, such as exchange fees directly tied to the buy or sell. The gain is simply proceeds minus allowable cost. The hard part is never the subtraction; it's deciding which cost to use when you've bought the same token many times at different prices.

ℹ️

Why matching rules exist

If you've bought Bitcoin five times at five prices, which purchase do you 'sell' first? HMRC doesn't leave that to choice. It applies three matching rules in a fixed order to pair every disposal with a specific cost, so two people with identical trades reach the same answer.

The three matching rules, in order

For each token you hold, HMRC matches a disposal against acquisitions using these rules in this strict priority. You only move to the next rule once the previous one is exhausted.

1. The Same-Day rule

Any tokens you buy on the same day you sell are matched first, regardless of clock time. So if you sell 1 ETH and also buy 0.4 ETH that same day, that 0.4 ETH's cost is matched to the sale before anything else is considered. This stops people manufacturing artificial results by trading in and out within a single day.

2. The 30-day rule ('bed and breakfasting')

Next, any disposal is matched against tokens of the same type bought in the 30 days after the disposal. The name comes from an old trick of selling an asset to bank a loss and rebuying it the next morning. The 30-day rule blocks that for crypto: if you rebuy within 30 days, the new purchase price (not your pool average) becomes the cost for that sale. This matters a lot for anyone thinking about tax-loss harvesting.

3. The Section 104 pool

Anything left over is matched against your Section 104 pool. The pool holds all your remaining coins of one type and tracks a single average cost for the whole holding. Every purchase adds to the pooled cost and the pooled quantity; every disposal removes a proportional slice of that average cost. For most ordinary investors who aren't day-trading, the great majority of disposals are matched here.

Pooling is per token, per person

You keep a separate Section 104 pool for each distinct cryptoasset (one for BTC, one for ETH, and so on). Pools belong to the individual, not the exchange, so coins of the same type sit in one pool even if they're spread across several wallets or platforms.

A simple worked example (illustration only)

Round numbers below are for illustration only and not a guide to real prices or your own tax. Imagine three Bitcoin purchases that all go into the Section 104 pool:

ActionQuantityCostPool quantityPool cost
Buy1 BTC£10,0001 BTC£10,000
Buy1 BTC£20,0002 BTC£30,000
Buy2 BTC£50,0004 BTC£80,000

The pool now holds 4 BTC for a total cost of £80,000, an average of £20,000 per BTC. Now you sell 1 BTC for £30,000, with no same-day buy and no rebuy in the next 30 days, so the disposal is matched entirely to the pool.

  1. Disposal proceeds: £30,000.
  2. Allowable cost: 1 BTC at the pooled average of £20,000.
  3. Gain on this disposal: £30,000 minus £20,000 = £10,000.
  4. Remove 1 BTC and £20,000 of cost from the pool, leaving 3 BTC and £60,000 of pooled cost.
  5. That £10,000 gain is then set against your annual CGT exempt amount before any tax is worked out.

Notice the cost wasn't £10,000 (your first buy) or £25,000 (your most recent average of the last two buys). It was the pooled average across everything. If you had instead rebought BTC two weeks after selling, the 30-day rule would have replaced that £20,000 pool cost with the actual price of the rebuy. The figure you carry forward and the gain you report can both change depending on which rule applies.

ℹ️

Gain isn't the same as tax due

This example stops at the gain. Whether any tax is actually payable depends on your total gains for the year, your annual exempt amount and the rate that applies to you. Those allowances and rates change, so see our note on the current CGT allowance and rates and always confirm the live figures on HMRC's site.

Advertisement

When it's income, not a capital gain

Pooling only deals with capital gains. Crypto you earn is usually a different question and can be subject to Income Tax at the point you receive it, based on its sterling value that day. That value then typically becomes the cost basis entering your pool. Common earned-crypto situations include staking rewards, some airdrops, and certain DeFi returns; the tax treatment varies, so read up on staking and mining tax and DeFi and NFT tax for the detail.

  • Income event first: the token's value on receipt may be taxed as income, and that value enters your pool.
  • Capital event later: when you eventually dispose of those same tokens, the pooling and matching rules above decide the gain or loss.
  • The same coins can therefore touch two different taxes at two different times.

For the wider picture of how the UK system fits together, our UK crypto tax overview is the place to start, and you can compare approaches with the US treatment if you have cross-border exposure.

Keeping records and letting software do the matching

The matching rules are mechanical, but applying them by hand across hundreds of transactions, multiple wallets and several years is where mistakes creep in. The foundation is good record-keeping: dates, quantities, sterling values and fees for every acquisition and disposal. Get those right and the calculation follows. When you're ready to report, see filing crypto via Self Assessment and the deadlines and penalties to avoid.

This is also exactly the kind of repetitive, rules-based work that crypto tax software is built for. Tools in this space import your transaction history, maintain the Section 104 pool automatically, and apply the Same-Day and 30-day rules in the correct priority, producing figures formatted for HMRC. We compare the options in our best crypto tax software roundup. None of this removes your responsibility to check the output and your own facts.

Let Koinly handle the pooling maths

Koinly connects your exchanges and wallets and applies HMRC's Section 104 pooling plus the Same-Day and 30-day rules automatically. It's free to import and preview your figures; you only pay when you download the SA108-ready report.

Get it →Affiliate link — we may earn a commission at no cost to you.

Key takeaways

  • A disposal includes selling, swapping, spending or gifting crypto, not just cashing out to pounds.
  • HMRC matches disposals to costs in a fixed order: Same-Day, then the 30-day rule, then the Section 104 pool.
  • The Section 104 pool tracks one average cost per token and handles most ordinary disposals.
  • Gain equals proceeds minus the matched allowable cost; tax due then depends on current allowances and rates.
  • Software like Koinly applies these rules automatically, but you still own the accuracy of your records.

Frequently asked questions

Do I have to use the Section 104 pool, or can I pick which coins I sold?

You don't get to choose. HMRC requires the Same-Day and 30-day rules to be applied first, with everything else matched to the pooled average. It's a set methodology, not an election, so two people with the same trades should reach the same gain.

Does swapping one coin for another count as a disposal?

Generally yes. HMRC usually treats a crypto-to-crypto swap as a disposal of the first token at its sterling value, even though no pounds change hands. That can create a gain or loss to report. See our note on swapping crypto and tax for more.

What is the 30-day rule trying to stop?

It blocks 'bed and breakfasting' — selling to crystallise a loss or reset a cost basis and then quickly rebuying the same token. If you rebuy within 30 days, the new purchase price is matched to the earlier sale instead of your pool average.

Does tax software calculate this correctly for HMRC?

Reputable UK-aware tools maintain the Section 104 pool and apply the Same-Day and 30-day rules in the right order, then format the result for Self Assessment. You should still review the figures and confirm the current allowances and rates on HMRC's site or with an accountant.

LC

The Latest Crypto Team

Independent crypto education · free for all

We built LatestCrypto because we were fed up with the scams, shilling and terrible advice that fill the crypto internet. Everything here is free, honest and made with love — no hype, no “trust me bro”, and we’ll never tell you what to buy. Spotted something we got wrong? Tell us, and we’ll fix it.

Advertisement