BLACK FRIDAY 30% OFF
BLACK FRIDAY SALE 30% OFF MASTERCLASSES USE CODE BLACKFRIDAY SALE STARTS IN 02d 07h 41m 13s
Skip to main content

How to Calculate Capital Gains Tax on Shares in the UK

Fact-checked against official UK guidance in November 2026. Recheck annual rates and allowances for the relevant tax year.

UK Capital Gains Tax (CGT) on shares is generally calculated by comparing disposal proceeds with allowable acquisition and disposal costs, applying the correct share-identification rules, offsetting allowable capital losses and then the available annual exempt amount. For individuals, purchases of the same class of share are often pooled in a Section 104 holding, but shares bought on the same day or in the 30 days following a sale are normally matched first under special rules. ISA-held qualifying investments generally fall outside ordinary UK CGT on investment gains.

Rules and rates change, so examples below distinguish the evergreen calculation from 2026–27 allowances and rates, checked against HMRC.

UK share disposal: which costs are matched?
  1. 1 / 4

    Acquisitions on the same day

  2. 2 / 4

    Eligible acquisitions in the following 30 days

  3. 3 / 4

    Remaining shares in the Section 104 pool

  4. 4 / 4

    Include relevant allowable costs and GBP values

HMRC’s ordering rules govern relevant taxable disposals; a broker’s average-cost figure is not always the tax calculation.

The six steps in a UK share CGT calculation

  1. Identify the taxable disposal, the legal owner, share class and tax year.
  2. Calculate net sale proceeds, including allowable selling fees and correctly converted foreign-currency values.
  3. Identify which purchased shares the disposal matches using same-day, 30-day and Section 104 rules in the correct order.
  4. Allocate allowable purchase costs and eligible costs of disposal.
  5. Combine chargeable gains and allowable losses for the tax year, including available brought-forward losses under the rules.
  6. Apply the available annual exempt amount and the correct CGT rate bands, then check reporting requirements.

HMRC’s dedicated HS284: Shares and Capital Gains Tax illustrates the required matching sequence. Simply taking average purchase price from a brokerage app can be wrong when the 30-day rule applies.

Section 104 pool: why average acquisition cost matters

A Section 104 holding pools the cost of shares of the same class in the same company that are not matched under the priority identification rules. Consider 100 shares purchased at £10 and a further 100 at £14. Ignoring fees, the investor owns 200 shares with an aggregate allowable pool cost of £2,400—an average £12 per share.

If 80 shares are sold at £19, proceeds are £1,520. The pooled cost allocated to the disposal is 80/200 × £2,400 = £960. The illustrative gain is £560. The remaining 120-share pool has a cost of £1,440, keeping the cost at £12 each until another relevant event changes it.

When transfers, stock splits, inheritance or corporate reorganisations occur, reconstruct the actual allowable pool under HMRC’s rules; the displayed average cost on an app may not be reliable.

Same-day matching and the following-30-days rule

HMRC normally matches disposals first against shares acquired on the same day. Next it matches shares acquired in the following 30 days by an individual UK tax-resident at the later acquisition. Only then are remaining disposed shares matched against the Section 104 pool. These rules are designed in part to prevent simply selling and repurchasing identical shares to crystallise a chosen loss.

Worked example: An investor sells 100 shares for £20 each (£2,000), ignoring expenses. They buy 40 shares on the sale day for £18 each, and 30 more of the same share class ten days later for £17 each. Assume the remaining 30 sold shares are matched to an established Section 104 pool cost of £12 per share. The allowable cost becomes 40×£18 + 30×£17 + 30×£12 = £1,590. The gain is £2,000 − £1,590 = £410. Without those same-day and later purchases, the pool-based result would differ.

Where disposals and purchases overlap, partial allocations and order of identification matter. Use HMRC HS284, not a generic “30 days before or after” shortcut.

Worked tax calculation for 2026–27

HMRC lists the normal individual annual exempt amount for 2026–27 at £3,000. Main individual CGT rates are generally 18% and 24%, subject to available basic-rate band and the type of gain. Suppose a UK individual has £5,500 of chargeable share gains and £500 of allowable capital losses in the same year, with no other gains or special relief. Net gain is £5,000. After the £3,000 annual exempt amount, the simplified taxable gain is £2,000. If all falls at the 24% rate, illustrative CGT is £480; if all falls at 18%, it is £360. A gain crossing tax bands requires a split calculation.

