TaxBullUK Capital Gains Tax

Capital Gains Tax on shares, explained properly

What HMRC actually requires when you sell shares, funds or crypto — the rules that decide your number, why that number is often not what people expect, and what goes on the form.

Written for someone doing their own return. It is a guide, not advice. Check anything that matters against HMRC's own manuals, which are linked throughout.

What is actually taxed

Capital Gains Tax is charged on the gain, not on what you received. Sell £50,000 of shares that cost you £48,000 and the gain is £2,000 — that is the figure the tax looks at.

A gain arises when you dispose of something. Selling is the obvious case, but so is giving it away, swapping one crypto asset for another, or using it to pay for something. Transferring between your own accounts is not a disposal; the shares simply move, and their cost moves with them.

The single most useful thing to understand is that HMRC does not let you choose which shares you sold. If you hold the same share bought at different times and prices, a fixed set of rules decides which purchase your sale is matched against — and that decision changes the tax.

The matching rules, in order

For each sale, work through these in sequence. Only what is left over reaches the next step.

  1. Same day. Anything you bought on the same day as the sale is matched first.
  2. The next 30 days. Anything you buy back in the 30 days after the sale is matched next — yes, a purchase that happens after the sale.
  3. The Section 104 pool. Everything else comes out of a pooled average cost.

The order is fixed and it is not optional. It comes from sections 104, 105 and 106A of the Taxation of Chargeable Gains Act 1992, and HMRC set it out at CG51560 onwards.

The Section 104 pool

Shares of the same class in the same company form one pooled holding with one average cost. Every purchase adds to the pool's quantity and its total cost; every sale takes out a proportion of both.

Worked example

Jan   buy 100 at £10      pool: 100 shares, £1,000
Jun   buy 100 at £14      pool: 200 shares, £2,400  (average £12)
Sep   sell 150 at £20     proceeds  £3,000
                          cost      150 × £12 = £1,800
                          gain                   £1,200
                          pool left: 50 shares, £600

Note what did not happen: you did not sell "the January ones" at £10 or "the June ones" at £14. There is no first-in-first-out here, and no picking the most convenient lot. There is one average.

The 30-day rule, and why your number looks wrong

If you sell and buy the same holding back within 30 days, the sale is matched to that repurchase instead of to your pool. The rule exists to stop people realising a loss, or using up an allowance, while never really letting go of the holding.

The same sale, with a repurchase

Jan   buy 100 at £10           pool: 100 shares, £1,000
Mar   sell 100 at £8           proceeds £800
Mar   buy 100 at £8.50  ← 12 days later

Matched to the repurchase:  cost £850, loss £50
Matched to the pool would have been: cost £1,000, loss £200

The loss you thought you had banked is mostly still sitting in the holding you bought back. Nothing has gone wrong; this is the rule working.

This catches people out after they have filed. A sale in late March can be re-matched by a purchase in early April — a different tax year. If you file early and then buy back, a figure you have already submitted can change.

Foreign currency: use HMRC's rates, not your broker's

If you bought or sold in dollars or euros, each leg is converted to sterling separately: the purchase at the rate for the month you bought, the sale at the rate for the month you sold.

Use HMRC's published monthly rates (CG78310), not the rate your broker happened to give you and not a rate from a market data site.

Why this matters even when the price never moved

Bought 100 shares at $100   ($10,000)  rate 1.25  →  cost     £8,000.00
Sold   100 shares at $100   ($10,000)  rate 1.125 →  proceeds £8,888.89
                                                     gain      £888.89

The share did nothing. Sterling weakened, so the same dollars are worth more pounds, and that movement is a taxable gain. This is correct and it surprises nearly everyone.

What you can deduct, and what you cannot

CostAllowable?Where it goes
Dealing commissionYesAdded to cost, deducted from proceeds
Stamp duty / SDRTYesAdded to the purchase cost
Exchange and clearing feesYesAdded to the relevant leg
Platform or subscription feesNoReduces what you keep, not what you owe
Interest on marginNoNot a cost of acquiring the asset
Your time, research, data feedsNo

The distinction is whether the cost was part of acquiring or disposing of the asset. An annual platform charge is a cost of holding an account, so it never touches the gain.

The annual exempt amount

Everyone gets an allowance of tax-free gains each year. It has been cut sharply: £12,300 in 2022/23, £6,000 in 2023/24, and £3,000 from 2024/25.

It does not carry forward. If you do not use it in a tax year, it is gone on 6 April.

Rates on gains above the allowance also changed part-way through 2024/25: disposals on or after 30 October 2024 are taxed at 18% and 24% rather than 10% and 20%. A single tax year can therefore contain both sets of rates, which is one of the fiddlier things to get right by hand.

