Skip to content
InvestmentCalculator
All calculators

Calculator

The holding you are selling out of

Every share of the same class in the same company is one asset for capital gains tax — a section 104 pool with one average cost — so it does not matter which order you list your purchases in. There is room for 3; if you have more, add the earlier ones together on one line, which is what the pool does to them anyway.

Include the dealing charge and any stamp duty you paid at the time: they are part of the allowable cost.

Leave a row empty if you do not need it. Fund units can be fractional.

That is 2,000 shares at a pooled cost of £10,000.

The trade

You cannot sell more than you hold, so anything larger is treated as selling the lot.

The bid — what a sale would actually get you today, not the mid price on the front of the factsheet.

Charged twice: this is a sale and a purchase. Use your own platform's figure — this page does not hold one, and it will show you a round trip costing nothing until you enter it.

The gap between the sell and buy prices quoted for your holding. On a large listed company it is a few hundredths of a percent; on a small one it can be several percent. Check the two prices on the dealing screen.

Charged on buying, never on selling. Most exchange-traded funds and shares in companies registered outside the UK do not bear it, and ordinary UK shares do. This site does not publish stamp duty rates — look yours up on gov.uk and enter it, because leaving it at zero understates what the round trip costs.

Zero is a same-day bed and ISA, which is the usual way it is done. Change it and watch what happens to the ISA answer, and to the general-account answer beside it.

Your income

The gain is stacked on top of this, so it decides which capital gains rate the gain meets.

Dividends you already receive, from this holding or anywhere else. They are income, not gain, and they sit below gains in the stack.

Capital gains tax is not devolved and neither are the dividend rates, so this changes the income tax shown for context, never the tax on your sale.

What you have already used this tax year

Both of these are annual and neither can be seen from a transaction list, so the page has to be told. Leave them at zero only if they really are zero.

The annual exempt amount is one allowance for the whole tax year across everything you sell. Whatever you have already set against other gains is not available to this sale.

Money paid into any ISA of any kind since 6 April, including regular monthly payments. The repurchase is a fresh subscription and comes out of the same annual limit.

Used only to price what the wrapper saves from here. Inside an ISA these are not taxable and do not go on a tax return.

What your bed and ISA does

What this sale does

Capital gains tax on the sale: £1,183.80

Shares sold from the general account2,000
Proceeds£18,000.00
Gain crystallised£8,000.00
Shares bought back inside the ISA2,000

How your sale was identified

A sale of shares is not a sale of the ones you choose. It is matched against your acquisitions in a fixed statutory order — same day first, then anything of the same class bought back in the 30 days after, then the section 104 pool — and each parcel below carries the rule that produced it. Nothing you buy inside the ISA can appear here.

Every parcel this sale was identified with, in statutory order
RuleSharesAllowable cost
Section 104 poolEverything else is one pooled asset with one pooled cost, and a part disposal takes cost out of it in proportion to the shares sold. TCGA 1992 s.104, and CG51575 for the apportionment.2,000£10,000.00
Proceeds, cost and the gain that falls out of them
Proceeds£18,000.00
Less the dealing charge on the sale£0.00
Net proceeds£18,000.00
Less the allowable cost matched above£10,000.00
Gain£8,000.00
Your section 104 pool, before and after
Stage of the saleSharesPooled cost
Before the sale2,000£10,000.00
Taken out by this sale2,000£10,000.00
After the sale0£0.00

The same trade with the repurchase outside an ISA

Bought back the same day outside a wrapper, the sale is matched against the repurchase instead of against your pool. That is the whole point of the rule: the £8,000.00 gain you meant to crystallise does not crystallise — it comes out as £0.00 instead — and your old pooled cost is left sitting in the shares you now hold, still unrealised.

One trade, two decisions about where the repurchase goes
FigureBought back inside an ISABought back outside
Rules the sale was matched underSection 104 poolSame day
Allowable cost£10,000.00£18,000.00
Gain or loss crystallised£8,000.00£0.00
Capital gains tax£1,183.80£0.00
Shares left in the section 104 pool02,000
Future gains and dividends on the repurchased sharesNot taxableTaxable

The same sale, identified with the repurchase outside a wrapper

The same statutory order, over the same trade — but now the repurchase is held in the same capacity as the shares that were sold, so the rules can reach it. Compare the parcels below with the ones above: that difference, and nothing else, is what the wrapper does here.

