How Is Capital Gains Tax Calculated on Shares and Investments

This guide explains how Capital Gains Tax is calculated on shares and investments including pooling rules, gain calculations, CGT allowances, and tax rates.

Capital Gains Tax on shares and investments is one of the most important parts of the UK tax system for anyone who invests outside ISAs and pensions. Whether you buy individual shares, funds, ETFs, cryptoassets, or other financial instruments you may need to pay Capital Gains Tax when you sell them for a profit. Many people find CGT confusing because it involves several steps such as calculating gains, applying the share matching rules, offsetting losses, and using annual allowances. In my opinion calculating CGT on investments is straightforward once you understand the order HMRC expects you to follow.

This guide explains how Capital Gains Tax works on shares and investments, how to calculate gains step by step, what rules apply to pooled shares and multiple purchases, how losses reduce your tax, what exemptions exist, how to work out your tax rate, and how to report everything correctly so you stay fully compliant.

What Triggers Capital Gains Tax on Shares and Investments

CGT applies when you dispose of an investment. Disposal includes:

  • Selling shares or units

  • Giving shares away except to a spouse

  • Switching funds where the underlying asset changes

  • Transferring shares into someone else’s name

  • Receiving a capital distribution

  • Using shares to buy other assets

It does not apply when:

  • Shares are held in an ISA

  • Shares are held in a pension

  • You transfer shares to your spouse or civil partner

  • Your total gains in the year fall under the annual allowance

  • You sell at a loss

CGT also does not apply to normal dividends or interest because these are covered by income tax rules.

Step 1: Work Out Your Sale Proceeds

The first step is to calculate how much you received when you disposed of the shares.

Sale proceeds include:

  • The money you received

  • The market value if you gifted the shares

  • The market value if you transferred shares to someone other than your spouse

HMRC bases CGT on market value if you give shares away or sell them for less than they are worth.

Step 2: Work Out Your Allowable Costs

You deduct allowable costs from the proceeds to calculate your gain.

Common allowable costs include:

  • The original purchase price

  • Stamp Duty Reserve Tax

  • Brokerage fees when buying

  • Brokerage fees when selling

  • Transfer fees

  • Costs directly related to the purchase or disposal

You cannot deduct:

  • Interest on loans

  • Platform fees

  • Monthly account charges

  • Financial advice fees

  • Management fees for general investment accounts

Allowable costs relate directly to the acquisition or disposal only.

Step 3: Use HMRC’s Share Pooling Rules

If you buy the same shares on multiple dates you cannot choose which shares you sold. HMRC uses share pooling rules to decide which shares are sold first. These rules prevent investors choosing the most tax efficient shares manually.

There are three matching rules and they must be applied in a strict order:

1. Same day rule

Shares sold are matched with shares bought on the same day.

2. 30 day rule (bed and breakfasting rule)

Shares sold are matched with shares bought within the next 30 days.

3. Section 104 holding (the share pool)

Anything not matched by the first two rules is added to a pooled pot where all shares of the same type are averaged.

This means if you buy 100 shares one year at £5 then 100 at £7 then 100 at £10 you do not calculate gains using individual lots unless the same day or 30 day rule applies. Instead you calculate an average cost per share for the entire pool.

Example of pooling

Buy 100 shares at £5 = £500
Buy 100 shares at £7 = £700
Total shares = 200
Total cost = £1,200
Average cost per share = £6

If you sell 50 shares you use the average cost of £6 not the original prices.

In my opinion the share pooling system is one of the most misunderstood parts of CGT but once mastered it makes calculations predictable and fair.

Step 4: Calculate the Gain

The basic formula for a gain is:

Sale proceeds minus allowable costs

For shares in a pooled holding it becomes:

Sale proceeds minus pooled cost of shares sold

Example

Sell 50 shares for £12 each = £600
Pooled cost = 50 × £6 = £300
Gain = £300

You do this calculation for every disposal made in the tax year.

Step 5: Deduct Capital Losses

If you made any losses in the same tax year you can offset them against your gains. This reduces the amount of taxable gain.

Losses can come from:

  • Selling shares at a loss

  • Selling funds at a loss

  • Cryptoasset losses

  • Losses carried forward from previous years

You must claim losses with HMRC within four years of the end of the tax year in which the loss occurred if you want to carry them forward.

Example

Total gains = £8,000
Losses = £3,000
Net gain = £5,000

If the net gain falls below the annual allowance you pay no CGT.

