Bed & Breakfast Rule Calculator

Enter one sale and one repurchase of the same ordinary shares. See the gain or loss before fees on the shares they match.

Loading calculator…

Sale Details

Repurchase Details

How to Interpret the Result

This illustration assumes you were UK resident when you repurchased the shares and that both trades were in taxable accounts. It compares the two share prices before fees and assumes the entered shares are available to match.

For the full disposal, match same-day purchases first. Then work through eligible purchases in the following 30 days, earliest first. Match any shares still outstanding against your Section 104 pool where you have a holding. Include allowable dealing costs in the final calculation. HMRC’s share-matching examples

Worked Example

You sell 200 shares of TSCO at £3.00 per share on 1 June (proceeds: £600). On 20 June, 19 days later, you buy 100 shares at £2.80 each. Assume there were no same-day purchases.

  • Proceeds on 100 matched shares are 100 × £3.00 = £300.
  • Matched purchase cost is 100 × £2.80 = £280.
  • Gain before fees on these shares is £300 − £280 = £20.

There are 100 shares still to match. A further purchase of 40 shares on 25 June could match another 40, leaving 60 to check against later eligible purchases and then the pool.

If selling all 200 shares cost £2, the 100 matched shares take £1 of that fee. A £1 purchase fee on the 100-share repurchase would bring their gain down from £20 to £18. The calculator uses prices before fees.

For a deeper understanding of how this rule fits into the broader CGT framework, read our full guide on the 30-day bed and breakfast rule, including legitimate alternatives like bed-and-ISA and bed-and-spouse strategies.

Tracking an entire portfolio?

Review supported broker files and calculate gains and losses across your taxable ordinary-share accounts.

Upload your CSV free