Every parcel this sale was identified with, in statutory order
RuleSharesAllowable cost
Same dayShares bought on the same day as the sale are matched first, before any other rule. TCGA 1992 s.105(1)(b). Acquisition of 2026-06-01.2,000£18,000.00
Proceeds, cost and the gain that falls out of them
Proceeds£18,000.00
Less the dealing charge on the sale£0.00
Net proceeds£18,000.00
Less the allowable cost matched above£18,000.00
Gain£0.00

None of this sale was matched against your section 104 pool, so the pool is exactly where it was: same shares, same pooled cost, same unrealised gain or loss sitting inside it.

The tax on what you crystallised

Your income before tax is £50,000.00, which leaves £37,430.00 of taxable income after the personal allowance the income tax engine says applies to it. The gain is stacked on top of that figure — it is not income, and it does not change your income tax.

Exempt amount for 2026/27£3,000.00
Already used by your other disposals this year£0.00
Available to this sale£3,000.00
Used by this sale£3,000.00
Chargeable gain after it£5,000.00
The chargeable gain, band by band
BandGain in this bandRateTax
Basic rate£270.0018.00%£48.60
Higher rate£4,730.0024.00%£1,135.20
Total£5,000.00£1,183.80

The exempt amount is deducted before anything is taxed and it uses up none of your basic-rate band. Nothing has been taken out of the money going into the ISA to pay this tax: it is due after the end of the tax year through self assessment, so if you would fund it out of the proceeds, subscribe that much less.

What the round trip costs you

Dealing charge on the sale£0.00
Dealing charge on the repurchase£0.00
The bid-offer spread — you sell at £9.00 and buy at £9.00£0.00
Stamp duty on the repurchase£0.00
Cost of the round trip£0.00
Capital gains tax on the sale, payable separately£1,183.80

You sold 2,000 shares and bought 2,000 back, so you hold 0 fewer than you did. That difference is the cost above, expressed in shares rather than in money: it is the same cost said twice, not two costs.

You have entered no dealing charge, no spread and no stamp duty, so the figures above are a best case rather than your case. A real round trip has all three: two dealing charges, the gap between the price you sell at and the price you buy at, and — on ordinary UK shares, though not on most exchange-traded funds — stamp duty on the purchase. This site does not publish commercial charges and does not publish stamp duty rates, so it asks you for them rather than inventing them.

Time out of the market is the cost that does not appear in any of these rows. At a same-day repurchase it is close to nothing, which is the practical reason a bed and ISA is done that way.

The repurchase uses your ISA subscription limit

Money going into an ISA is a subscription whether it came from a payslip or from selling something you already owned, so a bed and ISA spends the annual limit like any other payment in.

Subscription limit for 2026/27£20,000
Already subscribed this tax year£0.00
Left for the rest of the tax year£20,000.00
Raised by the sale, after its dealing charge£18,000.00
Subscribed into the ISA£18,000.00

The limit is a limit on what you may pay in, not a target and not a measure of how much room the manoeuvre has: money already inside an ISA stays there and is not counted again. Unused subscription cannot be carried into next year.

What the wrapper is worth from here

The tax above is what the move costs. What it buys is that the same shares, in the same company, now grow and pay out inside a wrapper where neither is taxed: no capital gains tax when you eventually sell, no income tax on the dividends, and nothing to put on a tax return for either.

What might happen laterInside the ISALeft where they were
A further gain of £8,000.00 — the size of the one you have just crystallised — in a later yearNothing to pay£1,183.80
£0.00 of dividends in a year, at the income you enteredNothing to pay

Both figures are this year’s rates applied to money you supplied, not a forecast of anything: there is no growth rate and no term on this page. The gain in the first row is charged with a full annual exempt amount because a disposal in a later tax year has its own — that is the one place on this page where a second full exemption is right rather than a double count. Enter what the holding pays in a year to price the dividend row; at zero there is nothing for the wrapper to save.

Rates and allowances move. Nothing here promises that a wrapper which is tax free today stays tax free, and the exempt amount in particular has moved a long way in recent years — which cuts both ways: a smaller exemption is also what sends people looking for a way to use it before it goes. The two figures above are what today’s rules would charge, no more. The stocks and shares ISA calculator projects a wrapper forward if that is the question you have.

