No spam, one email a week, unsubscribe any time. See our Privacy Policy.
How the Section 104 pool works
When you sell UK shares you cannot pick which ones you sold. HMRC pools all shares of the same company into a single Section 104 holdingHMRC's method for valuing shares of the same class bought at different times. All purchases are averaged into one pooled cost per share, used to work out the gain when you sell. and averages the cost: (total cost of all shares owned ÷ total number of shares) = average cost per share. This calculator builds that pool for you, and in full transaction history mode it applies the complete HMRC matching order to every sale. Prefer to follow the maths yourself first? Read how to calculate CGT on shares.
The order HMRC matches shares
You do not choose which shares you sold, and it is not first-in-first-out. Every disposal is matched against your purchases in a fixed order:
- Same-day rule: shares bought on the day of the sale are matched first.
- Bed & breakfastSelling shares to use your CGT allowance then quickly rebuying them. HMRC blocks it - shares rebought within 30 days match to the sale, not the cheaper pool, so no gain is crystallised. (30 days): shares bought in the 30 days after the sale come next - this stops you selling to use your allowance and instantly buying back. It only applies if you were UK resident when you rebought, and new shares from a rights or bonus issue do not count as fresh purchases here.
- Section 104 pool: everything else is matched to your pooled average cost.
In full transaction history mode the calculator applies all three rules to every sale and its report shows exactly which purchases each sale was matched against. The difference is not academic: match part of a sale to a 30-day repurchase instead of the pool and the gain changes.
Import your broker’s CSV - one pool across every account
HMRC pools per person, not per platform. If you hold the same fund with two brokers it is still a single Section 104 holding, and the “book cost” your platform displays may not follow HMRC’s matching rules at all. Import the trade history from each account together and the calculator builds the combined pool the tax rules expect. Use your full history, not a single tax year: the pool is built from every purchase you have ever made in a security, so a part-year export cannot compute it and the calculator will tell you which sale it cannot match.
Everything runs in your browser: your transactions are never uploaded or stored. Export gives you two files - a transactions CSV that re-imports here (your save file for adding next year’s trades), and a full report with the Self Assessment figures and a disposal-by-disposal audit trail.
How your gain is actually taxed
This is where most calculators mislead you. CGT is not simply "18% if you are a basic-rate taxpayer". Your taxable gain - after the £3,000 annual exempt amount - is stacked on top of your income. The slice that still fits inside the basic-rate band (up to £50,270) is taxed at 18%; anything above is taxed at 24%. A single gain can be split across both rates.
Worked example: income £40,000, gain £20,000. After the £3,000 allowance, £17,000 is taxable. Exactly £10,270 (the £50,270 basic-rate limit minus your £40,000 income) fills the rest of the basic-rate band at 18%, and the remaining £6,730 is taxed at 24%.
Scottish taxpayer? CGT still uses the UK-wide bands
Income tax bands are devolved; Capital Gains Tax is not. Scottish higher-rate income tax starts above £43,662 in 2026/27, but the CGT split point stays at the UK-wide £50,270 for every UK taxpayer. A Scot already paying higher-rate income tax can therefore still have part of a gain taxed at 18%. The calculator applies the UK-wide test automatically, wherever in the UK you live. For the full explanation and a Scotland-defaulted version, see the capital gains tax Scotland calculator.
Using capital losses
Losses on other share disposals are deducted from your gains in the same year first. If losses remain, they carry forward indefinitely - but you must claim them within 4 years of the end of the tax year in which they arose, so report a loss on your tax return even in a year you owe nothing. Brought-forward losses are only used down to the level of the annual exempt amount, never below it, so the allowance is not wasted.
Crystallising a gain without breaking the 30-day rule
Selling to use your £3,000 allowance and rebuying the same shares within 30 days does not work - the bed & breakfast rule matches the repurchase to the sale. The legitimate alternatives that keep you invested are to rebuy through your spouse (bed-and-spouse), rebuy the holding inside an ISA (bed-and-ISA), or buy a similar but not identical fund.
Deductible costs
You can reduce the gain by the incidental costs of buying and selling: broker fees and commission, and Stamp Duty Reserve Tax (SDRT, usually 0.5%) paid on purchase. In full transaction history mode, enter these in the fees column - imported fee columns are picked up automatically.
Reporting and paying
Share gains are not reported through the 60-day service - that is only for UK residential property. Report shares on your Self Assessment return, or HMRC’s real-time CGT service. You must report if your gains exceed £3,000 or, if you file Self Assessment, when your total proceeds exceed £50,000 - even when the gain is within the allowance. The full report export includes the figures the SA108 capital gains pages ask for.
The 2026/27 rates
Share CGT has been 18% and 24% since 30 October 2024, aligned with residential-property rates, with a £3,000 annual exempt amount. Selling a second property too? Use the property CGT calculator.
Selling crypto? HMRC pools fungible tokens the same way (NFTs excepted) - Section 104 averaging with the same-day and 30-day rules - so the maths here applies, though this tool is built for shares. See HMRC’s Cryptoassets Manual.
Hold income funds? Reinvested income in accumulation unitsFund or ETF units that reinvest income instead of paying it out. The reinvested income is still taxed each year and must be added to your Section 104 cost, or you overpay CGT on sale. is taxed as income but also raises your pool cost - our guide to CGT on shares covers this, plus RSU and foreign-share cost basis, in full.
Not sure what acquisition cost to enter for shares you got through work? Include the amount already taxed as income at acquisition, not just what you paid - see our employee share scheme tax guide.