Gambler's Ruin Calculator
Find the chance of losing a stake before reaching a target.
What it does
The gambler's ruin problem asks how likely it is that a bettor loses everything before reaching a chosen target. Each round wins or loses one unit, and play stops at zero or at the target.
This tool computes the ruin probability for both fair and biased games. A fair game uses the simple ratio of distance to the target, while a biased game uses powers of the loss to win ratio.
The result is a classic example of a random walk with absorbing boundaries. It shows why a small disadvantage compounds: with a target ten times the stake, a fair game still ends in ruin nine times out of ten.
The model assumes independent bets of a fixed size and no house limit beyond the target. Real gambling has table limits, credit, and varying stakes, so the output is a teaching result rather than a betting plan.
How to use
- Enter the starting stake in whole units.
- Enter a target larger than the stake.
- Enter the chance of winning a single bet.
- Read the chance of ruin in the main result.
- Check the complementary chance of reaching the target.
- Repeat with a small change in win chance to see its effect.
Formula
- s
- Starting stake in units.
- M
- Target fortune in units.
- p
- Probability of winning one bet.
For a fair game the formula reduces to a straight line in the stake. As the win probability moves away from 50 percent, the loss to win ratio r drives the answer, and even a small bias can push ruin toward certainty for a distant target. The tool requires the target to exceed the stake and the win probability to be strictly between 0 and 100 percent.
Worked example
Example: stake 5, target 10, fair game
A stake of 5 units, target of 10 units and 50 % chance per bet.
- This is a fair game, so use (M - s) / M.
- Difference: 10 - 5 = 5.
- Ruin chance: 5 / 10 = 0.5, or 50.00 %.
- Chance of reaching the target: 100 - 50 = 50.00 %.
- Loss to win ratio is 1.
- Tool shows 50.00 % for each outcome.
Reference table
| Starting stake | Chance of ruin | Chance of target |
|---|---|---|
| 1 | 90.00 % | 10.00 % |
| 3 | 70.00 % | 30.00 % |
| 5 | 50.00 % | 50.00 % |
| 7 | 30.00 % | 70.00 % |
| 9 | 10.00 % | 90.00 % |
Limits
- Assumes fixed unit bets and independent rounds.
- Ignores table limits, credit and changing stakes.
- A fair game against an endless opponent ends in ruin with certainty.
- The formula is a model, not advice about real wagering.
Common mistakes
- Using the fair formula for a biased game.
- Entering a target equal to or below the stake.
- Treating the win chance as a percentage of profit.
- Forgetting that the two outcomes must add to 100 %.
- Reading the result as a prediction for one session.
Try it yourself
Quick checks. Answers sit tucked under each question.
Stake 5, target 10, fair game. Ruin chance?
(10 - 5) / 10 = 50.00 %.
Chance of reaching the target?
50.00 %, the complement of ruin.
What happens to ruin chance as the target grows?
It rises toward certainty in a fair game.
Questions
What is the gambler's ruin problem?
The chance of hitting zero before reaching a target in a unit betting game.
What is the fair game formula?
Ruin chance equals target minus stake, divided by target.
How does bias change it?
It uses powers of the loss to win ratio.
Why does doubling the stake give 50 %?
Because the stake is half the target in that case.
Does this model real casinos?
Only approximately, since real games have limits and rules.
Do the two chances add to 100 %?
Yes, one of the two boundaries is eventually reached.
Sources
- University of Pittsburgh: The Gambler's Ruin
- LibreTexts, Grinstead and Snell: Introduction to Probability, Gambler's Ruin