Step 6: Apply the Annual Capital Gains Tax Allowance

Every individual has an annual CGT allowance. For the 2024 to 2025 tax year the allowance is £3,000.

This means the first £3,000 of gains in the year are tax free. If your total net gains after losses fall under £3,000 you owe no CGT but you may still need to report gains if you exceeded the annual proceeds reporting threshold.

Example

Gains after losses = £5,000
Annual allowance = £3,000
Taxable gain = £2,000

Step 7: Work Out Your Tax Rate

You pay CGT on shares and investments at:

  • 10 percent if your total taxable income keeps you in the basic rate band

  • 20 percent if part of the gain pushes you into the higher or additional rate band

These rates apply to shares, funds, ETFs, crypto, corporate bonds, and most investment assets outside property.

Combined income and gains test

Your CGT rate depends on your income for the year. HMRC checks whether adding your gains to your income pushes you into a higher tax band.

Example

Income: £40,000
Taxable gain: £5,000
Income plus gain = £45,000
Still a basic rate taxpayer
CGT due at 10 percent = £500

Another example
Income: £48,000
Taxable gain: £10,000
Combined total = £58,000
Amount within basic band = £2,270
Amount above = £7,730
CGT = £2,270 × 10 percent plus £7,730 × 20 percent

Step 8: Pay the Tax and Report It Correctly

You must report the gain to HMRC if:

  • Your taxable gains exceed the allowance
    or

  • Your total disposal proceeds exceed £50,000 in a tax year
    or

  • You need to register for Self Assessment for other reasons

You report gains through:

  • The Self Assessment tax return
    or

  • The HMRC real time Capital Gains Tax reporting service

Tax is usually payable by 31 January following the end of the tax year.

How CGT Works for Specific Types of Investments

Shares

All shares held outside pensions and ISAs follow standard CGT rules with pooling.

Unit trusts and OEICs

These are treated similarly to shares. Switching between funds can trigger a disposal.

ETFs

Most ETFs are treated like shares for CGT. Some reporting and non reporting offshore funds have different rules.

Investment trusts

These are treated the same as shares.

Cryptocurrency

Cryptoassets are treated as shares for CGT and follow the same pooling rules.

Corporate bonds and gilts

Some qualifying corporate bonds are exempt from CGT.

Spread betting

Spread betting is exempt from CGT because it is treated as gambling not investment.

Shares in an ISA

Always exempt.

Special Situations You Need to Know

1. Bed and breakfasting

You cannot sell shares and buy them back the next day to realise a loss or gain. The 30 day rule applies meaning the new purchase is matched with the sale.

2. Gifting shares to a spouse

No CGT applies and the cost base transfers to them.

3. Gifting shares to children

CGT may apply because gifting is treated as disposal at market value.

4. Share reorganisations

Mergers, stock splits, and corporate actions can change your cost basis but they are often CGT neutral.

5. Capital distributions

Some returns from investments count as capital not income and must be added to your cost pool.

Real UK Examples

Example 1: Basic calculation

Buy 200 shares at £5
Sell 200 shares at £9
Gain = 200 × £4 = £800
Below allowance so no CGT.

Example 2: Using the pool

Buy 100 shares at £4
Buy 100 shares at £6
Sell 100 shares at £10
Pool cost: £1,000 for 200 shares = £5
Gain = £10 minus £5 = £5 × 100 = £500

Example 3: Higher rate taxpayer

Income: £70,000
Gain after allowance: £10,000
CGT at 20 percent = £2,000

Example 4: Using losses

Gains: £12,000
Losses: £5,000
Net gain = £7,000
After allowance = £4,000 taxable
At 10 percent = £400 for basic rate taxpayer

Example 5: Crypto sale

Buy crypto at £2,000
Buy more at £3,000
Sell all for £9,000
Gain = £9,000 minus £5,000 = £4,000
Tax after allowance = £1,000

Final Thoughts

Capital Gains Tax on shares and investments is calculated by matching disposals correctly, applying the pooled cost method, deducting allowable costs, offsetting losses, using the annual allowance, and applying the correct CGT rate based on your income. Once you understand the order HMRC expects you to follow CGT becomes far clearer.

In my opinion the biggest mistakes investors make are failing to keep proper purchase records, misunderstanding the pooling rules, ignoring the 30 day rule, or forgetting to claim allowable losses. With good record keeping and a clear understanding of the process you can calculate CGT accurately and avoid paying more tax than necessary.