Four things this page does not know

Whether you have other disposals this year

The annual exempt amount is one allowance for the whole tax year across everything you sell, and this page has set £3,000.00 of it against this sale — the statutory £3,000 less whatever you told it you had already used. Tell it nothing and it assumes nothing else has touched the exemption, and the tax shown is too low if something has. Losses brought forward from earlier years are not modelled at all.

What your platform charges, or what the shares cost to buy back

The dealing charge, the spread and the stamp duty rate are yours to supply. This site does not publish commercial charges and does not publish stamp duty rates, so every one of them starts at zero and stays there until you say otherwise. A round trip that appears to cost nothing is the page repeating what it was told.

Anything about the holding beyond one class of share

One company, one class, one pool. Shares of a different class or a different company are a separate pool and a separate calculation; accumulation units, equalisation payments, scrip dividends, rights issues and share splits all change a pooled cost and none of them can be entered here. A transfer to a spouse is not a capacity question either — they are a different person, and the transfer has its own rules.

Whether an ISA is where this money should be

This page prices one manoeuvre. It cannot tell you whether to make it, it does not know what else you might do with a subscription that can only be used once, and it names no platform, because which one you use changes the two figures it asks you for. Information, not advice.

Worked example

Nadia holds 3,000 shares in one company. She paid £24,000.00 for them, they are now worth £5.00 each, and she has gains elsewhere this year that she would like to set a loss against. She sells the lot for £15,000.00 and buys them straight back 5 days later.

Buying back inside an ISA

The shares she buys are held in a different capacity, so nothing identifies her sale with them. It is matched against her section 104 pool, and the whole of the loss is hers this year:

Net proceeds£15,000.00
Allowable cost, out of the pool£24,000.00
Allowable loss£9,000.00
Shares left in the pool afterwards0

Buying back in a general account instead

Same shares, same days, same money. The repurchase now falls in the 30 days after the sale, so the sale is identified with it under TCGA 1992 s.106A(5) rather than with the pool — and matched against shares she has just paid £5.00 each for, the loss she meant to bank is not there:

Net proceeds£15,000.00
Allowable cost, out of the repurchase£15,000.00
Allowable loss£0.00
Shares left in the pool afterwards3,000

£9,000.00 of allowable loss against £0.00, from one difference: where the repurchase went. The loss is not destroyed in the second case — her pool still holds 3,000 shares at £24,000.00, because shares matched under the 30-day rule never enter the pool (s.106A(5ZA)) — but it stays unrealised, and it is not a loss she can set against this year’s gains. That is what the rule is for.

Nadia has entered no dealing charge, no spread and no stamp duty, so this is the arithmetic with the costs of the round trip removed. A real one has all three, and they are the reason the shares she buys back are fewer than the shares she sold.

Methodology and sources

The calculation, in order

  1. Pool the purchases you entered. Every share of one class in one company is a single asset with a single cost — TCGA 1992 s.104 — so it does not matter which order they went in.
  2. Work out what the sale raises, take off its dealing charge, and see how much of that the ISA subscription limit still has room for. What is left buys the shares back, at the offer price, after the buying charge and any stamp duty.
  3. Identify the sale. Shares bought on the same day are matched first, then shares of the same class bought back within the statutory window after it, then the section 104 pool. Shares held inside an ISA are held in another capacity and are matched with none of it.
  4. The allowable cost of the matched parcels comes off the net proceeds. What is left is the gain or the allowable loss, and it is crystallised whether or not you still own the shares.
  5. Deduct the annual exempt amount still available to you, then stack the chargeable gain on top of your taxable income: the part below the basic-rate ceiling for gains is charged at the lower rate and the rest at the higher one.

Rates, allowances and the statutory window

Figure2025/262026/27
Annual exempt amount£3,000£3,000
Basic-rate band for gains (taxable income)£37,700£37,700
Shares and funds — basic / higher18.00% / 24.00%18.00% / 24.00%
ISA subscription limit for the year£20,000£20,000
Identification window after a disposal30 days30 days
Personal allowance£12,570£12,570

Stamp duty is not in that table because this site does not publish stamp duty rates: the verification log covers the figures in the rules files, and stamp duty is not one of them. It is a field on the calculator instead, and gov.uk publishes the rate. Dealing charges and spreads are commercial terms, not rates, and nothing here could publish them either.

