Real trades are rarely one back and one lay. You scale in, part-close and re-enter. This calculator adds every matched bet on a runner and shows your position if it wins and if it loses, then the single bet that levels the book at the current price.
How it works
Back: wins stake × (odds − 1), loses stake
Lay: loses stake × (odds − 1) if it wins, wins stake if it loses
Level at price p: stake = |if-wins − if-loses| ÷ p
Lay: loses stake × (odds − 1) if it wins, wins stake if it loses
Level at price p: stake = |if-wins − if-loses| ÷ p
Worked example
Back £10 at 5.0 and lay £12.50 at 4.0: if it wins +£40 − £37.50 = +£2.50; if it loses −£10 + £12.50 = +£2.50. The book is already level.
Questions
Does this include other runners?
It models one runner. Bets on other horses in the same race change what happens when this runner loses, so add those separately if you traded more than one.