The 30-day rule (section 106A of the Taxation of Chargeable Gains Act 1992) stops "bed and breakfasting": selling shares to realise a loss and buying them straight back. If you buy shares of the same class within 30 days after a sale, the sale is matched with those new shares rather than your section 104 pool, so little or no loss arises and the loss stays built into your holding until a later sale. It applies to shares, fund units and other securities, and HMRC applies it to fungible crypto tokens; it does not apply to property, art or NFTs. Alternatives: buy back after more than 30 days, buy back inside an ISA, let your spouse buy, or buy a similar but different fund.
The mechanic
When you sell shares or fund units, the law decides which of your holdings you sold, in a fixed order (HMRC Capital Gains Manual CG51560):
- Same day: shares of the same class bought on the same day as the sale (section 105).
- Next 30 days: shares of the same class you buy in the 30 days after the sale, earliest first (section 106A(5)). This is the "bed and breakfast" rule.
- The section 104 pool: everything else, at the pool's average cost (section 104).
So if you sell and then buy back the same shares within 30 days, the sale is matched with the shares you bought back, and the gain or loss is worked out against their cost, not the pool's average. A sale and quick re-purchase at a similar price therefore produces little or no gain or loss, and your pool and its original cost are left as they were.
Three details matter:
- The rule only looks forward. Shares bought in the 30 days before the sale go into the pool in the normal way.
- It only matches shares of the same class, held in the same capacity. Shares bought inside an ISA or pension are not matched with a sale outside it (see below).
- It does not apply to shares you buy while you are not resident in the UK (section 106A(5A)).
Traded options can meet the rule in two ways. The first runs through the shares. Buying or writing an option on a share acquires no shares, so on its own it is not matched with an earlier sale of them. But when a written put is assigned, or a bought call is exercised, the shares that arrive are an acquisition, and section 144 of the Taxation of Chargeable Gains Act 1992 treats the option and that purchase as one transaction; inside the 30 days after a sale, the sale is matched with them. Shares called away under a written call are a disposal in the same way, so buying the shares back within 30 days brings the rule in. The second runs through the options themselves. HMRC pools options of the same series (the same share, type, strike and expiry) in a section 104 holding and applies the share identification rules to them (CG55535), so a bought option sold at a loss and the same series bought again within 30 days are matched like shares. Examples 10 to 12 of the options tax worked examples put each case in pounds: a BP call bought back ten days after it was sold at a loss, a Tesco put assigned 15 days after a loss-making share sale, and BP shares bought back a week after being called away.
Worked example
Loss-harvesting attempt blocked by the rule
| You hold 1,000 shares of XYZ plc in your section 104 pool, total cost £10,000 (£10 a share) | £10,000 |
| The price falls to £6. You sell all 1,000, hoping to realise a £4,000 loss | £6,000 proceeds |
| Next day (inside the 30 days), you buy 1,000 XYZ shares back at £6 | £6,000 cost |
| The sale is matched with the shares bought back, not with the pool | |
| Gain or loss on the sale: £6,000 proceeds − £6,000 cost | £0 |
| What you hold now: 1,000 shares with an allowable cost of £10,000 (the original pool cost carries on) | £10,000 |
No loss arises this year. The loss is not lost, though: it is still built into your holding, because the shares you now own carry the original £10,000 cost. If you later sell at £6 without buying back within 30 days, you realise the £4,000 loss then; if the price recovers to £10 and you sell, there is no gain to pay tax on. The rule defers the loss rather than destroying it, but you cannot use it in the year you wanted to.
Three legitimate workarounds
1. Wait more than 30 days
The simplest approach. Sell, then buy back on the 31st day after the sale or later. The sale is then matched with your section 104 pool and the loss is realised. Counting the days carefully is worth it; a few days' margin costs little.
Risk: you are out of the market while you wait. If the price rises, you buy back higher; if it falls, you buy back lower.
2. Bed and ISA
Sell the shares in your general investment account and buy the same shares inside your Stocks and Shares ISA. The ISA regulations treat ISA investments as held in a different capacity from shares you hold directly (Individual Savings Account Regulations 1998, regulation 34), and section 106A only matches shares held in the same capacity, so the 30-day rule does not match the sale with the ISA purchase. The gain or loss on the sale is worked out against your pool in the normal way. The repurchase uses your ISA allowance (£20,000 for 2026/27).
See Bed-and-ISA for the mechanism. Buying back inside a SIPP works in a similar way, because the pension scheme, not you, owns the shares, but contributions have their own limits.
3. Bed and spouse
You sell, and your spouse or civil partner buys the same shares with their own money. The 30-day rule only matches shares bought by the same person, so your sale is matched with your pool and your loss stands. The shares your spouse buys have their own cost.
Two cautions. Transfers between spouses living together are at "no gain, no loss", so if you give your spouse the money to buy, be clear the money and the shares are genuinely theirs. And section 16A of the Taxation of Chargeable Gains Act 1992 denies a loss that arises from arrangements whose main purpose, or one of whose main purposes, is to secure a tax advantage, so take advice before relying on this for large amounts.
The "different but correlated" workaround
Instead of selling and re-buying the same fund, sell Fund A and buy Fund B with similar but not identical exposure. Examples:
- Sell Vanguard FTSE All-World UCITS ETF (VWRL), buy iShares Core MSCI World UCITS ETF (SWDA). Both hold global shares, but they track different indices from different providers (and the MSCI World index leaves out emerging markets).
- Sell Vanguard S&P 500 UCITS ETF (VUSA), buy Invesco S&P 500 UCITS ETF (SPXS).
Units in two different funds from different providers are not shares of the same class, so the 30-day rule does not match one with the other, and the loss on the first fund is realised. Your market exposure stays broadly similar while you wait out the 30 days, or permanently.
HMRC has not published guidance treating two different funds that track the same index as the same holding. The general anti-avoidance rule on losses in section 16A still applies to arrangements made mainly for a tax advantage, so for large amounts take advice.
Same-day rule (the other matching rule)
Separate from the 30-day rule: if you buy and sell shares of the same class on the same day, the sale is matched with that day's purchases first, before the 30-day rule is considered (section 105). It mostly affects people who trade within the day.
How the rule applies to crypto, property and art
- Crypto: HMRC applies the same-day and 30-day rules to fungible tokens such as bitcoin and ether, with a separate section 104 pool for each type of token (Cryptoassets Manual CRYPTO22200). Selling and buying back the same token within 30 days matches the sale with the new tokens. Swapping into a different token is itself a disposal of the first one.
- NFTs: HMRC says non-fungible tokens are separately identifiable, so they are not pooled and no matching rules apply.
- Property, art and collectibles: the matching rules do not apply. Each property or object is a separate asset with its own cost, so a sale is always worked out against the cost of that particular asset.
CGT rates and using losses in 2026/27
For 2026/27 the annual exempt amount is £3,000, and gains on shares above it are taxed at 18% within your unused basic rate band and 24% above it. A loss must be reported to HMRC within 4 years of the end of the tax year in which it arose. Losses in a year are set against gains of the same year first, even if that wastes some of the exempt amount; losses brought forward from earlier years are only used to bring your gains down to the exempt amount.
Sources and methodology
Checked on 3 October 2026.
- Taxation of Chargeable Gains Act 1992: section 104 (the pool), section 105 (same day), section 106A (the 30-day rule, inserted by the Finance Act 1998; capacity and non-residence conditions) and section 16A (losses from tax-motivated arrangements).
- HMRC Capital Gains Manual CG51560: the identification order for individuals (same day, then 30 days, then section 104).
- Traded options: Taxation of Chargeable Gains Act 1992, section 144 (an exercised option and the purchase or sale it leads to are one transaction) and HMRC Capital Gains Manual CG55535 (options of the same series pooled in a section 104 holding, with the share identification rules applied to them; page updated 6 October 2026). Both checked on 10 October 2026.
- HMRC helpsheet HS284: Shares and Capital Gains Tax (2026), including the bed and breakfasting rule.
- Individual Savings Account Regulations 1998, regulation 34: ISA investments treated as held in a separate capacity.
- HMRC Cryptoassets Manual CRYPTO22200: pooling, the same-day and 30-day rules for tokens, and NFTs.
- GOV.UK: CGT rates (18% and 24%), the £3,000 annual exempt amount and reporting losses (within 4 years).
For positions involving complex pooling, derivatives or overseas assets, see the guide to choosing a qualified UK tax adviser. The methodology page explains how we check figures.
Related CGT guides
How UK Tax Drag holds itself to account
Pages are checked against the primary sources listed on each page and reviewed by the Editor; corrections are logged in the changelog. Pages are drafted with the help of AI tools (how AI is used). No affiliate revenue. No sponsored content. No paid placements.
UK Tax Drag is an independent publication by Finsolve Consulting Limited, not affiliated with or endorsed by HMRC, GOV.UK or any government body.