These rates are not universal to every asset or every taxpayer. Complex rules can apply to non-residents, trusts, carried interest and individuals claiming specific reliefs. HMRC: rates and allowances.

The matching hierarchy at a glance

OrderShares to match against a disposalPitfall
1Acquisitions on the disposal dateCannot ignore same-day repurchases
2Acquisitions within 30 days after disposalUK tax residence conditions apply
3Section 104 pooled holdingCheck pool after each relevant transaction

Which costs can be deducted and which cannot?

Allowable costs can include the acquisition amount and certain incidental purchase or disposal costs, such as qualifying brokerage commission or transaction taxes, where HMRC’s statutory conditions are met. Financing costs, ordinary account fees, costs already deducted elsewhere and general research spending are not automatically allowable capital costs. Corporate actions can change the calculation and cost apportionment.

For foreign shares, both purchase cost and sale proceeds generally need conversion into sterling on the respective relevant transaction dates; a foreign-currency investment gain may differ from the share’s dollar-price gain. Keep original confirmations, exchange rates used, dividends, rights issue notices and the history of share reorganisations.

How do losses and ISA holdings change CGT?

Allowable capital losses from taxable investments can ordinarily offset gains subject to claiming and carry-forward rules. Losses on assets held in a qualifying stocks and shares ISA generally do not create a deductible CGT loss, just as gains inside that wrapper are normally free from CGT. A broker’s report showing a loss is not enough to establish an allowable tax loss: match the shares correctly and check whether an anti-avoidance or special rule applies.

Worthless shares may raise the separate question of an HMRC negligible-value claim; being delisted or suspended does not itself prove negligible value. The company, legal rights and valuation evidence matter. See HMRC negligible-value guidance.

Reporting, records and deadlines

Whether a sale must be included on a Self Assessment return depends on the size of gains, proceeds, losses, registration and other conditions. There are reporting tests in addition to simply asking whether net taxable gains exceed £3,000. HMRC’s reporting guidance sets out relevant thresholds, while reporting and payment guidance explains methods and deadlines. Keep complete transaction histories even where tax payable is zero.

A regular securities disposal normally belongs to the tax year in which it occurs under the tax rules. A 2026–27 disposal is not automatically assessed under 2025–26 rates because the security was purchased years before.

Special cases: ETFs, company reorganisations and inherited shares

UK reporting offshore funds, non-reporting offshore funds, accumulating units, share reorganisations and inherited securities can differ from an ordinary UK equity sale. A dividend accumulated within a fund can affect its tax cost base; foreign ETF reporting status may turn what appears to be a capital gain into a different type of taxable amount. Inherited shares can involve a different tax acquisition value rather than the deceased investor’s original price.

For these cases, start with HMRC HS265 and the appropriate capital-gains helpsheet; seek a qualified tax adviser where sums are material.

Frequently asked questions

Do I pay CGT when I sell shares at a loss?

A disposal at a genuine allowable capital loss does not itself create taxable gain, but relief and reporting depend on matching, ownership and the rules.

Is a share transfer between two of my own brokers taxable?

An in-specie move preserving beneficial ownership generally does not involve a market sale, although unusual transfers need case-specific review.

Does every investor have a £3,000 tax-free gains allowance?

The normal individual annual exempt amount is £3,000 for 2026–27, but some relief elections and statuses can affect eligibility.

Does the 30-day rule apply to shares bought before I sell?

The specific anti-bed-and-breakfast identification rule generally looks to qualifying acquisitions in the 30 days after disposal, following same-day matching.

Is CGT charged on dividends?

Ordinary dividends are usually income rather than capital gains, with separate dividend tax rules. Corporate distributions can have special classification.

Primary sources and further reading

Important notice: General education only, not personalised investment, legal or tax advice. Hypothetical calculations exclude costs unless stated. Tax rules can change; confirm current official guidance and individual circumstances.

Related practical education: For special situations involving taxable repurchases and realising losses on shares, these focused explanations apply HMRC’s identification and claim rules: UK 30-day share matching, claiming UK capital losses.


Stay Ahead of the Markets

Get market analysis, financial news and practical trading insights delivered straight to your inbox.