Bed and Breakfast CGT Rule Explained: The 30-Day Trap
The bed and breakfasting CGT rule blocks same-asset repurchases within 30 days. Learn how the share matching rules work and how to use your 2026/27 allowance legally.
Quick answer
The bed and breakfast CGT rule says that if you sell shares and buy back the same shares in the same company within 30 days, the disposal is matched against that repurchase rather than your existing pooled holding. That cancels the tax effect you were trying to engineer. To crystallise a gain or loss and keep exposure, wait more than 30 days, rebuy inside an ISA, switch to a different fund, or let a spouse buy.
Why the rule exists
Before 1998 a popular tactic was to sell shares late in the day and buy them straight back the next morning. The investor barely changed their position but reset their base cost, often to use an annual exemption or to create a loss. Because the sale happened "overnight" before being undone at "breakfast", it became known as bed and breakfasting.
HMRC closed this down with a specific ordering in the share identification, or matching, rules. The rule is not a penalty. It simply changes which acquisition your sale is paired with, which usually removes the benefit you were chasing.
How the share matching rules work
When you dispose of shares of the same class in the same company, the disposal is matched against acquisitions in a fixed order:
| Priority | Match against | Window |
|---|---|---|
| 1 | Shares bought on the same day | Same day |
| 2 | Shares bought in the next 30 days | Day 1 to day 30 after sale |
| 3 | The section 104 pool | Everything else, averaged |
The middle row is the bed and breakfast rule. Only if a sale is not matched by same-day or 30-day acquisitions does it fall into the pool, where all your holdings sit at an averaged base cost. This ordering applies per person, per capacity, and per class of share.
A worked example
Suppose you hold 1,000 shares in a company in your pool with an average cost of GBP 4 each, so a base cost of GBP 4,000. They are now worth GBP 7 each. You sell all 1,000 for GBP 7,000, hoping to crystallise a GBP 3,000 gain that exactly uses your 2026/27 annual exempt amount.
If you do nothing else, the sale matches your pool, the GBP 3,000 gain is covered by the exemption, and you owe no CGT. Future growth then sits on a fresh higher base cost in any new holding.
But if you buy 1,000 of the same shares back five days later for GBP 7,100, the disposal is matched against that repurchase under the 30-day rule. Your gain is recalculated as GBP 7,000 minus GBP 7,100, a loss of GBP 100, and your planned use of the exemption disappears. The pool is left untouched at GBP 4,000.
That is the trap. You meant to bank a tax-free GBP 3,000 gain and uplift your base cost; instead the rule undid it.
Using your annual exempt amount the right way
The annual exempt amount for 2026/27 is GBP 3,000 per person and cannot be carried forward. If you do not use it in the tax year, it is lost. Crystallising gains up to this amount each year is a sound way to reduce future tax, provided you do not breach the 30-day rule.
Run the figures before you sell. Only the gain above GBP 3,000 is taxable, and the rate is 18% if it falls within your remaining basic-rate band or 24% above it. The split depends on your income for the year, so model it.
Capital Gains Tax Calculator
Calculate Capital Gains Tax on property, shares and other assets for 2025/26.
Open Capital Gains Tax calculatorFour legitimate alternatives
You can crystallise a gain and stay invested without falling foul of the rule. Each keeps you in the market while resetting your tax position.
1. Wait more than 30 days
The simplest route. Sell, then repurchase on day 31 or later. The risk is market movement during the gap; the price may rise and you buy back higher, or fall and you gain. This works best where you are comfortable being out of the market briefly.
2. Bed and ISA
Sell in your taxable account and immediately rebuy the same shares inside your stocks and shares ISA. The ISA is a separate wrapper, so the repurchase is a new acquisition and your sale matches the pool normally. You crystallise the gain, use your GBP 3,000 exemption, and future growth is tax-free. The 2026/27 ISA allowance is GBP 20,000.
ISA Calculator
Project ISA savings growth over time with the UK £20,000 annual allowance.
Open ISA calculator3. Switch to a different fund
The rule only catches the same asset. Selling one index tracker and buying a genuinely different tracker - a different provider following a comparable index - is not a repurchase of the same shares. Many investors stay broadly invested this way while resetting base cost. Make sure the funds are genuinely distinct, not the same fund in a different share class.
4. Bed and spousing
A spouse or civil partner buys the same shares within the window. The 30-day rule only catches the same person, so this is outside it. Transfers between spouses are on a no gain, no loss basis, so the household keeps the position. Keep it genuine: the spouse should really own and fund the purchase.
Bed and ISA shelters all future growth and income but uses ISA allowance. Bed and spousing keeps the holding in a taxable account but doubles the household exemption to two times GBP 3,000. Waiting 30 days costs nothing in allowances but exposes you to price moves while out of the market.
What the rule does not cover
The rule is narrow by design. It does not apply when:
- A different person buys, such as a spouse or an adult child acting independently.
- You buy a genuinely different asset, including a different company or a distinct fund.
- The repurchase is inside a different tax wrapper, such as an ISA or pension.
- More than 30 days separate the sale and the repurchase.
It is also per capacity. Shares you hold personally are not the same as shares held as a trustee, so a repurchase in a different legal capacity is not caught. As always with anti-avoidance, do not rely on artificial arrangements that lack real substance.
Funds, ETFs and crypto
The same matching and 30-day rules apply to units in OEICs, unit trusts and exchange-traded funds, as long as you rebuy the same fund. Switching between genuinely different but similar trackers is a common way to crystallise gains while staying invested.
HMRC also applies a share-style pooling approach with same-day and 30-day matching to cryptoassets of the same type. Selling a token and rebuying it within 30 days matches the disposal against the repurchase, just as with shares. Crypto guidance evolves, so confirm the current HMRC position before acting.
Record keeping
Good records make matching straightforward and protect you if HMRC asks questions. For each transaction keep:
- The date and number of shares or units.
- The price and any dealing charges.
- The wrapper used, such as a general account, ISA or pension.
- Any spouse transfers, with dates and amounts.
Without clear records it is easy to miscount the 30-day window or misapply the pool, which can turn an intended gain into an accidental matched repurchase.
Putting it together
The bed and breakfast rule is not something to fear; it is something to plan around. The goal is usually to use your GBP 3,000 annual exempt amount each year and lift your base cost so future disposals attract less tax. The rule only stops the laziest version, selling and rebuying the same shares overnight in the same account.
Choose the route that fits you: a bed and ISA if you have allowance free, bed and spousing to use two exemptions, a fund switch to stay invested, or simply waiting 31 days. Whichever you pick, model the gain first so you know how much falls in the 18% band and how much in the 24% band, and confirm any crypto or fund detail against current HMRC guidance.
Frequently asked questions
What is the bed and breakfast rule for CGT?
The bed and breakfast rule is an anti-avoidance measure in the UK capital gains tax matching rules. If you sell shares and buy back the same shares in the same company within 30 days, the sale is matched against the repurchase rather than your pooled holding. This blocks the old trick of selling overnight purely to crystallise a gain or loss, then buying back the next morning. It applies to the same person, in the same capacity, holding the same class of share.
How long must I wait before buying back shares?
You must wait more than 30 calendar days after the sale before repurchasing the identical shares if you want the sale matched against your existing pool rather than the new purchase. Day one is the day after disposal. If you repurchase on day 31 or later, the standard pool matching applies and you keep the gain or loss you crystallised. Buying back inside the 30-day window triggers the bed and breakfast matching.
Does the 30-day rule apply to my spouse buying the shares?
No. The 30-day rule only catches a repurchase by the same person acting in the same capacity. A common legitimate alternative is bed and spousing, where your spouse or civil partner buys the same shares within the window. Transfers between spouses are on a no gain, no loss basis, so the household keeps exposure while you crystallise the gain. Be aware HMRC can scrutinise artificial arrangements, so the spouse should genuinely own the shares.
Can I still crystallise a gain using my annual exempt amount?
Yes, but you must do it without breaching the 30-day rule if you want to keep your holding. You can sell enough shares to use your 2026/27 annual exempt amount of GBP 3,000, then either wait more than 30 days to buy back, repurchase inside an ISA, or have a spouse buy them. The point is to bank tax-free gains each year so future disposals face less tax.
Does bed and ISA avoid the 30-day rule?
Yes. Bed and ISA means selling shares in a taxable account and immediately rebuying them inside your stocks and shares ISA. Because the ISA is a separate legal wrapper, the repurchase is treated as a new acquisition and the sale is matched normally against your pool. You crystallise the gain in the taxable account, use your annual exempt amount, and future growth is sheltered. The 2026/27 ISA allowance is GBP 20,000.
What CGT rates apply if I crystallise a gain in 2026/27?
For most assets the rate is 18% if the gain falls within your remaining basic-rate band and 24% above it. Only the gain above your annual exempt amount of GBP 3,000 is taxable. The rate depends on your total taxable income plus gains, so a basic-rate taxpayer can pay 18% up to the basic-rate threshold and 24% on the rest. Use a calculator to model the split before you sell.
Do the share matching rules apply to funds and ETFs?
Yes. The same matching rules and the 30-day bed and breakfast rule apply to units in collective funds, OEICs, and exchange-traded funds, provided you buy back the same fund. Switching to a genuinely different fund, even one tracking a similar index, is not caught because it is a different asset. Many investors crystallise gains by switching between comparable but distinct trackers to stay invested.
What happens if I accidentally buy back within 30 days?
If you repurchase inside the window, the disposal is matched against that repurchase rather than your pool. This can reduce or eliminate the gain or loss you intended to crystallise, and the new shares carry the old base cost forward. It does not create a penalty, but it can frustrate your tax planning. If the repurchase was smaller than the sale, only part is matched and the remainder follows the normal pool rules.
Does the rule apply to crypto and other assets?
Yes, broadly. HMRC applies share-style pooling and a 30-day same-day and bed and breakfast matching framework to cryptoassets of the same type. Selling a token and rebuying it within 30 days matches the disposal against the repurchase. The mechanism mirrors shares, so the same planning considerations apply. Because crypto rules can change, always confirm the current HMRC guidance before acting.
Should I use a calculator before crystallising a gain?
Yes. Before any disposal you should model the gain, your remaining basic-rate band, and whether the 18% or 24% rate applies. A calculator helps you decide how many shares to sell to use the GBP 3,000 annual exempt amount without tipping into a higher rate. It also helps you compare keeping the gain versus a bed and ISA or bed and spousing approach across the household.
Try the calculators
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.
Vesting Schedules for Employee Share Options: Tax and Timing in the UK 2026
How vesting schedules work for UK employee share options in 2026: EMI, CSOP, unapproved options, RSUs and growth shares -- when tax arises and how to plan exercise timing.
Capital Loss Harvesting: How to Use Capital Losses to Reduce Your CGT Bill 2026/27
Capital losses must be reported and used against gains in the same year or carried forward. Bed-and-ISA and Bed-and-SIPP also avoid crystallising gains.