Bed and ISA — methodology
Why the share identification rules do not reach a repurchase made inside an ISA, what the sale therefore crystallises, and what the round trip costs.
A bed and ISA is two trades, not a transfer: an ISA can only be subscribed with cash, so the shares are sold in a general account and bought back inside the wrapper. The sale is a disposal for capital gains tax. Everything on this page follows from what that disposal is identified with.
Why the window after a disposal does not reach an ISA repurchase
The rule readers arrive with is TCGA 1992 s.106A(5): shares of the same class acquired in the 30 days after a disposal are identified with that disposal, rather than the disposal being matched against the section 104 pool. It exists to stop “bed and breakfasting” — selling to use up an annual exempt amount, or to bank a loss, and buying straight back — and where it applies it works, because the sale is then matched against what you have just paid rather than against what you paid years ago.
It does not apply to a repurchase inside an ISA, and that is written into the statute rather than inferred from the wrapper being tax free. The Individual Savings Account Regulations 1998 (SI 1998/1870) reg 34(2)(a) inserts a subsection (12) into s.106A itself:
This section and sections 104, 110, 110A and 114 — (a) shall apply separately in relation to any securities which are held by a person as account investments so long as they are so held, and … (c) while applying separately to any such securities, shall have effect as if that person held them in a capacity other than that in which he holds any other securities of the same class whether under another such account or otherwise.
Read with s.106A(3) — “where a person disposes of securities in one capacity, they shall not be identified under those provisions with any securities which he holds, or can dispose of, only in some other capacity” — the shares inside the ISA are held in another capacity, the identification rules run separately over them, and the general account sale cannot be matched with them. It is matched with the section 104 pool in the ordinary way, the gain or loss crystallises in full, and the repurchase may be the same day.
That is why bed and ISA is a live strategy while plain bed and breakfast is dead, and it is the one thing this calculator exists to show rather than assert: it runs the same trade twice, differing only in the capacity of the repurchase, and prints both sets of matching working.
The identification order, and what each step does to the pool
- Same day — s.105(1)(b). Shares acquired on the day of the disposal are matched first, before any other rule.
- The 30 days after the disposal — s.106A(5), earliest acquisition first by s.106A(5)(b). Shares matched this way never enter the section 104 pool (s.106A(5ZA)), which is why a bed and breakfast leaves the old pooled cost exactly where it was and the gain or loss unrealised.
- The section 104 pool — s.104. Everything else is one asset with one quantity and one cost, and a part disposal takes cost out of it in proportion to the shares sold (CG51575).
pooled cost per share = pooled cost ÷ shares in the pool
allowable cost = the cost of every parcel matched, in the order above
net proceeds = proceeds − dealing charge on the sale
gain or loss = net proceeds − allowable costIncidental costs sit on the side of the sum they belong to: a dealing charge on a sale comes off the proceeds (s.38(1)(c)), and a dealing charge or stamp duty on a purchase is added to its cost (s.38(1)(a)). The effect on the gain is the same either way; which side it is shown on is what lets a reader check the working against a contract note.
What the calculator asks for, and what it works out
- The holding, as up to 3 purchases. More than that is not a limitation of the arithmetic: a pool is one asset with one cost, so earlier purchases can be added together on one line and the answer does not change.
- The trade — how many shares, at what price, with what dealing charge, spread and stamp duty, and how many days before the repurchase.
- Your income, because a gain is stacked on taxable income to decide which capital gains rate it meets.
- What you have already used this year — of the annual exempt amount, and of the ISA subscription limit. Neither can be seen from a transaction list.
The number of shares bought back is solved for rather than assumed, because every pound of charge, spread and stamp duty is a pound that does not buy shares:
cash raised = proceeds − dealing charge on the sale
subscribed = min(cash raised, subscription limit still available)
shares back = (subscribed − dealing charge on the purchase)
÷ (buy price × (1 + stamp duty rate))No date is asked for. The rules are written in days, so the engine needs dates, and it takes ISO calendar dates rather than timestamps precisely so that a “same day” answer cannot depend on which time zone the reader is in. But only two things about a reader’s dates can change the answer: which tax year the sale falls in, and how many days pass before the repurchase. Both are asked for directly, and everything else is anchored inside the chosen tax year.
Rates, allowances and the statutory window
| Figure | 2025/26 | 2026/27 |
|---|---|---|
| Annual exempt amount | £3,000 | £3,000 |
| Basic-rate band for gains (taxable income) | £37,700 | £37,700 |
| Shares and funds — basic / higher | 18.00% / 24.00% | 18.00% / 24.00% |
| ISA subscription limit | £20,000 | £20,000 |
| Identification window after a disposal | 30 days | 30 days |
| Personal allowance | £12,570 | £12,570 |
Stamp duty is absent from that table on purpose. The verification log covers the figures in this project’s rules files and stamp duty is not one of them, so the calculator asks you for the rate instead of publishing an unverified one — and shows you a round trip costing nothing until you supply it. Dealing charges and spreads are commercial terms rather than rates, and could not be published here either. Capital gains tax is not devolved: the rates, the exempt amount and the basic-rate band for gains are the same across the UK.
Sources
- gov.uk — Tax when you sell sharesIncluding which shares a sale is matched against.
- gov.uk — Shares and Capital Gains Tax (HS284)The identification rules in full: the same-day rule, the window after a disposal, and the section 104 pool.
- gov.uk — Capital gains tax rates and annual tax-free allowances
- gov.uk — Individual Savings AccountsFor the annual subscription limit the repurchase consumes.
- gov.uk — Tax when you buy sharesThe stamp duty this calculator asks you for rather than assuming. It is not among the figures the verification log covers, so this page does not state a rate.
- legislation.gov.uk — TCGA 1992 s.106AThe identification rules themselves, including subsection (12) as inserted for account investments.
- legislation.gov.uk — The Individual Savings Account Regulations 1998, reg 34Reg 34(2)(a) is what makes shares held in an ISA a separate capacity for s.106A. This is the whole basis of the answer.
- gov.uk — Income tax rates and allowances: current and pastThe personal allowance and the basic-rate band, because a gain is taxed according to the income sitting underneath it.
The rates, thresholds and allowances used by this calculator were verified against gov.uk on . That covers the published rates, thresholds and allowances this page calculates with. It does not verify any figure the page produces for you: that is arithmetic on verified inputs. Parts of the engine behind it are checked against HMRC’s own published worked examples, which tests the method on a small number of scenarios rather than your answer, and most of the test suite derives its expected values by hand. That check was carried out automatically and no named person has signed it off yet.
| Figures covered | Verified on | Verified by | Human sign-off |
|---|---|---|---|
| 2025-26 | 2026-08-12 | Automated verification (Claude Opus 5) | not yet signed off |
| 2026-27 | 2026-08-12 | Automated verification (Claude Opus 5) | not yet signed off |
| 2020-21 to 2024-25 — pension annual allowance only | 2026-08-12 | Automated verification (Claude Opus 5) | not yet signed off |
| 2025-26 and 2026-27 — share identification window only | 2026-08-13 | Automated verification (Claude Opus 5) | not yet signed off |
| 2025-26 and 2026-27 — pension relief at source only | 2026-08-13 | Automated verification (Claude Opus 5) | not yet signed off |
| 2025-26 and 2026-27 — inheritance tax only | 2026-08-13 | Automated verification (Claude Opus 5) | not yet signed off |
| 2025-26 and 2026-27 — family tax, LISA and pension-access additions | 2026-08-13 | Automated verification (Codex) | not yet signed off |
| 2025-26 and 2026-27 — student loan deductions only | 2026-08-18 | Automated verification (Claude Opus 5) | not yet signed off |
| 2025-26 and 2026-27 — property acquisition tax only | 2026-08-18 | Automated verification (Claude Opus 5) | not yet signed off |
| 2025-26 and 2026-27 — automatic enrolment only | 2026-08-18 | Automated verification (Claude Opus 5) | not yet signed off |
| 2025-26 and 2026-27 — State Pension age and rates only | 2026-08-18 | Automated verification (Claude Opus 5) | not yet signed off |
The log covers the rules directory, not only this calculator. 8 rows are deliberately narrow — 2020-21 to 2024-25 — pension annual allowance only; 2025-26 and 2026-27 — share identification window only; 2025-26 and 2026-27 — pension relief at source only; 2025-26 and 2026-27 — inheritance tax only; 2025-26 and 2026-27 — student loan deductions only; 2025-26 and 2026-27 — property acquisition tax only; 2025-26 and 2026-27 — automatic enrolment only; 2025-26 and 2026-27 — State Pension age and rates only — and they verify the figures named there and nothing else. Those tax years are not modelled by any calculator on this site: the years this page can compute are the ones its tax-year selector offers, and no others.
A verification goes stale the moment one of its sources is updated past the date above. If a source below carries a later date than this stamp, trust the source.
Rates, thresholds and allowances on this page are taken from material published by HM Revenue & Customs and the Scottish Government. Contains public sector information licensed under the Open Government Licence v3.0.
Four limits that change the answer, stated here rather than buried
- The annual exempt amount is deducted per calculation. The exemption is annual and shared across every disposal you make, so the calculator asks how much of it other disposals have already used and gives this sale what is left. Tell it nothing and it assumes nothing else has touched it, and the tax shown is too low if something has. Losses brought forward from earlier years are not modelled.
- The two scenarios are alternatives, not two disposals. The page runs the same sale twice — repurchase inside the ISA, repurchase outside it — and charges each with the same exempt amount, which is right because only one of them can happen. They must never be added together, and nothing on the page adds them.
- Costs are yours to supply and start at zero. Dealing charges, the bid-offer spread and the stamp duty rate are not published here, so a round trip that appears to cost nothing is the calculator repeating what it was told.
- One company, one class of share. A different class or a different company is a separate pool and a separate calculation. Accumulation units, equalisation, scrip dividends, rights issues and share splits all change a pooled cost and none of them can be entered. A transfer to a spouse is not a capacity question at all: a spouse is another person, and TCGA 1992 s.58 makes such a transfer a no gain, no loss disposal, which this site does not model.