The Risk Of Ruin Formula

October 12, 2026

Gambling has captured human imaginations for centuries. As the first casino started operations in Italy in 1638, principled bankroll management was already a topic of interest for probability theorists. It is a couple of decades later that the Gambler's ruin problem was stated and even solved. This approach formulated our first attempt to understand the mathematical process leading to a bankroll going up in smoke after a series of bets. In this article, we will explore the mathematical framework and the formula that was extracted from it to model the Risk of Ruin.

The even-money formula

The simplest setup we can consider is even-money bets (stake 1 to win 1) with a win probability of $p$. We consider a bankroll of $B$ units, we bet 1 unit at each round and only stop if the bankroll hits zero. Let $R(B)$ be the probability of ever hitting zero when the bankroll contains $B$ betting stakes. We can express $R(B)$ as an expectation of the risk-of-ruin at the next attainable bankrolls after the next bet, namely $B+1$ and $B-1$:

$$R(B) = p\,R(B+1) + (1-p)\,R(B-1)$$

The boundary conditions are $R(0) = 1$ and, for a positive edge ($p > 0.5$), $R(B) \to 0$ as $B \to \infty$. Assuming a solution of the form $R(B) = x^B$ is equivalent to solving the quadratic $p\,x^2 - x + (1 - p) = 0$. The root $x = (1-p)/p$ is the only one that solves the initial conditions so we find:

$$R(B) = \left( \frac{1-p}{p} \right)^{B}$$

As a summary, we can say that each extra unit of bankroll multiplies the ruin probability by $(1-p)/p$. This holds for $p > 0.5$, where every extra unit of bankroll cuts the risk. When $p \leq 0.5$ (zero or negative edge), ruin is certain whatever the bankroll, i.e. $R(B) = 1$. Mathematically, in that case, the expression above then exceeds 1 and is no longer a probability.

A more general formula

Real bets are not even-money so let's generalise to the case where the financial outcome of the bet noted $x$ has mean $\mu$ and variance $\sigma^2$. By the same next-step reasoning as before, the ruin probability from bankroll $B$ equals its expected value one bet later:

$$R(B) = \mathbb{E}\left[\,R(B + x)\,\right]$$

If we assume that bet's outcome is small relative to the bankroll, we expand the right-hand side to second order (Taylor), discarding the higher-order terms:

$$\mathbb{E}\left[\,R(B + x)\,\right] \approx R(B) + \mathbb{E}[x]\,R'(B) + \tfrac{1}{2}\,\mathbb{E}[x^2]\,R''(B)$$

For the two sides to be equal, the correction terms must cancel and we find the following differential equation:

$$0 = \mu\,R'(B) + \tfrac{\sigma^2}{2}\,R''(B)$$

Note that $\mu^2$ was discarded in the expression: $\mathbb{E}[x^2] = \mu^2 + \sigma^2$. This is assuming that the variance of a bet is much greater than the square of its mean which is nearly systematically the case in practice. If we now assume a solution of the form $R(B) = e^{\lambda B}$, we get the following characteristic equation and its solutions:

$$\tfrac{\sigma^2}{2}\,\lambda^2 + \mu\,\lambda = 0 \quad\Rightarrow\quad \lambda = 0 \;\text{ or }\; \lambda = -\frac{2\mu}{\sigma^2}$$

The $\lambda = 0$ root is the constant solution. The general solution is:

$$R(B) = C_1 + C_2\,e^{-2\mu B/\sigma^2}$$

with the boundary conditions $R(0) = 1$ and, for $\mu > 0$, $R(B) \to 0$ as $B \to \infty$. They force $C_1 = 0$, $C_2 = 1$ which gives:

$$R(B) \approx \exp\left(-\frac{2\mu B}{\sigma^2}\right)$$

Each extra unit of bankroll multiplies the ruin probability by $e^{-2\mu/\sigma^2}$, the continuous relative of the $(1-p)/p$ multiplier from the previous section. As before, this requires a positive edge: for $\mu \leq 0$ the exponential no longer decays, which signals that ruin is certain ($R = 1$), matching the $p \leq 0.5$ case of the previous formula.

For even-money bets $\mu = 2p - 1$ and $\sigma^2 = 4p(1-p)$, and the approximation tracks the exact answer closely near $p = 0.5$: at $p = 0.55$, $B = 10$ gives 13.26% (approximation) vs 13.44% (exact), about 1% off in relative terms. At $B = 50$, 0.0041% vs 0.0044%, about 6% off.