Losses

  • Losses in the same year are set against gains automatically — you do not get to hold them back.
  • Losses left over carry forward indefinitely, but only if you claim them. Report a loss within four years of the end of the tax year it arose, or you lose the right to use it.
  • Carried-forward losses are used only down to the allowance, never below it. They should never be wasted covering gains the allowance would have covered anyway.

Crypto

HMRC treats cryptoassets as property for CGT, and the same pooling and 30-day rules apply — one pool per token, per person.

Things people miss:

  • Swapping one coin for another is a disposal. Selling ETH for USDT is a taxable event even though no pounds appeared.
  • Spending crypto is a disposal at its sterling value that day.
  • Staking, mining and airdrop rewards are income first, taxable at their value when you received them (CRYPTO21150). That same value then becomes their cost, so selling later only taxes the movement since.
  • Moving coins between your own wallets is not a disposal.

Options

An option is a separate asset from the shares it relates to, and it is never pooled with them.

  • Write an option that expires worthless and the premium is a gain in the year you wrote it.
  • Get assigned on a put you wrote and the premium comes off the cost of the shares you are given.
  • Get called away on a covered call and the premium is added to your sale proceeds.
  • Buy an option and exercise it, and the premium joins the cost of what you acquired.

The cross-year point matters: a premium received in March for an option that expires in May is taxed in the earlier year, not the later one.

Offshore funds: the trap worth knowing

Funds based outside the UK fall into two groups, and the difference is large.

TypeHow a gain is taxedAllowance?
Reporting fundCapital gain, 18% or 24%Yes
Non-reporting fundIncome, up to 45%No

On an £8,000 gain that is the difference between roughly £1,200 and £3,600. A loss, however, stays an ordinary capital loss either way — it cannot be set against the income side.

Reporting funds also have excess reportable income: income the fund earned but did not pay out. It is taxable six months after the fund's reporting period ends even though nothing reached your account, and it then increases your pool cost so the same money is not taxed twice when you sell. Check the fund manager's reportable income statement, or HMRC's list of reporting funds.

If you lived abroad for part of it

A non-resident is generally not taxed by the UK on gains on shares or crypto. But leaving for a short spell does not shake off the charge: if you are away for five years or less and were UK resident for four of the seven years before leaving, gains you made while away are taxed in the year you return.

Anything you both bought and sold while away is outside that. Split tax years have their own rules — see HMRC's RDR3.

What actually goes on the return

Capital gains go on the SA108 pages alongside your Self Assessment return.

  • Listed shares and securities have their own boxes: number of disposals, proceeds, allowable costs, gains, losses.
  • Other assets, including crypto and unlisted holdings, have their own set.
  • Losses brought forward and carried forward each have a box.
  • Offshore income gains from non-reporting funds go on the SA106 foreign pages, not here.

You may need to report even with no tax to pay — for instance where total proceeds are large relative to the allowance, or where you want to register a loss for future years. Check HMRC's current thresholds before deciding not to file.

Keep your workings. HMRC can ask, and "the software said so" is not an answer — which is why every figure this tool produces can be expanded to the individual disposals and matched purchases behind it.

Getting your data out of a broker

BrokerWhere to find it
Trading 212History → Export → CSV. Amounts already in GBP.
FreetradeActivity → Export. ISA rows are excluded automatically — an ISA is free of CGT.
Interactive BrokersReports → Flex Query or Activity Statement, as CSV.
Charles SchwabHistory → Export.
Hargreaves Lansdown, Vanguard, Fidelity, Interactive InvestorTransaction history export. Most UK platforms quote in pence — that is handled.
Coinbase, BinanceFull transaction or ledger export, not just trades, so rewards are included.

Export the whole history, not just the tax year. A sale in 2025 can be matched to a purchase from 2019, and without that purchase its cost is missing and the gain comes out too high.

Where people usually go wrong

  1. Treating it as first-in-first-out. Pooling is an average, and the answer differs.
  2. Forgetting the 30-day rule, especially across 5 April.
  3. Converting at one year-end rate rather than each leg at its own month's HMRC rate.
  4. Importing only the tax year, leaving earlier purchases — and their cost — out.
  5. Missing pence. Most UK shares quote in pence; treating 250p as £250 overstates a holding a hundredfold.
  6. Assuming a crypto-to-crypto swap is invisible. It is a disposal.
  7. Not claiming losses, then finding four years later that they cannot be used.
  8. Ignoring a stock split or a ticker change, which quietly makes every figure for that holding wrong.

Try it on your own data

The calculator applies everything above to your actual export, and shows the matched purchases behind every figure so you can check them rather than trust them.

Open the calculator