Guides · 2026–27 tax year
Published · Updated
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.

The short answer
- You pay Capital Gains Tax on the profit when you sell shares for more than you paid, not on the whole sale price.
- The first £3,000 of gains each tax year is tax-free.
- Above that, gains on shares are taxed at 18% or 24%, depending on your income.
- Shares held in an ISA or a pension are free of Capital Gains Tax.
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). An ETF based outside the UK, such as in Ireland, can also have income to report each year, which our guide to excess reportable income explains. For a UK accumulation fund, our guide to reinvested fund income shows how income you've already paid tax on adds to your cost.
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. Our guide to capital losses on shares explains how they're used and how to claim one.
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:
- Same day: shares you bought on the same day as the sale are matched first.
- The next 30 days: then shares you bought in the 30 days after the sale. This is often called the "bed and breakfast" rule.
- 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. Buying back inside an ISA isn't caught by the rule, though it has its own costs. Our 30-day rule guide covers the options, and our [Bed and ISA guide](/bed-and-isa-capital-gains-tax) covers the ISA route.
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. A gilt's interest is still taxed as income, and our savings guide compares what gilts, Premium Bonds and savings accounts leave after tax.
- Shares you give to your husband, wife or civil partner, or to a charity. This is usually tax-free. Our guide to giving shares to your spouse explains what they pay when they sell. A gift to your children is different, and our guide to gifts to children or charity explains why.
- Shares you inherit from your husband, wife or civil partner. Nothing is taxed when they pass to you, and our guide to inheriting shares from a spouse explains why your cost is the value on the day they died.
- 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. That applies 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 25 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.