The CGT 30-Day Rule (Bed & Breakfast Rule) Explained
The CGT 30-day rule prevents investors from selling and immediately repurchasing the same shares to crystallise a gain or loss for tax purposes. This guide explains how it works, when it applies, and the legal ways to plan around it, including the ISA exception.
Last updated for the 2026/27 tax year.
What is the 30-day rule?
The 30-day rule (formally Section 106A TCGA 1992, often called the "bed and breakfast rule") is a share-matching anti-avoidance measure. If you sell shares and then buy the same shares within 30 days after the sale, the sale is matched against the new purchase, not the existing pool. You cannot pick the pool average cost — the cost of the new shares is used instead.
The rule closes a specific technique: selling shares to crystallise a gain up to your AEA (£3,000 for 2026/27), or to create a loss to offset other gains, then buying straight back as if nothing changed economically.
Without it, you could "bed and breakfast" shares every year — sell on 4 April, rebuy on 6 April, reset the cost base and bank the exempt amount tax-free each time.
The matching order: how HMRC identifies which shares are sold
HMRC applies matching rules to identify which shares are being sold (and therefore what the acquisition cost is). The order is:
- Same-day rule, shares acquired on the same day as the disposal are matched first
- 30-day rule, shares acquired within the 30 days following the disposal are matched next
- Section 104 pool, all other shares of the same type are matched using the averaged pool cost
The 30-day rule applies to shares acquired after the sale, not before. Buying before the sale only triggers the same-day rule if it's the same day. Both rules apply to shares of the same type in the same company or fund. Different shares in different companies are not affected.
Worked example: the 30-day rule in action
Alice has 2,000 shares in a fund with an S104 pool average cost of £5.00 per share (total pool cost £10,000). The shares are now worth £3.00 each. She has a £4,000 gain elsewhere and wants to crystallise a matching loss from the fund.
She sells 1,000 shares at £3.00 on 1 March (proceeds £3,000). The intended loss is £3,000 − £5,000 = −£2,000. She plans to repurchase 1,000 shares at £3.00 on 3 March.
But the 30-day rule catches her. The 1 March sale is matched against the 3 March purchase. The gain/loss uses the 3 March cost (£3.00), not the pool average (£5.00). Sale price = £3.00, matched cost = £3.00. No gain, no loss. The loss is wiped out.
To genuinely crystallise the loss, Alice must wait 31 days before repurchasing, or use one of the alternatives below.
How to plan around the 30-day rule
- Wait 31 days, sell and wait more than 30 calendar days before repurchasing. This avoids the rule entirely, though you bear market risk during the gap.
- Rebuy inside an ISA, the 30-day rule only applies to repurchases of the same shares in the same account. Repurchasing the same shares inside a Stocks and Shares ISA is not caught by the rule (confirmed by HMRC at CG42562). The sale and ISA repurchase can happen the same day.
- Buy a correlated substitute fund, sell your fund and buy a similar (but legally different) fund for the interim period. For example, sell a FTSE All World ETF from one provider and buy an equivalent from a different provider. This maintains market exposure without triggering the 30-day rule, because they are different shares. After 31 days, you can switch back if you want the original fund.
- Gift to spouse, then sale, transfer to a spouse at no-gain/no-loss, let them sell (outside the 30-day period of your own sale). This is more complex but can be useful in specific circumstances.
The ISA route is by far the simplest. And it has the extra benefit of permanently sheltering the investment from future CGT, not just resetting the cost base.
The 30-day rule and the annual exempt amount strategy
Many investors use the annual exempt amount (£3,000 for 2026/27) to crystallise gains each year through bed-and-ISA. You sell investments in your GIA with up to £3,000 of unrealised gain, use the AEA to shelter it, and immediately rebuy inside the ISA. No CGT.
This is entirely legitimate. The repurchase is inside the ISA, so the 30-day rule does not apply. Year by year, you shift holdings from a taxable environment to a CGT-free one.
For loss crystallisation — selling a loss-making holding to offset gains elsewhere — the ISA route works the same way. Sell at a loss, rebuy inside the ISA. The 30-day rule is not triggered.
Does the 30-day rule apply to crypto?
Yes. HMRC applies the same matching rules (same-day, 30-day, S104 pool) to cryptocurrency as it does to shares. Sell Bitcoin and rebuy within 30 days, and the sale is matched against the new purchase, not the pool.
But unlike shares, you cannot rebuy crypto inside an ISA. ISAs do not hold crypto. Your only options to avoid the 30-day rule are: wait 31+ days before rebuying, or switch to a correlated but different asset for the interim period.
Calculate the CGT impact before you sell
Use our calculator to see exactly how much CGT arises from a disposal, taking into account the AEA and your income.
Open the CGT calculatorFrequently asked questions
What is the CGT 30-day rule?
If you sell shares and repurchase the same shares within 30 days, the sale is matched against the new purchase (not the pool average cost). This prevents using the pool cost to manufacture a specific gain or loss for tax purposes.
Does the 30-day rule apply to ISA repurchases?
No. Repurchasing inside an ISA is not caught by the 30-day rule. You can sell shares in a GIA and immediately rebuy inside an ISA on the same day without triggering the rule. HMRC confirmed this at CG42562 in the Capital Gains manual.
Does the rule apply if I buy shares before I sell?
The 30-day rule applies to purchases after the sale. The same-day rule covers purchases on the same day. Purchases before the sale (by more than one day) go into the pool normally.
Does the 30-day rule apply to crypto?
Yes. HMRC applies the same matching rules to cryptocurrency. Selling and rebuying the same crypto within 30 days is matched against the new purchase.
This page is for general information only and is not financial or tax advice. Always consult a qualified tax adviser before implementing CGT planning strategies.