Selling shares? Here's what you need to know about tax and Self Assessment

    When selling shares is taxed, how much is tax-free, how HMRC decides which shares you sold, and what goes on your tax return.

    Updated 12 November 202610 min readBy the GoSimpleTax team, with worked examples by Grant Sloane

    Partner guide. Written by GoSimpleTax (opens in a new tab), our Self Assessment filing partner, with worked examples from FiscalFox.

    Investing in shares can be a great way to build your wealth, whether you buy individual company stocks, invest in funds, or trade through platforms such as Trading 212, Freetrade, eToro or Vanguard.

    Watching your portfolio grow is the enjoyable part. The part many investors overlook is tax.

    If you've sold shares or investments at a profit, you may need to pay Capital Gains Tax (CGT). You might also have tax to think about on dividends and other investment income.

    So what do you need to know, and when do you need to tell HMRC? We asked the team at GoSimpleTax (opens in a new tab) to explain, and added worked examples of our own.

    The short version for 2026/27

    • You pay tax on the profit, not on the amount you sell for.
    • The first £3,000 of gains in the tax year is tax-free.
    • Gains above that are taxed at 18% or 24%, depending on your income.
    • Losses can reduce your bill, but you generally need to report them to HMRC to use them.
    • If you bought the same shares more than once, HMRC's matching rules decide which shares you sold. Your gain may not be what you expect.
    • Gains above the allowance generally go on a Self Assessment tax return. For 2025/26, it's due by 31 January 2027.

    Do you pay tax when you sell shares?

    Not necessarily. You don't automatically pay tax every time you sell shares. It depends on whether you've made a profit, how much your overall gains are during the tax year, and whether any tax-free allowances or losses apply.

    Capital Gains Tax is charged on the profit you make when you sell or otherwise dispose of an asset that has increased in value.

    For example, if you bought shares for £5,000 and later sold them for £8,000, your gain would be £3,000 before deducting any allowable costs.

    You can usually deduct certain costs of buying and selling shares when you work out your gain, such as stockbroker fees and Stamp Duty Reserve Tax.

    If you hold US shares, as many app investors do, each purchase and sale has to be converted into pounds at the exchange rate on its own date. A shift in the dollar can change your gain even if the share price hasn't moved.

    The key thing to remember: CGT is based on the gain, not the total amount you receive from selling your shares.

    What is the Capital Gains Tax allowance?

    Everyone eligible for the individual annual exempt amount has a tax-free Capital Gains Tax allowance.

    For the 2026/27 tax year (6 April 2026 to 5 April 2027), this allowance is £3,000.

    This means you can make up to £3,000 of overall taxable gains during the tax year without paying CGT. If your gains are higher, tax may be due on the excess, after taking allowable losses and reliefs into account.

    For example:

    • You sell shares and make a gain of £7,000.
    • You deduct your £3,000 annual exempt amount.
    • Your remaining taxable gain is £4,000.

    You may need to pay Capital Gains Tax on the £4,000, depending on your Income Tax position and any other relevant circumstances.

    The allowance applies to your overall gains across relevant assets, not separately to each investment or trading platform. If you sell through two or three different apps, the gains are added together before the £3,000 comes off.

    What are the Capital Gains Tax rates on shares?

    The rate of CGT you pay depends on your taxable income and how much of your basic rate tax band is still available.

    For individuals, the standard Capital Gains Tax rates on shares and most other chargeable assets for disposals from 6 April 2026 are:

    • 18% on gains that fall within your available basic rate tax band.
    • 24% on gains that fall above your basic rate tax band.

    The Autumn Budget on 28 October 2026 left these rates and the £3,000 allowance unchanged for individuals.

    If your income and gains together take you above the basic rate threshold, your gain may be taxed at both rates.

    Here's how that can look. Say you earn a salary of £45,000 and have a taxable gain of £10,000 after your allowance. With the standard £12,570 Personal Allowance, your taxable income is £32,430, which leaves £5,270 of your £37,700 basic rate band unused:

    Part of the gainRateTax
    First £5,270, which fits in the basic rate band18%£948.60
    Remaining £4,73024%£1,135.20
    Total£2,083.80

    This is why it's important to consider your other income, including employment or self-employment earnings, when estimating your potential CGT bill.

    What happens if you make a loss on your shares?

    Not every investment will make a profit. If you've sold shares for less than you paid, you may have made a capital loss.

    Allowable capital losses can be deducted from your capital gains, reducing the amount of CGT you may have to pay.

    For example, if you make a £6,000 gain on one investment but a £2,000 loss on another, your net gain would be £4,000 before applying your annual exempt amount.

    If your losses are greater than your gains, you may be able to carry forward unused losses to offset gains in future tax years.

    Two details are worth knowing:

    • Losses from the same tax year are used first, even if that brings your gains below £3,000. Losses carried forward from earlier years are only used to bring your gains down to the £3,000 allowance, so any extra stays available for later years.
    • You generally need to report losses to HMRC to claim them, within four years of the end of the tax year in which you made the loss. So don't overlook investments that haven't performed as expected. A loss you never reported can't help you later. Our capital losses guide has more.

    Don't forget about dividends

    Capital Gains Tax isn't the only tax investors need to consider.

    If you own shares in a company, you may receive dividend payments. These are treated differently from profits made when selling shares and are subject to Dividend Tax rules.

    For the 2026/27 tax year, the dividend allowance is £500. Dividend income above this amount may be taxable, depending on your Income Tax band.

    Look at your total dividend income across all your investments, rather than treating each shareholding or platform separately.

    Dividends from investments held within a Stocks and Shares ISA are generally tax-free.

    Are shares held in an ISA subject to Capital Gains Tax?

    One of the advantages of investing through a Stocks and Shares ISA is that you don't pay Capital Gains Tax on gains made within the ISA.

    Dividends and interest earned within an ISA are also free from UK tax.

    However, if you hold shares outside an ISA, for example in a General Investment Account, the normal tax rules apply. This means you may need to calculate and report gains, even if you also have investments held in a tax-efficient account.

    So it's important to know which of your investments are held inside your ISA and which are held outside it when working out your tax position.

    How do you calculate Capital Gains Tax on multiple share transactions?

    If you've bought and sold shares regularly, calculating your gains isn't always as simple as taking the original purchase price away from the selling price.

    HMRC has specific share matching rules that decide which shares you've sold when you've bought the same company's shares at different times.

    The rules generally work in this order:

    1. Same-day rule: shares bought on the same day as the sale are matched first.
    2. 30-day rule: shares bought within the 30 days after the sale are matched next.
    3. Section 104 holding: any remaining shares are matched against your pooled holding, which uses the average allowable cost of the shares.

    A worked example: one sale, three possible answers

    Ignoring fees to keep it simple:

    • May 2024: you buy 100 shares at £10 each (£1,000).
    • January 2025: you buy another 100 at £16 each (£1,600).
    • 10 June 2026: you sell 100 shares at £20 each (£2,000).
    • 25 June 2026: you buy 100 back at £18 each (£1,800).

    What's your gain on the June sale?

    Three ways to work out the gain on the June sale, and the one HMRC's rules give
    ApproachCost usedGain
    You assume you sold your first shares£1,000£1,000 (not the figure to report)
    You use your average cost of £13 a share£1,300£700 (not the figure to report)
    HMRC's rules: the 30-day rule applies£1,800£200

    Because you bought the same shares back within 30 days, the sale is matched with that later purchase, not with your pool. The correct gain is £200. Your original 200 shares stay in your pool at £2,600.

    If you had waited more than 30 days to buy back, the sale would have been matched with your pool and the gain would be £700 instead. A single date can change the figure you report.

    This is where things can get complicated for active investors who make several purchases and sales throughout the year, particularly across more than one investment platform.

    You don't have to do it by hand. Our free capital gains calculator reads the transaction history files from platforms including Trading 212, Freetrade, eToro, Vanguard, Hargreaves Lansdown and Interactive Brokers, applies the same-day, 30-day and Section 104 rules for you, and shows the working behind every sale. You can combine several platforms in one calculation and see your gains for the year before you start your return.

    Whichever way you calculate your gains, keeping accurate records of transactions, purchase prices, sale proceeds and fees is essential. Your broker statements and transaction histories give you the information you need to calculate your gains correctly. Most platforms let you download your full history as a spreadsheet.

    Do you need to complete a Self Assessment tax return?

    If you've made taxable capital gains above your annual exempt amount, you will generally need to report them to HMRC.

    You may also need to report gains if you're already registered for Self Assessment and your total proceeds from selling chargeable assets exceed £50,000 during the tax year, even if your gains are below the tax-free allowance.

    Capital gains can be reported through Self Assessment using the Capital Gains Tax pages of the return (form SA108), or in certain circumstances through HMRC's Capital Gains Tax service.

    You may also need to complete a tax return if you have taxable dividend income or other untaxed income that needs to be reported.

    Not sure whether any of this applies to you? Our free reporting check asks a few questions and tells you whether HMRC expects to hear about your gains.

    What actually goes on the return

    You don't type the working for every sale into the return itself. For shares, the capital gains pages ask for totals: the number of sales, your total proceeds, your total allowable costs, and your gains and losses for the year. HMRC also expects a computation showing how you got to those figures.

    So the real work happens before you open your return. Once your totals and your computation are ready, filing them takes minutes.

    Key dates

    WhatWhen
    Register for Self Assessment, if it's your first time5 October after the end of the tax year you need to report
    Online tax return for 2025/2631 January 2027
    Pay any tax owed for 2025/2631 January 2027

    Don't leave your investment tax until the last minute

    Whether you're a first-time investor or regularly buying and selling shares, understanding your tax obligations is an important part of managing your investments.

    Keep track of your transactions throughout the year, check your capital gains and losses, and remember to include dividends and other taxable investment income when you review your overall tax position.

    Getting your records organised early makes calculating your gains and completing your tax return considerably easier. A simple routine looks like this:

    1. Download your history. Export the full transaction history from every platform you used, including any accounts you've since closed.
    2. Work out your gains. Upload those files to FiscalFox to match your sales and get your gains and losses for the year. The report pack gives you the totals for your return and a PDF of the full computation.
    3. File your return. Enter your totals, dividends and other income with GoSimpleTax and submit your Self Assessment to HMRC. If you made too many sales to enter one by one, GoSimpleTax's published guidance describes entering combined totals with a note and attaching a PDF of your detailed calculations. Our guide to using your FiscalFox reports with GoSimpleTax walks through it.

    About GoSimpleTax

    Whether you're self-employed, a sole trader, an investor or have other income outside of PAYE, GoSimpleTax (opens in a new tab) makes completing and filing your Self Assessment tax return with HMRC simple.

    With helpful hints, tax-saving tips and automatic calculations, you can complete your return with confidence, without the hassle of working everything out yourself.

    GoSimpleTaxPartner offer

    Save 15% with GoSimpleTax

    Take control of your tax return and know exactly what you owe. GoSimpleTax is free to try. Sign up to receive your discount code by email, then apply it at checkout.

    Continue to GoSimpleTax (opens in a new tab)

    We earn commission on qualifying purchases made through this link.

    Official UK tax references

    This guide is checked against published GOV.UK and HMRC material. FiscalFox is a calculation tool, not personal tax advice; review unusual transactions with a qualified adviser.

    Ready to work out your gains?

    Upload your broker files and see your figures free. No sign-up or card.

    Calculate free