Bed and Breakfasting Shares: The 30-Day Rule for Capital Gains Tax (2026/27)
Why selling and immediately rebuying the same shares no longer works for realising a Capital Gains Tax loss or gain in 2026/27, and what the 30-day rule actually does.
What "bed and breakfasting" used to achieve
Before anti-avoidance rules closed the loophole, investors could sell shares that had risen in value at the end of one day, using up their Capital Gains Tax annual exempt amount to "lock in" a tax-free gain, and then buy back the identical shares the next morning ("breakfasting") — retaining exactly the same investment position while resetting their cost base for CGT purposes to the higher current price. Alternatively, investors realising a loss could do the same to bank the loss for offsetting against other gains, while keeping their portfolio unchanged.
Capital Gains Tax Calculator
Calculate Capital Gains Tax on property, shares and other assets for 2025/26.
Open Capital Gains Tax calculatorHow the 30-day rule closes this off
Since 1998, HMRC's share matching rules specifically prevent this simple version of the strategy. When you sell shares and then buy back shares in the same company and same class within 30 days, the disposal is matched, for CGT purposes, against the shares you have just repurchased — not against your original, older holding. The matching order works as follows:
- First, against shares bought on the same day as the sale.
- Then, against shares bought in the following 30 days, on a first-in-first-out basis within that window.
- Only after that, against your original pooled holding of older shares (known as the "Section 104 holding").
Because the repurchased shares typically have a cost base very close to the sale price (having been bought back almost immediately), the "gain" or "loss" that actually gets calculated for CGT purposes is often negligible — completely defeating the purpose of the original bed-and-breakfasting strategy.
Worked illustration
Suppose an investor bought 1,000 shares years ago at £2 each (cost £2,000), and the shares are now worth £5 each (£5,000). Without the 30-day rule, selling and immediately rebuying would let the investor realise a £3,000 gain (using their full 2026/27 annual exempt amount) while ending up holding the same 1,000 shares, now with a reset cost base of £5,000.
With the 30-day rule in force, if the investor sells the 1,000 shares at £5 and buys back 1,000 shares at, say, £5.05 within the next few days, the disposal is matched against the newly bought shares:
- Sale proceeds: £5,000 (1,000 × £5)
- Cost of the shares actually matched (the repurchase): 1,000 × £5.05 = £5,050
- Result: a small loss of £50, not the intended £3,000 gain — and the investor still holds the shares, now at a cost base close to the original disposal price, having achieved nothing but transaction costs and a wasted opportunity to use their annual exemption effectively.
The legitimate workaround: bed and ISA
Investors who want to move an investment they wish to keep holding into a more tax-efficient structure can use bed and ISA: sell the shares (realising a genuine gain or loss for CGT purposes, since there is no rebuy of the same, unwrapped shares within 30 days if instead the proceeds go into an ISA), and immediately use the proceeds to buy the same or similar investment inside a Stocks and Shares ISA. This is explicitly permitted, moves future growth into a tax-free wrapper, and does not fall foul of the 30-day matching rule in the way rebuying identical shares in the same unwrapped account does.
Bed & ISA Calculator UK 2026/27 — CGT Cost and Long-Term Benefit
Calculate the CGT cost of selling investments outside an ISA and the long-term tax-free benefit of rebuying inside a Stocks & Shares ISA.
Open Bed & ISA calculatorPractical planning around the £3,000 exemption
With the annual exempt amount reduced to £3,000 in 2026/27, investors managing a portfolio outside tax wrappers need to plan disposals carefully across tax years to make full use of the allowance without falling into a bed-and-breakfasting trap. Spreading disposals across multiple tax years, or using bed and ISA to move holdings into a wrapper over time, are generally more effective strategies than attempting the now largely ineffective same-shares repurchase within 30 days.
Frequently asked questions
What is 'bed and breakfasting' shares?
It is the historic practice of selling shares to realise a capital gain or loss, then buying back the same shares shortly afterwards to retain the same investment position, effectively 'resetting' the cost base for Capital Gains Tax purposes while continuing to hold essentially the same asset.
What is the 30-day rule?
If you sell shares and buy back the same shares (in the same company, of the same class) within 30 days, the disposal is matched against the shares you just bought back, not your original older holding, for Capital Gains Tax purposes. This effectively blocks the tax benefit of simple bed and breakfasting.
Does the 30-day rule stop me from ever realising a loss or gain on shares I still want to hold?
It stops the simplest version of the strategy (sell and rebuy the identical shares within 30 days), but legitimate alternatives exist, such as 'bed and ISA' (selling shares and rebuying an equivalent holding inside an ISA) or having a spouse or civil partner rebuy the shares, which are not caught by the same-shares 30-day matching rule.
Does the 30-day rule apply to shares held in different accounts, like a general investment account versus a pension?
Yes, generally the rule looks at the underlying beneficial ownership of the same shares by the same person, regardless of which account or platform holds them, so simply moving the same shares between two of your own accounts within 30 days does not avoid the rule.
Can my spouse buy back the shares I just sold without triggering the 30-day rule?
Generally, if your spouse or civil partner independently buys shares in the same company shortly after you sell, the 30-day matching rule applies to your own disposals against your own repurchases, not automatically to your spouse's separate purchases, though transactions between spouses have their own specific tax treatment and this area should be approached carefully with regard to the overall intention and structure of the transactions.
What is 'bed and ISA' and how does it avoid the 30-day rule problem?
Bed and ISA means selling shares held outside a tax wrapper and using the proceeds to buy the same or similar shares inside a Stocks and Shares ISA. Because the repurchase is a different beneficial holding structure specifically permitted under ISA rules, and crucially the ISA subscription rules do not treat this as invalidating the original sale for CGT matching purposes in the way selling and buying back the exact same unwrapped shares would.
Does the 30-day rule apply to realising gains, or only losses?
It applies to both. Whether you are trying to realise a loss (to offset other gains) or a gain (to use your annual exempt amount), selling and buying back the same shares within 30 days triggers the same-day and 30-day matching rules, which can produce an unexpected result compared with what you intended.
What happens for CGT purposes if I do buy back within 30 days?
Your disposal is matched first against shares acquired on the same day, then against shares acquired in the following 30 days (in a 'first in, first out' order within that window), and only after that against your original 'Section 104' pooled holding of older shares. This can mean the gain or loss you calculate is based on a completely different cost than you expected.
How much is the annual Capital Gains Tax exempt amount in 2026/27?
The annual exempt amount is £3,000 for individuals in 2026/27, a significantly reduced allowance compared with previous years, which makes managing the timing of share disposals against this smaller allowance more important than before.
Does the 30-day rule apply to different types of investment, like funds versus individual shares?
The matching rules generally apply per specific security — the same share class in the same company, or the same units in the same fund — so selling shares in one company and buying different shares in another company, even in the same sector, is not caught by the 30-day matching rule at all.
Try the calculators
Capital Gains Tax Calculator
Calculate Capital Gains Tax on property, shares and other assets for 2025/26.
Bed & ISA Calculator UK 2026/27 — CGT Cost and Long-Term Benefit
Calculate the CGT cost of selling investments outside an ISA and the long-term tax-free benefit of rebuying inside a Stocks & Shares ISA.
Related reading
Capital Gains Tax Share Matching Rules: Same Day, 30 Day and Section 104 Pool Explained (2026/27)
How HMRC decides which shares you have sold for Capital Gains Tax purposes in 2026/27 — the same-day rule, the 30-day rule, and the Section 104 pool for older holdings.
Bed and Spouse vs Bed and ISA: Using the GBP 3,000 CGT Exemption 2026/27
The CGT annual exempt amount is just GBP 3,000 in 2026/27. Bed and ISA and bed and spouse both reset your gains tax-free. Here is when to use each, with worked numbers.
When to Sell Investments in the UK: Using Your £3,000 CGT Allowance
How to use your £3,000 annual CGT exempt amount to crystallise gains tax-free each year. Bed-and-ISA strategy, spouse transfers, timing with asset sales.