1. Home
  2. Capital gains tax on shares

Capital gains tax on shares: a free calculator

Last updated . Written by Divisio Capital. Figures checked against GOV.UK on 15 November 2026.

In 2026/27 you can make £3,000 of gains before capital gains tax, then pay 18% on gains within your basic rate band and 24% above it. Shares in an ISA or a pension are outside it.

The calculator below works out the gain on one share the way HMRC matches a sale: shares bought the same day, then shares bought in the 30 days after, then the section 104 pool. It is free and needs no account.

HMRC's own calculator can't be used if you sold other shares in the tax year (GOV.UK, Tax when you sell shares: work out your gain). This one takes several buys and sales of one share and matches each sale in HMRC's order: the same day, the next 30 days, then the section 104 pool. Gains on other shares or assets go in as a total. It is an estimate, not a tax return.

Work out the gain on one share

Nothing you type leaves this page. The sums run in your browser: nothing is sent anywhere or saved, and it all clears when you close or reload the page.

Figures: GOV.UK, Capital Gains Tax rates and annual tax-free allowances, Capital Gains Tax rates, Income Tax rates and allowances, Capital Gains Tax: losses and HMRC's HS284 helpsheet and SA110 tax calculation notes. Checked against GOV.UK on 15 November 2026.

In a Divisio account the same matching runs on every holding at once, from the purchases you have recorded or imported; you can see it on the demo's example portfolios without signing up.

The 2026/27 allowance and rates

Capital gains tax for individuals, tax year 2026/27 (6 April 2026 to 5 April 2027)
What2026/27
Annual exempt amount (tax-free allowance)£3,000
Rate on gains within your basic rate Income Tax band18%
Rate on gains above it (and for higher and additional rate taxpayers)24%

Sources: GOV.UK, Capital Gains Tax rates and annual tax-free allowances and Capital Gains Tax: what you pay it on, rates and allowances. The Budget on 28 October 2026 lists the same allowance and rates for 2027/28 (Budget 2026, Annex A: rates and allowances). Checked against GOV.UK on 15 November 2026.

A worked example

You hold 1,000 shares of Company A in a general account: 400 bought for £1,000 and 600 bought later for £2,400. You sell 250 of them for £1,250, and buy none back that day or in the 30 days after, so the sale is matched with the pool.

One sale from a section 104 pool, fees left out
The pool: 1,000 shares costing £1,000 + £2,400£3,400.00
Average cost a share: £3,400 ÷ 1,000£3.40
Proceeds of the 250 sold£1,250.00
Cost of the 250 sold: 250 × £3.40£850.00
Gain£400.00
Left in the pool: 750 shares£2,550.00

With no other gains this tax year, £400 is inside the £3,000 allowance and no tax is due on it. Fees are left out here to keep the sums clear; in practice dealing fees and stamp duty count, and Divisio counts them where your broker's file lists them. The guide to capital gains tax on shares has a longer example with fees and a buy-back within 30 days.

How HMRC matches a sale, and how Divisio follows it

If you bought the same share more than once, the gain depends on which purchases a sale is matched with. HMRC's helpsheet HS284 sets the order, and both the calculator above and Divisio's capital gains page follow it for every sale:

  1. The same day. Shares bought on the day of the sale are matched first.
  2. The next 30 days. Then shares bought in the 30 days after the sale (often called bed and breakfasting), earliest first. Shares matched this way never join the pool.
  3. The section 104 holding. Everything else is matched with the pool: all your other purchases of that share together, at their average cost.

The same-day and 30-day rules guide and the section 104 holding guide work through each rule in pounds.

Source: GOV.UK, HS284 Shares and Capital Gains Tax (2026).

What goes into the figure in a Divisio account

This part is about Divisio's capital gains page in your account, not the free calculator above. The figure it gives for every holding counts:

What the account's figure leaves out

In a Divisio account, a portfolio marked as a Stocks and Shares ISA, a SIPP, a Lifetime ISA or a Junior ISA is left out of the figure. In the free calculator above, leave ISA and pension trades out. GOV.UK lists shares you have put into an ISA among those you do not pay Capital Gains Tax on (Tax when you sell shares). If you hold the same share in an ISA and in a general account, only the general account's purchases and sales are matched. The ISA portfolio tracking page says how each account type is treated.

Both the free calculator and the figure in your account are estimates that show what a sale would cost in tax. Neither is a tax return, and neither covers property, which has its own rules.

Which plan it is on

The calculator on this page is free for anyone, with no account: one share at a time, from what you type. Divisio's capital gains page in your account does every holding at once, from your broker's file, with the tax year's sales matched as you go. The pricing section lists that under Premium, planned at £12.99 a month and not available yet. During the beta every feature is free, the capital gains page included, and no card is asked for.

The guide to capital gains tax on shares goes through the same rules in plain English. If your shares pay income as well, see the dividend tracker; for the rest of what Divisio does, see the UK portfolio tracker page.

Questions people ask

Do I pay capital gains tax on shares in a Stocks and Shares ISA?

No. GOV.UK lists shares you have put into an ISA among the shares you do not pay Capital Gains Tax on (Tax when you sell shares).

What is the capital gains tax allowance for 2026/27?

£3,000 for an individual. Gains above it are taxed at 18% within your basic rate band and 24% above it.

How do I report a gain on shares?

GOV.UK gives two ways: in a Self Assessment tax return for the tax year after the sale, or through HMRC's online service to report and pay Capital Gains Tax, where you report by 31 December in the tax year after the gain and pay by 31 January (Report and pay your Capital Gains Tax).

When do I have to report a gain on shares?

GOV.UK says you report and pay if your taxable gains for the tax year are above your allowance, which is £3,000 for 2025/26 and for 2026/27. If you are registered for Self Assessment, you also report your gains in your tax return when the total you sold the assets for was more than £50,000, even if your gains are under the allowance. That £50,000 limit applies from 2023/24 onwards (Capital Gains Tax: work out if you need to pay).

Did the October 2026 Budget change capital gains tax on shares?

Not the allowance or the rates: the Budget on 28 October 2026 lists £3,000, 18% and 24% for 2027/28, as for 2026/27. It also said Stamp Duty and Stamp Duty Reserve Tax on shares will be replaced by a Securities Transfer Tax from late 2027 (Budget 2026: Overview of tax legislation and rates, paragraph 1.64).

Is the calculator free?

Yes. It needs no account and no sign-up, and it works out one share at a time. Divisio's own capital gains page, which does every holding from your broker's file, is free during the beta.

Is what I type sent anywhere?

No. The calculator runs in your browser: what you type is not sent to Divisio or anyone else, and it is not saved. Reload the page and it is gone.

Is the figure a tax return?

No. It is an estimate from the trades you enter or record, to help you see what a sale would cost before you make it. Your Self Assessment return or HMRC's own service is where a gain is reported.

See your own shares this way

Add what you own, from any broker, in a couple of minutes. Every feature is free during the beta, and no card is asked for. Or look round the demo first: two example portfolios, no sign-up.

For informational purposes only, not financial or tax advice. Tax rules depend on your own circumstances and can change; GOV.UK has the rules in full. Prices from Yahoo Finance, which can be delayed, usually by 15 minutes and on some exchanges by more.