What this calculator measures
Starting with k whole units and an upper target N, every independent round gains one unit with probability p or loses one with probability 1 −p. Reaching 0 or N ends that path permanently. This educational model has no costs, deposits, changing stakes or simultaneous positions.
Finite horizon vs eventual ruin
The first result asks whether zero is reached before the target by the entered round limit. The three states sum to 100% before display rounding. The eventual result removes the round limit, while retaining the upper stopping target. Changing the horizon does not change the eventual formula.
Gambler’s ruin formula
For p ≠0.5, set r =(1 −p)/p. The eventual zero-before-target probability is (r^k −r^N)/(1 −r^N). For p =0.5 it is 1 −k/N. At p =0, eventual ruin is 100%; at p =1 it is zero. The finite-horizon distribution is calculated round by round, keeping both boundaries absorbing.
MIT’s stochastic-processes lecture presents the fair fixed-unit, two-boundary model. Our risk of ruin guide derives the recurrence and explains the assumptions using original examples.
A small example you can verify by hand
Set starting units to 1, target to 3, win probability to 50% and horizon to 2. The model reaches zero with probability 50%, reaches the target with probability 25%, and remains inside with probability 25%. Eventual ruin before target is 66.6667%. The unresolved quarter is not automatically a success or a failure.
Using this for prediction-market research
A 0.80 outcome share paying 1.00 on a win produces a 0.20 gain versus a 0.80 loss before costs. That is not the symmetric payoff used here. Several positions tied to the same event can also violate independence. Do not treat the calculator’s output as the actual probability that a Kalshi, Polymarket or other account will fail.
Use the expected-value calculator to separate a supplied probability from cost and payout. Use the joint-probability calculator when thinking about dependence. Neither tool validates a forecasting edge.
Input and precision limits
Enter 1 to 199 starting units below a target of 2 to 200 units, a probability from 0% to 100%, and 0 to 1,000 rounds. Whole-unit boundaries keep the model explicit. Results use floating-point arithmetic and four-decimal percentage display; extremely small representable probabilities are labeled below 0.0001%. Very extreme probabilities can underflow to zero numerically, which is not evidence of zero real-world risk.