Skip to content
Free CGT calculator

Section 104 Share Pool Calculator

Build your Section 104 pool and apply the matching rules to every sale.

Quick answer

The Section 104 pool is HMRC’s way of working out the cost of shares you bought at different times. When you sell, the sale is matched first with shares bought the same day, then with shares bought in the next 30 days, and only then with the pool, which uses the average cost of everything else you hold. Enter every purchase and sale above, and the calculator builds the pool and shows the gain on each sale.

Key facts

  • Matching order: same-day purchases, then purchases in the next 30 days, then the Section 104 pool.
  • The pool holds the total number of shares and their total cost, so the cost of each share is the average.
  • Each sale removes shares and cost from the pool in proportion.
  • The rules apply to each type of share or fund separately, and to cryptoassets in the same way.
  • Gains are taxed at 18% or 24% in 2026/27, after the £3,000 allowance.

How this calculator works

Enter every purchase and every sale for one share or fund, in any order. For each purchase, enter the total you paid including dealing fees and stamp duty. For each sale, enter the net proceeds after fees. The calculator sorts your transactions by date, applies the matching rules and shows the gain per sale and per tax year. Add your income and it estimates the tax on gains made in 2026/27.

If you hold several different shares, run the calculator once for each. For crypto, use the crypto calculator, which handles several tokens at once.

The three matching rules in order

HMRC does not let you pick which shares you sold. It identifies them by rule, in a fixed order, so the answer is the same for everyone.

OrderRuleMatches a sale withCost used
1Same-day ruleShares of the same type bought on the day of the saleThe actual cost of those shares
230-day ruleShares bought in the 30 days after the saleThe actual cost of those shares
3Section 104 poolAll other shares you holdAverage cost of the pool
How HMRC matches share sales with purchases.

The 30-day rule only looks forward. A sale is matched with later purchases, which stops you selling and immediately rebuying to bank a loss. Our bed and breakfast rule guide explains the history and the exceptions.

Infographic: Share Matching Rules for UK Capital Gains Tax: Same Day, 30 Days, Then the Pool
A fixed order that you cannot choose
Infographic: The 30-Day Bed and Breakfast Rule: What Happens When You Sell and Rebuy Shares
A quick rebuy is matched against the sale

Worked example with all three rules

Here is a typical set of transactions for one share:

OrderActionSharesAmount
FirstBuy1,000£2,000
About a year laterBuy500£1,500
Later, in 2026/27Sell800£4,000
Ten days after the saleBuy200£800
Transactions entered into the calculator.

The sale of 800 shares is matched in two steps:

Worked example

Matching an 800-share sale

  • 30-day rule: The 200 shares bought ten days later match first, at their actual cost of £800.
  • Section 104 pool: The other 600 shares come from the pool. Before the sale the pool holds 1,500 shares that cost £3,500, an average of £2.33. Removing 600 shares takes £1,400 of cost.
  • Total cost of the sale: £2,200.
  • Gain: £4,000 less £2,200 = £1,800.
  • Pool afterwards: 900 shares with a cost of £2,100.

Without the 30-day purchase, the whole 800 shares would have come from the pool at the average cost, giving a cost of £1,867 and a gain of £2,133. The rule changed the gain because it replaced average cost with the real cost of the recent purchase. On a taxable income of £45,000, the gain of £1,800 is within the allowance, so the tax is £0.

Infographic: Worked Example: Selling 800 Shares Matched to a 30-Day Rebuy and the Section 104 Pool
Two matches, one total gain

Same-day purchases and sales

If you buy and sell the same share on one day, the two are matched and left out of the pool. For example, buying 100 shares for £700 and selling 100 on the same day for £900 gives a gain of £200, whatever the pool contains. The earlier 1,000 shares stay in the pool untouched, still worth £2,000 in cost.

What goes into the pool