Where the figures come from

The rates and allowances in the table above were verified against gov.uk on 12 August 2026. That check covers the published figures this page computes with. It does not verify any result the page produces, and it has not yet been signed off by a person — the verification recorded in the source repository is an automated one. Check anything that matters against gov.uk or with an accountant.

Every calculation runs in your browser. There is no application server and no database, so nothing you type is transmitted or stored. A share link is the exception: it carries your figures in the URL. More on what that means. Information, not advice. The long-form methodology for this calculator sets out the statutory reasoning, every source and the full verification log.

Frequently asked questions

Does the 30-day rule apply to a bed and ISA?

No. The 30-day "bed and breakfast" rule in TCGA 1992 s.106A(5) matches a sale against shares of the same class you acquire in the 30 days after it — but the Individual Savings Account Regulations 1998 (SI 1998/1870) reg 34(2)(a) inserts s.106A(12), which applies the identification rules separately to shares held in an ISA and treats them as held in a capacity other than the one your other shares are held in. Section 106A(3) then forbids identifying a disposal made in one capacity with securities held only in another. So the sale in your general account is matched against your section 104 pool, the gain or loss crystallises in full, and you can buy the shares back inside the ISA the same day.

What is a bed and ISA?

Selling shares or funds held in a general investment account and buying the same investment back inside a stocks and shares ISA. It is two trades rather than a transfer, because an ISA can only be subscribed with cash. The sale is a disposal for capital gains tax, so whatever gain or loss has built up crystallises then and there; the repurchase puts the holding somewhere future gains and dividends are not taxed.

Do I pay capital gains tax on a bed and ISA?

You pay capital gains tax on the sale, exactly as if you had sold and not bought back. The gain is what the sale proceeds come to less the allowable cost of the shares identified with it, and it is charged after the annual exempt amount — £3,000 for 2026/27, shared across every disposal you make in the year. What you do not pay tax on is anything the shares do afterwards, because they are inside the ISA from the moment you buy them back.

Does buying the shares back use up my ISA allowance?

Yes. Money going into an ISA is a subscription whether it came from your salary or from selling something you already owned, so a bed and ISA spends the annual subscription limit — £20,000 for 2026/27 across all your ISAs — like any other payment in. If the sale raises more than your remaining limit, only part of it can go back in this tax year, and the whole gain still crystallised because the sale is what crystallised it.

What does a bed and ISA cost?

Four things, and a calculator that leaves them out flatters the manoeuvre. Two dealing charges, because it is a sale and a purchase; the bid-offer spread, because you sell at one price and buy at a higher one; stamp duty on the repurchase, which ordinary UK shares bear and most exchange-traded funds do not; and the capital gains tax on whatever the sale crystallised. Some platforms charge one dealing fee rather than two for the pair, which is a term of their service rather than a rule, so this page asks you for the charge instead of assuming one.

What happens if I buy the shares back outside an ISA within 30 days?

The sale is identified with that repurchase instead of with your pooled holding, so it is matched against what you have just paid rather than against what you paid years ago — and the gain or loss you meant to crystallise largely disappears. That is what the rule is for: it stops "bed and breakfasting", where somebody sells to use up the annual exempt amount and buys straight back. Shares matched that way never enter the section 104 pool, so your old pooled cost is still sitting in the shares you now hold, and the gain or loss is still unrealised rather than lost.

Can I do the same thing into a pension, or with my spouse?

This calculator models one wrapper, the ISA, because that is the one whose treatment is written into the identification rules themselves by the ISA Regulations. A transfer to a spouse is a different question altogether and not a matter of capacity at all — a spouse is another person, and a transfer between spouses living together is made on a no gain, no loss basis under TCGA 1992 s.58, which this site does not model. Check both against gov.uk or with an accountant rather than assuming the answer here carries across.

Is a bed and ISA worth doing?

That depends on figures this page cannot see, and it is not a question a calculator should answer for you. What it can do is put the two sides in front of you in the same units: the tax the sale crystallises now, plus the dealing charges, the spread and any stamp duty, against the income tax and capital gains tax the wrapper takes off everything the holding does afterwards. This site publishes information, not advice, and it names no platform.