Gambler's Ruin Calculator
Compute the probability of reaching a target before going broke in a simple gambler's ruin random walk, from your capital and per-bet win chance.
How it works
Fair game (p = ½): P(win) = i ÷ N · Biased: with r = q ÷ p, P(win) = (1 − rⁱ) ÷ (1 − rᴺ) · where i = start, N = target
Gambler's ruin models a random walk between 0 (broke) and N (target): each bet moves you up one unit with probability p or down one with probability q = 1 − p, and the walk stops at either boundary. In a fair game the chance of reaching the target is simply your share of the way there, i ÷ N. Even a small house edge (p just under ½) drags the win probability down steeply as the target grows, which is precisely why betting against a small persistent disadvantage almost always ends in ruin.
Worked example
Start with 10 units, target 20, fair coin (p = 0.5): P(reach 20) = 10 ÷ 20 = 50%. Now shade the odds to p = 0.49: with r = 0.51/0.49 ≈ 1.0408, P(win) = (1 − 1.0408¹⁰) ÷ (1 − 1.0408²⁰) ≈ 40.3% — a 1-point edge against you cuts the chance from 50% to ~40%.
Sources: Gambler's ruin — Wikipedia
Frequently asked questions
Why does a tiny house edge matter so much?
Because the disadvantage compounds over many bets. In the ruin formula the ratio r = q/p is raised to the power of your capital and target, so even p = 0.49 instead of 0.50 makes the win probability fall sharply — and the bigger your target, the worse it gets.
What is the "fair game" reference number?
It is the win probability if the bet were exactly even (p = 0.5), which equals your starting capital divided by the target. Comparing it to your actual probability shows how much the edge helps or hurts you.
Does this assume I bet one unit at a time?
Yes — this is the classic simple random walk with unit bets and fixed win probability each round. Variable bet sizes (like a Martingale) follow different dynamics and are not captured by this formula.
Related calculators
Educational model of a random walk — not gambling advice. A persistent edge against you leads to ruin over time.