Skip to content
Free CGT calculator

Capital Gains Tax on Shares Calculator

Work out the tax on selling shares, funds or investment trusts.

Quick answer

To calculate Capital Gains Tax on shares, take what you sold them for, deduct what you paid and your dealing costs, then deduct your £3,000 annual exempt amount. The remaining gain is taxed at 18% inside your basic rate band and 24% above it. Shares held in an ISA or pension are exempt, so only shares in a general investment account count.

Key facts

  • Shares, funds and investment trusts held outside an ISA or pension can create a taxable gain.
  • The rates for 2026/27 are 18% and 24%, the same as for property.
  • If you bought at different times, HMRC uses the average pooled cost, not the cost of the specific shares you sold.
  • Dividends are not Capital Gains Tax. They are taxed as income.
  • You must report gains on a tax return if your sale proceeds are over £50,000 and you file Self Assessment.

What this shares calculator does

The calculator works out the gain and tax on a share sale when you already know the cost of the shares you sold. It subtracts dealing costs, applies any losses and your allowance, then uses your income to split the taxable gain between the 18% and 24% rates. It is ideal for a one-off sale of a holding, a fund or investment trust units.

If you bought the same shares on several dates, you first need the pooled average cost. The Section 104 share pool calculator builds the pool and applies the same-day and 30-day matching rules for you. Then come back here, or use the pool result directly.

InputWhat to enterTip
Sale proceedsWhat you received for the sharesUse the contract note value before fees, then add fees under selling costs
What you paidThe cost of the shares you soldFor a pooled holding, use the average cost multiplied by the number sold
Buying costsDealing fees and stamp duty on purchaseStamp duty on UK shares is usually 0.5%
Selling costsDealing fees on the salePlatform custody charges are not included
IncomeYour total taxable income for the yearNeeded to choose the rate
What to enter in the shares calculator.
Infographic: What You Need to Calculate UK Capital Gains Tax on Shares: 5 Figures
Gather these before using a shares calculator

Worked example: a single share sale

You sell shares for £30,000 that cost you £14,000. Dealing fees were £40 when you bought and £80 when you sold. You earn £42,000 a year.

Worked example

Gain on a £30,000 share sale

  • Gain: £30,000 less £80, £14,000 and £40 = £15,880.
  • Allowance: £3,000 comes off, leaving £12,880 taxable.
  • £8,270 is taxed at 18% and £4,610 at 24%.
  • Capital Gains Tax: £2,595.

The result depends on income. On £20,000 the tax would be £2,318, and on £90,000 it would be £3,091. Selling the same shares in two tax years, one before and one after 5 April, would use two allowances. The sell now or wait calculator shows the effect.

Worked example: shares bought at different prices

Suppose you bought 1,000 shares for £10,000 and, later, another 1,000 for £14,000. You now hold 2,000 shares costing £24,000 in total, an average of £12 each. You sell 800 shares for £14,400.

StepWorkingResult
Pooled cost per share£24,000 divided by 2,000£12
Cost of the 800 shares sold800 x £12£9,600
Gain£14,400 less £9,600£4,800
Other gains this yearAlready made£6,000
Taxable gain after allowance(£4,800 + £6,000) less £3,000£7,800
Tax on this saleAt 24% on an income of £55,000£1,152
How pooled cost works for shares bought at different prices.

Notice that the allowance is shared with your other gains. The calculator measures only the extra tax caused by this sale, so the earlier gains use the allowance first.

Infographic: Share Pooling Example: How Average Cost Works for UK Capital Gains Tax
Two purchases, one pool, one part sale

Funds, accumulation units and reinvested dividends

Infographic: ISA, Pension or General Account? How Where You Hold Shares Changes UK Tax
Same gain, very different tax outcome

Funds and investment trusts are taxed like shares. With accumulation units, the income the fund reinvests for you has usually already been taxed as income, so it is added to your cost. That reduces the gain when you sell. Keep the annual statements that show reinvested amounts. Dividends you take as cash are not part of the gain.

Using losses and the allowance

