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.

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:
- first with shares acquired on the same day as the disposal
- 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”
- 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:
| Share of the proceeds (500 ÷ 4,000 × £6,000) | £750 |
|---|---|
| Cost of the 500 shares bought on 11 September 2025 | minus (£850) |
| Loss on these 500 shares | minus (£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.
- 01Capital losses: what counts as an allowable loss2026/27When you sell or give away an asset for less than it cost you, you may have a capital loss. It only reduces your tax once it is an "allowable loss" — which depends on the asset and on telling HMRC in time.
- 03How capital losses are set against gains — and the annual exempt amount2026/27This year’s losses are used up in full first, even if that wastes your tax-free allowance. Losses brought forward from earlier years are only used to bring your gains down to the annual exempt amount — the rest carries on.
- 05Shares that have become worthless: negligible value claims2026/27If shares (or other assets) you still own have become worth next to nothing, a negligible value claim lets you be treated as having sold them, creating a capital loss. The claim can be backdated — within limits.
- 02How to claim a capital loss — and the 4-year time limit2026/27A capital loss only counts once you have told HMRC about it, with the amount. Here’s how to do that on your tax return or by letter, and the deadline you must meet.
Sources
Checked 22 November 2026 for the 2026/27 tax year. We read these primary sources for this article:
- HMRC: HS284 Shares and Capital Gains Tax (2026), updated 6 April 2026 (gov.uk)
- 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.