One definitional note before moving on. The formula above asks for the probability of ever hitting literal zero — only possible with flat staking, i.e. staking a fixed number of units. Under proportional staking the bankroll never reaches zero, so ruin gets redefined as falling below a chosen level (say 50% of starting capital) within a horizon of $N$ bets. That is the definition the ruin calculator implements; the numerical method behind it, and its application to bet sizing, are in the risk-of-ruin indicator article.

Kelly staking and the Drawdown law

Staking a fixed fraction $f$ of the bankroll makes every bet the same proportional shock: the log-bankroll $L = \ln B$ moves by $\Delta L = \ln(1 + f r)$, where $r$ is the return per unit staked. A drawdown $D$ to a bankroll level $H$ from the starting bankroll $B$ is then expressed in log terms:

$$D(H,B) = \ln B - \ln H = \ln \frac{B}{H}$$

So the log-bankroll is a random walk with drift $\mu_L$ and variance $\sigma_L^2$ per bet, and the barrier result of the previous section applies to it directly. The probability that the bankroll ever falls from $B$ to $H$ is:

$$R(H,B) = \exp\left(-\frac{2\mu_L D(H,B)}{\sigma_L^2}\right) = \left(\dfrac{H}{B}\right)^{\,2\mu_L/\sigma_L^2}$$

Everything hinges on the exponent $2\mu_L/\sigma_L^2$. Expanding $\ln(1+x) \approx x - x^2/2$ and keeping the same small-bet convention as before ($m^2$ discarded against $\sigma^2$), a bet with per-unit mean $m$ and variance $s^2$ staked at fraction $f$ gives:

$$\mu_L \approx fm - \frac{f^2s^2}{2}, \qquad \sigma_L^2 \approx f^2s^2 \quad\Rightarrow\quad \frac{2\mu_L}{\sigma_L^2} = \frac{2m}{fs^2} - 1$$

This brings us to our final expression:

$$R(H,B) = \left(\dfrac{H}{B}\right)^{\frac{2m}{fs^2} - 1}$$

Maximising the log-growth $\mu_L(f) = fm - f^2s^2/2$ over $f$ gives the full Kelly fraction $f^{\ast} = m/s^2$, so betting a fraction $\alpha$ of full Kelly ($f = \alpha \, f^{\ast}$) collapses the exponent to $2/\alpha - 1$ and the drawdown law follows:

$$R_{\alpha}(H,B) = \left(\dfrac{H}{B}\right)^{2/\alpha - 1}$$

The exponent is the entire risk dial. This is the probability of ever falling to $H$ (infinite horizon), so over a finite horizon of $N$ bets, as in the calculator, the figure is lower. Full Kelly ($\alpha=1$) gives a risk-of-ruin equal to $H/B$. Going back to even-money bets with $p = 0.55$, here are the numbers:

Kelly fraction $\alpha$ Stake Growth (% of Kelly) R(0.5B, B) R(0.1B, B)
1.00 10% 100% 50% 10%
0.75 7.5% 94% 31% 2.1%
0.50 5.0% 75% 12.5% 0.1%
0.25 2.5% 44% 0.8% ≈ 0

A half Kelly betting strategy gives up a quarter of the growth but greatly reduces the halving risk from 50% to 12.5%. This is the growth/risk tradeoff of fractional Kelly, in numbers.

Those figures are infinite-horizon upper bounds. The ruin calculator works over a finite number of bets and is an approximation, so it reports a lower figure that grows with $N$: for the half-Kelly case above, the 12.5% halving risk becomes 7.6% over 200 bets and 1.2% over 50. Against a direct simulation of the actual win/lose bets, the calculator typically runs a few percent low in relative terms.

Takeaways

  1. Your edge is a crucial estimate: Fundamentally, all these risk allocation strategies rely on a good estimate of the winning probability $p$. You can get away with a lower bound which would give you a conservative risk-of-ruin estimate.

  2. Proportional staking changes the problem: Stakes shrink as the bankroll shrinks, so hitting exactly zero never happens. What you get instead is drawdown risk, and it has its own law (the Kelly section above).

  3. Correlated bets violate independence: Accumulators and same-event combos make wins move together. The true $\sigma^2$ is larger than the independence assumption implies and the formula underestimates ruin.

  4. Withdrawals move the barrier: The formula assumes the bankroll is never topped up or cashed out. Every withdrawal resets the arithmetic.

Share this article:

Back to Articles