ukcapitalgains

Guides · 2026–27 tax year

How Capital Gains Tax on Shares Works

If you sell shares for more than you paid, you might owe Capital Gains Tax. This guide explains how it works in plain English, with simple examples.

Illustration of a rising share price with the gain above a threshold highlighted

Please read

This guide is for general information only. It is not financial or tax advice, and it may contain mistakes or leave out rules that apply to you. It covers shares and funds only, not property, crypto or business assets. Check with HMRC or a qualified adviser before making decisions.

What is Capital Gains Tax?

Capital Gains Tax (CGT) is a tax on the profit you make when you sell something that has gone up in value. You don't pay it on the whole amount you get from the sale, only on the gain.

For shares, that means shares in companies, ETFs, investment trusts and funds held in an ordinary investment account (sometimes called a general investment account or GIA).

Working out your gain

Your gain is what you sold the shares for, minus what they cost you. You can take off the dealing fees you paid when buying and selling, and any stamp duty paid when you bought.

Example: a simple sale

You buy 100 shares at £10 each
£1,000
Fee when buying
£10
You later sell all 100 at £50 each
£5,000
Fee when selling
£10
Gain: £5,000 − £1,000 − £10 − £10
£3,980

If you sell for less than you paid, you have made a loss. Losses are taken off your gains in the same tax year. Unused losses can be carried forward to later years, but you need to tell HMRC about them within 4 years of the end of the tax year you made them.

The £3,000 tax-free allowance

Everyone gets a tax-free allowance called the annual exempt amount. For the 2026–27 tax year it is £3,000. The tax year runs from 6 April to the following 5 April.

Add up all your gains and losses for the tax year. If the total is £3,000 or less, there's no CGT to pay. If it's more, you pay tax on the part above £3,000.

Example: using the allowance

Gain from the example above
£3,980
Tax-free allowance
−£3,000
Taxable gain
£980

The allowance can't be saved up. If you don't use it in a tax year, it's gone.

What rate you pay

For shares, CGT is charged at 18% or 24%. Which one depends on your income.

  • Higher or additional-rate taxpayers pay 24% on all their taxable gains.
  • Basic-rate taxpayers pay 18% on gains that fit inside what's left of their basic-rate band, and 24% on anything above it.

The basic-rate band is £37,700 of taxable income (that's your income after the £12,570 Personal Allowance). Your income fills the band first, and your gains go on top.

Example: a basic-rate taxpayer

Taxable income (after Personal Allowance)
£30,000
Basic-rate band left for gains: £37,700 − £30,000
£7,700
Taxable gain
£10,000
£7,700 taxed at 18%
£1,386
£2,300 taxed at 24%
£552
Total CGT
£1,938

Your income doesn't change the size of your gain. It only changes how much of it is taxed at the lower rate.

Which shares you sold: HMRC's matching rules

If you bought the same shares at different times and prices, which ones did you sell? HMRC has fixed rules for this, applied in this order:

  1. Same day. Shares you bought on the same day as the sale are matched first.
  2. The next 30 days. Then shares you bought in the 30 days after the sale. This is often called the "bed and breakfast" rule.
  3. Average cost. Everything else comes from a pool of all your other shares in that company, at their average cost. HMRC calls this the Section 104 holding.

Example: average cost

January: buy 100 shares at £2
£200
June: buy 100 more at £4
£400
Pool: 200 shares costing £600, average £3 each
£3.00
Sell 50 shares at £5: £250 − (50 × £3)
£100 gain

Fees are left out here to keep the numbers simple. In real life you add buying fees to the cost.

Example: selling and buying back within 30 days

You own 100 shares with an average cost of £3
1 March: sell all 100 at £5
£500
20 March: buy 100 back at £4.80
£480
Gain: the sale is matched with the 20 March shares
£20

Without the 30-day rule the gain would be £200 (£500 − £300). The rule stops people selling and rebuying straight away just to use their allowance. If you want to do this, an ISA may be the better route (search for 'Bed and ISA').

Want more detail? Read our guides to the 30-day rule and Section 104 and average cost. Our calculator applies all three rules to the trades you paste in.

When you don't pay CGT

  • Shares held in an ISA or a pension (such as a SIPP).
  • UK government gilts and Premium Bonds.
  • Shares you give to your husband, wife or civil partner, or to a charity. This is usually tax-free.
  • Total gains for the tax year of £3,000 or less.

Telling HMRC and paying

If you owe CGT, there are two ways to report it:

  • HMRC's online Capital Gains Tax service. Report by 31 December after the end of the tax year, and pay by 31 January.
  • A Self Assessment tax return, if you already fill one in. Pay by 31 January after the end of the tax year.

If you're registered for Self Assessment and sold more than £50,000 of assets in the tax year, you must report the sales on your return even if your gains are under the allowance.

Keep records of every buy and sell: dates, amounts, prices and fees. Your broker's transaction history usually has everything you need.

Our step-by-step guide to reporting shares on the SA108 pages shows which boxes to fill in.

Work out your own CGT

Paste your trades from your broker and see your gain, allowance and tax in seconds.

Open the calculator →

Sources on GOV.UK: Capital Gains Tax, Tax when you sell shares, HS284 Shares and Capital Gains Tax. Last checked 23 September 2026.

This is an estimate, not financial or tax advice. It may contain mistakes and does not cover every situation, so check your figures with HMRC or a qualified adviser before you rely on them.