If you sold other assets at a loss in the same tax year, the loss comes off first. Losses brought forward from earlier years only bring your gain down to the allowance, not below it. In the example above, a £5,000 loss brought forward on an income of £90,000 would cut the tax from £3,091 to £1,891. Add these under “More options”. See our guide to capital gains tax losses for the rules.

Small sales can be free of tax. Selling shares for £9,000 that cost £7,000 leaves a gain of £2,000, which is within the allowance, so the tax is £0. Many investors use the allowance every year by selling a little each tax year.

Infographic: Reducing a UK Share Gain Before Tax: Losses First, Then the Annual Allowance
Worked example with no losses

When the 30-day rule changes the cost

If you sell shares and buy the same shares back within 30 days, HMRC matches the sale with the new purchase instead of your earlier cost. This stops “bed and breakfasting” to create a gain or loss for tax purposes. The result can differ sharply from the simple pooled cost, so check the bed and breakfast rule guide if you traded in and out of the same holding.

What this calculator does not cover

  • Shares in a company where you hold 5% or more and may qualify for Business Asset Disposal Relief.
  • Share options, employee schemes and shares you received through work, which can create Income Tax first.
  • Shares bought through Enterprise Investment Scheme or Seed Enterprise Investment Scheme reliefs.
  • Shares of a company that became worthless, where a negligible value claim may apply.
  • Sales made by trustees or personal representatives.

Common mistakes with share gains

  • Using the cost of the last purchase. HMRC uses the pooled average, not a chosen lot.
  • Counting dividends as gains. Dividends belong on the income part of your return.
  • Forgetting reinvested income. It can increase the cost of accumulation units.
  • Ignoring the 30-day rule. Rebuying quickly can change the matched cost.
  • Not reporting a large sale. Total proceeds over £50,000 must be reported if you file Self Assessment, even with no tax due.
  • Leaving the allowance unused. It disappears at the end of the tax year.

What to do next

  1. Run the numbers above, or build the pool with the Section 104 calculator if you bought more than once.
  2. Check whether a loss or the 30-day rule affects the figure.
  3. Read the guide to Capital Gains Tax on shares for ISAs, funds and records.
  4. Report the sale on your tax return or through the real-time service, using our reporting guide.

Frequently asked questions

How is Capital Gains Tax calculated on shares?

Deduct the cost of the shares and your dealing fees from the sale proceeds. Subtract losses and your £3,000 allowance. The remainder is taxed at 18% or 24% depending on your income.

What is the CGT rate on shares for 2026/27?

18% for gains within your basic rate band and 24% above it. The rates are the same for shares, funds and property.

Do I pay Capital Gains Tax on shares in an ISA?

No. Gains inside an ISA are exempt, and you do not report them. The same applies to shares held in a pension. Only shares in a general investment account, or held directly, can create a taxable gain.

Is stamp duty a deductible cost for shares?

Yes. Stamp duty and stamp duty reserve tax you paid when buying shares, plus broker fees, are allowable costs and reduce your gain.

Which cost do I use if I bought shares at different times?

You use the average cost of the whole holding, known as the Section 104 pool, unless the same-day or 30-day rules apply. The Section 104 calculator works this out.

Do I have to report share sales under the allowance?

Not unless you file Self Assessment and your total proceeds from all disposals are over £50,000. In that case you report them even with no tax due.

Can I offset a loss on one share against a gain on another?

Yes. Losses in the same tax year come off your gains first. Earlier losses can be carried forward if you reported them to HMRC within 4 years of the end of the tax year of sale.

What if I gave shares to my spouse before selling?

A transfer to a spouse or civil partner is no gain, no loss, so no tax arises on the gift. They take over your cost, and their own allowance and bands apply when they sell.

Are dividends included in this calculator?

No. Dividends are Income Tax, not Capital Gains Tax. Include them in your total income so the calculator picks the right rate.

How accurate is the shares calculator?

It follows HMRC rules for 2026/27 for a single sale where you know the cost. For multiple purchases, the 30-day rule or complex holdings, use the pool calculator or seek advice.

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.