Gambler's Ruin Simulator
Probability of reaching a target bankroll before going broke, given a per-bet win probability and a fixed unit bet. Includes expected duration and a multi-session visualization.
Setup
Advertisement
Result
Session trajectories
Each line = one session's bankroll over time. Lines that touch 0 = ruin; lines that reach the target line = success.
The formula this tool uses
The classical gambler's ruin formula gives the probability of reaching target T starting from S when each bet pays b:1 with win-probability p:
If p = 1/(b+1): P(reach T) = S / T
Otherwise: P(reach T) = (1 - r^S) / (1 - r^T), where r = (1-p)/(p·b)
Who uses it
- Educators illustrating the random walk and the surprising danger of small −EV bets over many trials.
- Quants modeling risk of ruin in trading strategies.
- Gamblers confronting the math (most find it sobering).
Limitations
- Assumes flat bets of 1 unit — no martingale or variable sizing.
- Assumes bets are independent — no hot/cold streak memory.
- Assumes infinite time. The simulation caps bets at 2000 to keep runtime fast; sessions that don't terminate in that many bets are counted as neither ruin nor target.
Frequently asked questions
How do I use Gambler's Ruin Simulator step by step without mistakes?
Follow the order given in the usage section: Compute probability of ruin vs target win, expected session length, and visualize the trajectory under repeated flat-bet sessions. The step-by-step part matters less than the unit check that sits inside it. Confirm every unit matches the thing you are actually trying to measure before you press calculate - that single check catches more wrong answers than any other habit, and it costs about ten seconds.
What are the common mistakes when using Gambler's Ruin Simulator?
Most common mistakes come down to four habits: entering 20 when the field expects 0.2 because the field is a percentage; leaving a field blank and accepting the default without checking what it stands for; changing one input and reading a result that was calculated before the change; and quoting the output as an exact figure when the page describes it as a reference estimate. Press calculate again after any edit, and treat the number as a reference point rather than a final answer.
How do I read the result from Gambler's Ruin Simulator?
Read the final figure first, then come back to this section for the conditions behind it: Compute probability of ruin vs target win, expected session length, and visualize the trajectory under repeated flat-bet sessions. Keep two things apart: the number itself, which comes from the values you typed, and the assumptions it depends on, which decide whether that number is meaningful. The page sets out what a higher or lower result means for your case, so check that direction as well as the magnitude.
Can I act on the Gambler's Ruin Simulator result directly?
Treat it as one reference sheet before you decide, rather than as the answer itself: Assumes flat bets of 1 unit — no martingale or variable sizing. Assumes bets are independent — no hot/cold streak memory. Assumes infinite time. The simulation caps bets at 2000 to keep runtime fast; The output describes a magnitude under the conditions you entered. It does not include what it actually costs to act, what might change while you act, or how the other side behaves. Before you commit, compare the result against reality and note which assumptions do not hold where you are.
What inputs does Gambler's Ruin Simulator need?
Gambler's Ruin Simulator takes 6 inputs: Starting bankroll (units)、Target bankroll (units)、Win probability per bet、Payout (b:1 — win b units, lose 1)、Sessions to simulate、Max bets per session. They are listed in the order they feed the calculation, so an earlier value can change a later one. Do not skip a field you do not recognise - work out what it means first, because a silently guessed value produces a number that looks reasonable and is not. Before typing anything, make sure every figure uses the same unit and the same time period.
What should I check before I run Gambler's Ruin Simulator?
Three checks pay for themselves. First, confirm the question you need answered is really inside the scope of this tool rather than a neighbouring one. Second, confirm that the figures you have are drawn from the same source and the same period - mixing monthly and annual numbers, or two different definitions of the same quantity, quietly distorts the result. Third, keep the key inputs written down, so that later you can tell which set of numbers produced a figure you are about to quote.