Every purchase that is not matched with a same-day or 30-day sale is added to the pool at its full cost including fees. When you sell from the pool, cost leaves in proportion to the number of shares sold. The pool never records individual lots. Because of that, it must be built in date order from your first purchase. A missing early purchase will distort every later gain.

Pool eventEffect on sharesEffect on cost
Purchase added to the poolAdd the shares boughtAdd the total paid, with fees
Sale from the poolRemove the shares soldRemove cost in proportion
Share split or bonus issueChange the share countCost stays the same
Dividend reinvested in a fundAdd the new unitsAdd the reinvested amount
How the Section 104 pool changes over time.
Infographic: What Changes a Section 104 Share Pool: Purchases, Sales, Splits and Reinvested Income
How shares and cost move together

What this calculator does not cover

The calculator is designed for straightforward buys and sells of one holding. It does not model:

  • Share splits, consolidations, bonus issues and rights issues, where you must adjust quantities and costs by hand.
  • Takeovers and share-for-share exchanges, which can roll cost into the new shares.
  • Shares acquired through employee schemes, which have their own cost rules.
  • Shares held by trustees or personal representatives.
  • Holdings that straddle the rules before and after earlier reforms.

When something unusual has happened, use the figures from your broker’s records and consider speaking to a tax adviser.

Common mistakes with share pooling

  • Leaving out an early purchase. The pool is cumulative, so one missing line affects every later gain.
  • Using cost per share without fees. Dealing fees and stamp duty are part of the cost.
  • Entering gross instead of net proceeds. Deduct selling fees from the amount received.
  • Ignoring the 30-day rule. A rebuy within 30 days changes the matched cost.
  • Mixing different shares. Each company or fund has its own pool.
  • Assuming a “last in, first out” choice. You cannot pick which shares you sold.

What to do next

  1. Gather the contract notes for every purchase and sale of the holding.
  2. Enter them above in any order and check the pool balance against your broker’s records.
  3. Read the bed and breakfast rule guide if you sold and rebought within 30 days.
  4. Use the shares calculator for a one-off sale, or the guide to shares and CGT for background.
  5. Report any gains over the allowance, or total proceeds over £50,000, as set out in our reporting guide.

Frequently asked questions

What is a Section 104 holding?

It is the pool of shares of the same type that you bought at different times, held at their combined cost. HMRC uses it to work out the cost of any shares you sell that are not matched by the same-day or 30-day rules.

How do I calculate the average cost of a Section 104 pool?

Add up the total cost of all purchases in the pool, including fees, and divide by the number of shares. Each sale removes the same proportion of the total cost.

What is the 30-day rule for shares?

If you buy shares of the same type within 30 days after selling them, the purchase is matched with the sale instead of the pool. The gain is based on the cost of the new shares.

Is the same-day rule applied before the 30-day rule?

Yes. HMRC applies the same-day rule first, then the 30-day rule, and only then the pool. This holds for all sales you make.

Do I need a pool for shares in an ISA?

No. Shares held in an ISA are exempt from Capital Gains Tax, so they never go into a pool and do not need reporting.

Can I use specific lots to reduce my gain?

No. HMRC does not allow you to choose which shares you sold. The matching rules decide, and every taxpayer must follow them.

Does the pool include dividends?

Cash dividends are not part of the pool. Reinvested amounts in accumulation funds are usually added to the cost because they were taxed as income.

What happens if I sell more shares than the pool holds?

The calculator flags it. In real life it usually means a purchase is missing from your records or a corporate action has changed your holding. Fix the data before using the result.

Can I use this for several tax years at once?

Yes. The pool builds across all years, and the calculator shows the gain for each tax year. It estimates tax only for 2026/27, because earlier years had different rates and allowances.

Is the result enough to file my tax return?

It gives you the gain per sale and the pool balance, which are the numbers you need. Check them against your broker’s statements and keep your working for HMRC.

Official sources

This page gives general information for UK taxpayers and is not tax advice. Capital Gains Tax rules can change and your own circumstances matter. Check the latest rules on GOV.UK or with a qualified tax adviser before you act.