Not within 30 days. If you buy the same shares back within 30 days of selling, the sale is matched with the new purchase, so the gain or loss you wanted is not realised. Waiting 31 days works but leaves you out of the market. Buying back inside an ISA or pension, or your spouse buying, avoids the rule.
What is the 30-day rule?
When you sell shares, they are matched first with shares of the same class bought the same day, then with shares bought in the next 30 days, and only then with your pool. So a sell-and-rebuy within 30 days compares the sale price with the new purchase price, and almost no gain arises. Our guide to CGT on shares shows the pool.
What works instead?
| Method | How | Note |
|---|---|---|
| Bed and ISA | Sell, then buy the same shares inside your ISA | ISA holdings are outside the 30-day rule; £20,000 limit for 2026 to 2027 |
| Bed and spouse | Sell, and your spouse or civil partner buys | The rule matches only your own purchases |
| Bed and pension (SIPP) | Sell, then buy inside a personal pension | Pension contribution limits apply |
| Wait 31 days | Sell, wait, then buy back | You carry the market risk for a month |
| Similar, not identical | Buy a different fund tracking a similar market | Not the same shares, so no matching |
Want us to put the gain on your tax return?
Your personal tax return is a fixed £69 one-off. We work out the gain, check what you can claim to cut the tax, and show you the figure before anything goes to HMRC. See what’s included.
Get startedA worked example
Ben holds a fund with a £15,000 unrealised gain and earns £60,000. Each year he can realise £3,000 of gain tax-free.
- In late March 2027 he sells enough units to realise exactly £3,000 of gain.
- The same day he buys the same fund in his stocks and shares ISA with the proceeds.
- His gain of £3,000 is covered by the allowance: no CGT, no reporting unless another trigger applies.
- Next tax year he repeats it, and the rest of the gain shrinks each time.
Selling everything at once would have meant £12,000 taxed at 24%: £2,880.
What about losses?
The 30-day rule also stops you realising a loss and buying straight back. The same alternatives work for losses.
Common mistakes
- Buying back in a general account within 30 days, often through an automatic reinvestment.
- Forgetting that an ISA transfer must be a fresh subscription within the yearly limit.
- Assuming a spouse purchase works if the money and shares come straight back to you.
- Treating dividends reinvested within 30 days as unrelated. They are purchases too.
How does the matching work in numbers?
HMRC’s helpsheet HS284 on shares and Capital Gains Tax sets the order: same-day purchases first, then purchases in the next 30 days, then the pool. Say your pool cost is £2 a share. You sell 1,000 shares at £5 on 10 March and buy 1,000 back at £4.80 on 20 March. The sale is matched with the 20 March purchase, so the gain is 1,000 × (£5.00 − £4.80) = £200, not the £3,000 you meant to realise, and the pool keeps its £2 cost.
A stocks and shares ISA is the usual answer because shares inside it are outside CGT. The yearly ISA limit is £20,000 for 2026 to 2027 (GOV.UK).
Common questions
Does the 30-day rule apply to crypto?
Yes, a similar rule applies to cryptoassets.
Does it apply to shares in different share classes?
Matching is for shares of the same class in the same company.
Is bed and ISA allowed by HMRC?
Yes. It is a normal sale followed by an ISA subscription.
Do I report a £3,000 gain?
Not if it is within the allowance and no other trigger, such as over £50,000 of proceeds, applies.
How Wenzo can help
If the gain goes on a Self Assessment return, our personal tax return at £69 one-off covers it: we work out the gain, check which reliefs apply, show you the tax first and file nothing until you approve it. For a simple share sale under the allowance you will not need us.
Article reviewed
Also asked as: “bed and breakfasting shares rule uk”, “sell and rebuy shares to crystallise gain” or “how to use my capital gains allowance on shares every year”.

Need help choosing what’s right for you?
Call or WhatsApp us for a free, no-obligation chat. We’ll explain what we need from you and exactly what it costs.
Call 020 7123 9335