Gambler's Ruin Calculator (Chance of Reaching Your Goal Before Going Broke)
The chance of reaching a target stake before losing everything, and how long it takes, when you bet one unit at a time at fixed odds.
Results
The dashed line marks the value you entered.
What this tool does
The gambler's ruin is a random walk between two walls: broke at 0 and the goal at N. In a fair game the chance of reaching the goal is simply what you start with divided by the goal — 20 of 40 gives 50 %. Any small edge against you changes that a lot: at 48.65 % per bet, the winning chance of an even-money roulette bet, starting with 20 units to reach 40 gives only about 25 %. The longer the game and the larger the goal, the more certain the ruin, which is why a casino with a small edge always wins in the long run. It assumes independent bets, equal stakes and no limit on the table.
Formula
fair: P = i ÷ N · otherwise P = (1 − rⁱ) ÷ (1 − rᴺ), r = q ÷ p · expected bets = i ÷ (q − p) − N ÷ (q − p) × P (fair: i(N − i))
Variables
| Symbol | Meaning | Unit |
|---|---|---|
pp | Chance of winning each bet | % |
i0 | Starting stake (in units of one bet) | — |
nn | Goal (in units of one bet) | — |
PW | Chance of reaching the goal first | % |
PR | Chance of going broke first | % |
EB | Expected number of bets before it ends | — |
EV | Average result per bet (units, even-money bet) | — |
Worked example
- Chance of winning each bet48.65 %
- Starting stake (in units of one bet)20
- Goal (in units of one bet)40
- Chance of reaching the goal first25.35 %
- Chance of going broke first74.65 %
- Expected number of bets before it ends365.2
- Average result per bet (units, even-money bet)-0.0270
Limitations
- This is an informational calculator, not personalised financial advice. Rates, fees, taxes and contract conditions vary between institutions and countries.
- The default values are typical reference figures, not measurements of your situation. Replace them with your own data whenever you have it.