Checked for the 2026/27 tax year Independent — not affiliated with HMRC or the UK Government
taxloss.co.uk taxloss.co.uk — home

Blog · · 3 min read

Selling shares at a loss before 5 April? The same-day and 30-day rules

Thinking of selling shares to use a loss in 2026 to 2027 and buying them back? HMRC’s share matching rules — same day, then 30 days, then the pool — decide what the loss actually is.

Checked 22 November 2026 for the 2026/27 tax year
Black-and-white view down onto the crowded trading floor of the old London Stock Exchange
The trading floor of the London Stock Exchange in 1955 Photo: Ben Brooksbank, CC BY-SA 2.0

As the tax year end approaches, some investors look at shares standing at a loss and wonder about selling them to “use” the loss against gains — and then buying them back. The matching rules in HMRC’s helpsheet HS284 decide which shares a sale is matched with, and they can change the loss you end up with.

This post explains the rules in general terms. It is not investment or tax advice, and we don’t suggest buying or selling anything.

The three matching rules, in order

HS284 says that when you dispose of shares of the same class in the same company, the disposal is matched:

  1. first with shares acquired on the same day as the disposal
  2. then with shares acquired in the 30 days after the disposal — provided you were UK resident when you acquired them. This is the rule often called “bed and breakfasting”
  3. then with the “Section 104 holding” — the pool of all your other shares in that company, which HS284 says usually represents “the actual cost of shares”

Rule 3 means that, normally, a sale is compared with the average cost of everything in the pool, not with the price of one particular purchase — so you can’t pick your most expensive shares to sell to make the biggest loss.

The effect of rule 2 is that if you sell and buy back within 30 days, the sale is matched with the new shares, not your old, higher-cost ones. The loss you hoped to crystallise against the old cost largely disappears, because the cost you’re comparing with is the new purchase price.

HMRC’s own example

HS284 works through an example. An investor held 9,500 shares, sold 4,000 on 30 August 2025 for £6,000, and bought 500 more on 11 September 2025 for £850. The 500 shares bought within 30 days are matched with 500 of the shares sold:

HS284 example: the 500 shares matched under the 30-day rule
Share of the proceeds (500 ÷ 4,000 × £6,000)£750
Cost of the 500 shares bought on 11 September 2025minus (£850)
Loss on these 500 sharesminus (£100)
The other 3,500 shares sold are matched with the Section 104 holding.

What else HS284 covers

The 2026 helpsheet is for the 2025 to 2026 tax year and also deals with Enterprise Investment Scheme and Venture Capital Trust shares, employee share schemes and gifts of shares to charity. Check the version for the year you are reporting.

Using the loss

A capital loss is set against gains of the same tax year first, then any unused amount can be carried forward. GOV.UK explains that losses from earlier years are only deducted if your gain is still above the tax-free allowance (£3,000 in 2026 to 2027), and only far enough to bring it down to the allowance; the rest carries forward. Our set-off illustrator shows how it works with your own figures, and the capital loss set-off order guide explains the rules.

You must claim a capital loss — on your tax return, or by writing to HMRC if you don’t normally file one. GOV.UK says you have up to 4 years after the end of the tax year of the disposal. For a sale before 5 April 2027, that means by 5 April 2031.

Keep the paperwork

Matching depends on exact dates and numbers, so keep contract notes for every purchase and sale — our post on getting loss records ready has a checklist.

Sources

Checked 22 November 2026 for the 2026/27 tax year. We read these primary sources for this article:

  1. HMRC: HS284 Shares and Capital Gains Tax (2026), updated 6 April 2026 (gov.uk)
  2. GOV.UK: Capital Gains Tax — losses (gov.uk)

Contains public sector information licensed under the Open Government Licence v3.0. This article adapts and summarises that information in our own words. taxloss.co.uk is an independent guide. It is not affiliated with, endorsed by or connected to HM Revenue & Customs (HMRC) or the UK Government. Spotted something out of date? Tell us.