Risk of Ruin Calculator
The chance a bankroll gets wiped out, from your edge, your swings and how many units you hold.
This sizes a bankroll against variance at a stake that never changes. It does not tell you whether you have an edge in the first place, and every figure here assumes the edge you entered is real.
What happens over the next 1,000 bets
Simulating…
2. Set your numbers
Playing poker? A unit is one big blind, so a tracker’s bb/100 hands is the win rate and the standard deviation as they stand. The bankroll goes in as big blinds rather than buy-ins: 4,000 for a 40 buy-in roll at 100 big blinds a buy-in.
Ten example runs, fixed draw1,000 bets
Typical run
–
in the bankroll at the end
Headline figure
–
points at 95%
Does quitting while ahead work?
- Playing forever
- 44.9%
- chance of losing the 40 u
- Quitting at +5u
- 7.2%
- against a 92.8% chance of capping the win at 5 u instead
Same bet, two ways the run can end. Quitting early does not change what either bet is worth, only how many get made; what that costs, and what it looks like at a losing price, is in the FAQ below.
Compare against a baseline
Pin these inputs, then change them. The risk figure below will say how far it moved, not just what it is now.
Now, at these inputs
77.9%
unchanged from 77.9%
If you halved your bet size
60.7%
down from 77.9%, same money at twice the units
Starting from this page’s default inputs, 77.9% risk of ruin. Pin your own to compare against something you chose.
Risk of ruin, playing forever
77.9%
Simulated share, 1,000 bets
…
That is the standard figure, and it answers a different question: the chance of eventually reaching zero given unlimited time. The simulated share above is lower because 1,000 bets is not unlimited time. Neither number tells you how far down you go on the way, which is what usually ends a bankroll in practice, so the bands do.
Risk against bankroll size
Risk of ruin runs 0% at the bottom to 100% at the top, against a bankroll growing left to right to 922 u. The dashed line marks 5%, and the dot is your 50 u. Risk reaches 10% at 461 units, 5% at 600 units, 1% at 922 units.
- Your bankroll
- 50 u
- Bankroll for 10% risk
- 461 u
- Bankroll for 5% risk
- 600 u
- Bankroll for 1% risk
- 922 u
A bankroll that clears one of these targets is not a green light. It holds this one risk figure, at this bet size and this edge, to the stated percentage, and nothing else about playing is made safe by reaching it.
How long is the long run
Nobody plays forever. This estimates the same risk over a stated number of bets instead, using the diffusion approximation for a first passage to zero rather than the exact formula above: an estimate, not the exact figure the rest of this page prints.
Risk of ruin within 1,000 bets
37.7%
Bankroll for 5% risk within 1,000 bets
116 u
Bankroll for 1% risk within 1,000 bets
155 u
- Your time horizon
- 1,000
- Bets until 5% risk is reached, at this bankroll
- 172
- N0 (bets for the edge to show)
- 40,000
- Bets to confirm this edge (95%)
- 153,658
Bars are on a log scale: equal steps are equal multiples of bets, not equal counts.
N0 is the bet count at which the swings around your edge first shrink to the size of the edge itself: below it a bad stretch can hide a real winner, above it the win rate starts to dominate the noise. It is a scale, not a guarantee about any individual stretch of play. Confirming it, rather than just seeing it, takes about 3.8x as long: N0 and the confirm figure above are the same identity at two confidence levels, so the gap between them is roughly where most players start calling themselves winners on data that only clears the lower bar.
Ruin risk falls exponentially as the bankroll grows: each extra chunk of units cuts the probability by a constant factor. That is why bankroll requirements scale with your variance, not just your edge.
A link to this page opens the calculator on the same model, win rate, standard deviation or win probability, bankroll and quit-at goal shown here. It carries those inputs and nothing else: nothing is stored, and nothing in it identifies you.
Written and reviewed by Alexander Korsager · last reviewed October 6, 2026 · corrections
The idea
What this tool shows
Risk of ruin is the probability that a run of bad luck drains your entire bankroll before your edge ever gets the chance to compound. It depends on three things: how big your edge is, how wild the swings are around that edge, and how many betting units your bankroll represents.
For an advantage player with a known win rate and standard deviation, the continuous approximation is RoR = e^(−2 · edge · bankroll / variance). Doubling the bankroll squares the risk, a bankroll that gives a 10% risk of ruin gives about 1% at double the size. For a simple even-money bet won with probability p, the classic gambler's-ruin result is RoR = (q/p)^(units), and if p ≤ 0.5 ruin is certain given enough time. Set a quit-at goal and the even-money model switches to a second formula, the two-barrier one, which asks a narrower question: the chance of reaching zero before reaching the goal. That answer is always the lower of the two, and at a losing price it is the only figure on this page that is not 100%.
That first formula is also the standard poker one.Take the unit to be one big blind and it is the risk of ruin published in The Mathematics of Poker, so the figures a tracker already reports go into the fields unchanged: win rate in big blinds per 100 hands, standard deviation in big blinds per 100 hands, and the bankroll in big blinds rather than in buy-ins, which makes a 40 buy-in roll at 100 big blinds a buy-in 4,000 units here. There is no conversion step to work out first. That is stated plainly because the labels below say bets and a poker player counts hands, which makes the two look further apart than they are.
The practical takeaway is that variance, not edge, sets how much bankroll you need.Two players with the same 2% edge can need very different bankrolls if one plays a low-variance game and the other chases big multipliers.
All of that assumes the stake never changes, and that assumption is what decides whether these numbers describe you.A fixed stake does not shrink as the bankroll does, which is the only reason zero is reachable at all. Resize every bet to a percentage of what is left, which is what the Kelly criterion and most staking plans actually describe, and the balance approaches zero without ever formally arriving: there is no ruin probability left to report, and the drawdown is the number that bites instead. At the full Kelly fraction the chance of the bankroll ever being down to half where it started is 50%, and of ever being down to a tenth, 10%.
Every figure above answers a play-forever question, and nobody plays forever.The panel further down the page answers the bounded version instead: the chance of ruin within a stated number of bets, the bankroll a target risk needs at that horizon, and how many bets until a target risk is reached at your bankroll. It also names N0, the bet count at which the swings around an edge first shrink to the size of the edge itself, a concept advantage players have asked about for years without most tools ever putting a number on it. Beside N0 is a stricter figure at the same units: how many bets it would take to confirm the edge at 95% confidence, roughly 3.8 times N0 for any edge and any game, because the two are the same sample-size identity evaluated at two different confidence levels. None of those three ruin figures have an exact discrete formula, so that panel uses an approximation and says so, rather than presenting an estimate with the confidence of the closed forms above it. The confirm figure is exact arithmetic, the same as N0.
FAQ
Questions players ask
What is an acceptable risk of ruin?
Ten, five and one percent are the three figures the tool solves for, because 5% and 1% are the conventional reference points in advantage-play bankroll work and 10% is the loosest rung on the same ladder. The more useful answer is that choosing a target is mostly choosing how many units you have to hold. At the shipped inputs, a win rate of one unit per 100 bets against a standard deviation of 20, a 50 unit bankroll carries a 77.9% risk, a 10% target needs 461 units, a 5% target needs 600 and a 1% target needs 922. Going from 10% to 5% costs about 30% more, and from 5% to 1% about half as much again, which makes the target the cheap part of the decision. The expensive part is the standard deviation, which enters the formula squared: at the same win rate and the same target, doubling it quadruples the bankroll asked for. A player who will reload from income is not sizing a bankroll in the sense any of this means, because the formula assumes what you hold is all there is.
How many buy-ins do I need for a 5% risk of ruin in poker?
It depends on the win rate and the standard deviation you actually have, which is why the tool solves for it rather than quoting a number, but the shape of the answer is the useful part. Take a winner at 3 big blinds per 100 hands with a standard deviation of 90, both ordinary for online six-max no-limit hold'em: a 5% risk of ruin asks for 4,045 big blinds, a little over 40 buy-ins at 100 big blinds each, and a 1% risk asks for 6,217, about 62. The 20 and 30 buy-in figures usually quoted for cash games come out at 22.7% and 10.8% on this same formula, not at 5%. That gap is not the rules of thumb being wrong. They assume you move down in stakes when the roll drops, and this formula assumes you never do, which is the next question below. Halve the win rate to 1.5 and the same 5% target asks for about 81 buy-ins, because what a target costs scales with the standard deviation squared and with the inverse of the win rate.
Does moving down in stakes change my risk of ruin?
Yes, and that is why the buy-in rules of thumb survive contact with a real bankroll while the fixed-stake number above looks alarming next to them. The figure on this page is for a stake that never changes, so zero is the only way the run ends. A player who drops from 50NL to 25NL has not halved anything: the money still there buys twice as many big blinds at the new level, and nothing about the edge has to get worse in a softer game. That is proportional staking in coarse steps, which is the case this page's limits say has no ruin probability to report at all. So the number here is an upper bound if you will move down, and it is the number itself if you will not, which covers anyone already at the lowest stake spread and anyone whose plan is to reload from outside rather than drop a level. Sizing a roll for the stake you intend to stay at is the question this answers. Sizing one for a whole poker career is not, and no closed form does that.
Does stopping when I'm up cut my risk of ruin?
Yes, and the arithmetic behind that is the reason the plan feels like it works, which is also why it is worth pricing rather than trusting. Take the even-money defaults here, 40 units at a 50.5% price: played with no goal the risk of ruin is 44.9%, and with a quit-at goal of plus 5 units it is 7.2%. Nothing about the bet moved. What moved is that the run now has two ways to end instead of one, and the near end is much the likelier. What the smaller number costs is the ceiling: those same inputs win 5 units 92.8% of the time and lose all 40 the rest of the time, which is a different shape of outcome rather than a better one. A quit rule cannot change the edge, because it does not change any individual bet. It only decides how many of them get made. That is clearest at a losing price, where it is also hardest to see. Put in 47.4%, a shade above what red pays on a double-zero wheel, with the same 40 units and the same plus 5 goal. Played forever the ruin probability is 100%, the certainty this formula gives every negative edge. With the goal it reads 41.0%, so roughly three sessions in five end with the player up 5 units and walking away, and those three are paid for by the two that lose 40. The expected result is a loss of about 13.4 units, arriving over roughly 258 bets that each give up 5.2% of a unit. Winning three sessions out of five is evidence that the goal was set close to the bankroll, and of nothing else.
What is N0, and how many hands until my win rate is real?
N0 is the bet count at which the standard deviation of your results, accumulating as the square root of the number of bets, first falls back to the size of your accumulating mean, which grows in a straight line. Below N0 a bad stretch is large enough to hide a real winner or flatter a real loser; above it the win rate increasingly dominates the noise. It works out to 100 times the standard deviation over the win rate, squared, both per 100 bets, so a poker player at 1 big blind per 100 hands and a 20 big blind standard deviation, ordinary figures for a six-max regular, has an N0 of 40,000 hands. A stronger, steadier winner at 3 per 100 with a 90 standard deviation needs 90,000, because the higher variance more than offsets the bigger edge. It is a scale for how much data your own results need before they mean much, not a promise that a result on the other side of it is certain. "Bets to confirm this edge (95%)" beside it is the stricter question: not when the edge first shows, but when it would clear a 95% confidence interval against zero. That is always Z_95 squared times N0, about 3.84, because both figures are the same sample-size identity, n > (z x sd / mean)^2 in per-bet units, differing only in z: 1 for N0, 1.96 for the confirm figure. At the 1-per-100/20 example that is 153,658 hands rather than 40,000.
How many bets does it take to prove I'm actually winning, not just see it?
More than seeing it takes, by a fixed and fairly large factor: Z_95 squared times N0, about 3.84, whatever your edge and whatever game you're in, because proving an edge and the edge starting to dominate variance are the same formula at two confidence levels. At the shipped edge-model defaults, a win rate of 1 unit per 100 bets against a 20-unit standard deviation, N0 is 40,000 bets and confirming the edge at 95% confidence takes 153,658. For a negative-expectation game the honest answer is different in kind rather than in degree: the edge is a known negative constant, not something a sample has to estimate, so there is no bet count that turns it positive and the panel says so instead of a number. That case is the useful one, not a caveat on the useful one: a player tracking a losing session against a game whose edge runs the house's way does not need more data to find out whether they're really winning. They already have the answer, and it does not require a sample.
How likely am I to go broke over a realistic number of hands, not forever?
That is what the panel further down the page solves, and the shipped even-money defaults show why the answer is smaller than the play-forever figure the rest of the page quotes: at 50.5% and 40 units, the play-forever risk of ruin is 44.9%, and the risk within a bounded 1,000 bets is about 13.4%. Both describe the same bet. The bounded figure is lower because there is less time to go broke in, exactly the same relationship the simulated panel above states about its own 1,000-bet horizon, computed here by a different method. Extend the horizon and the bounded figure climbs toward the play-forever one; it never passes it.
Does a positive edge mean I can't be ruined?
No. A positive edge makes eventual ruin less than certain, but with a finite bankroll there is always some probability that variance takes you to zero first. The calculator quantifies exactly that probability.
How is this different from the Kelly criterion?
Kelly picks a stake and this picks a bankroll, and the two models overlap less neatly than that makes it sound. Kelly resizes every bet to the bankroll, so the stake shrinks as the balance does and zero is never formally reached, which means the ruin probability on this page is not defined for a Kelly bettor at all. Drawdown is what replaces it, and it has a closed form of its own. In the continuous approximation, a full Kelly bettor's chance of the bankroll ever falling to a fraction of where it started is that same fraction: 50% of ever halving, 10% of ever being down to a tenth, 1% of ever being down to a hundredth. Staking a fraction k of full Kelly raises that fraction to the power 2/k minus 1, so half Kelly turns the 50% into 12.5% and the 10% into 0.1%. That is the trade fractional staking is making, and it is the number the phrase deep drawdowns is standing in for.
Methodology
How this is calculated
Three numbers, from three different methods, answering three different questions. The risk-of-ruin percentage is a closed-form formula: the continuous approximation RoR = e^(−2 · edge · bankroll / variance) for the edge model, and the gambler's-ruin result (q/p)^units for the even-money model.
The even-money model has a second form, and the quit-at goal is what selects it: above zero the page computes the two-barrier result (r^N − r^B)/(r^N − 1), with r = q/p, B the bankroll in units and N the bankroll plus the goal.
With no goal the figure is the chance of eventually reaching zero given unlimited time; with one it is the chance of reaching zero before reaching the goal, which is a smaller number about a shorter game. The panel names which of the two it is showing rather than leaving the reader to infer it from the slider.
The distribution above it is a Monte Carlo simulation of a bounded stretch of play instead: 1,200 betting lifetimes of 1,000 bets each, recording how many hit zero, how deep the falls from a peak got, and where the bankroll finished.
The "How long is the long run" panel is the third method: a diffusion (Brownian motion with drift) approximation for the same bounded question at a horizon the reader sets, used because there is no simple exact formula for whether a discrete random walk crosses zero by a given step.
It is a genuine approximation, distinguished throughout from the exact figures the other two methods produce, and N0 alongside it is exact arithmetic rather than an approximation of anything.
- Risk of ruin, play forever
- 77.9%
- 1 unit/100 bets, sd 20, 50-unit bankroll
- N0
- 40,000
- exact, not approximated
- Bets to confirm edge, 95%
- 153,658
- same identity as N0, at Z_95
Common misreadings7
- A low risk of ruin is not a low chance of a painful stretch. The drawdown band is the relevant number for that, and it is routinely far worse than the ruin figure suggests.
- Surviving 1,000 bets is not surviving. The bounded figure describes a stretch of play, not a career.
- Risk of ruin says nothing about whether a bet is worth placing. It answers only what a run of bad luck does to a bankroll of a given size.
- A bankroll that clears a target at one stake is not a bankroll for the stake above it. Moving up halves what the same money is worth counted in big blinds, and it resets both inputs, since the standard deviation and the win rate belong to the game being played rather than to the player. Carrying a cleared 5% across a level change is reading an answer to a question that was asked about a different table.
- A quit-at goal makes the number smaller without making the bet better, and comparing it against the play-forever figure is the most expensive misreading this page allows. At the even-money defaults, 40 units at a 50.5% price, the risk is 44.9% with no goal and 7.2% at a goal of plus 5 units. The bet did not change. The run now has two ways to end instead of one, and the near one is much the likelier, which is a smaller ceiling rather than a safer game.
- No ruin is not no risk. A staking plan that resizes bets to the bankroll drives the ruin probability to zero by construction, and nothing about the danger has moved: the losses arrive as a shrinking balance rather than as a wipeout, and the drawdown is where they show up. Zero on a figure the model cannot compute for you is not a result.
- Clearing N0 is not proof of a winning edge. It says your results have accumulated past the point where the play-forever formula's swings alone would explain them at even odds, not that your true win rate is what your sample says it is, and not that anything is guaranteed from here.
Assumptions12
- The edge model treats one bet as a draw from a normal distribution with the win rate and standard deviation you enter, both given per 100 bets and scaled to a single bet by dividing the standard deviation by 10.
- The even-money model stakes exactly one unit per bet and wins it with the probability you enter.
- Bet size is held fixed for the whole run, and that is load bearing rather than a detail of the setup. A fixed stake does not shrink as the bankroll does, and that is the only reason zero is reachable. A player who raises stakes after a win, chases after a loss, or resizes each bet to a percentage of the bankroll is in a different model, and the last of those is what most staking advice actually describes.
- The bankroll is all the money there is. Someone who reloads from income each month is not the player either figure is about, and topping up a balance mid-run is not a smaller version of this model, it is outside it.
- 1,200 simulated lifetimes of 1,000 bets each, run in your browser from a fixed seed, so the same inputs always produce the same picture. The trial count is set to keep the recalculation responsive on a mid-range phone; the 95% interval it leaves on the headline percentage is shown next to that figure rather than left for you to assume away.
- Where a quit-at goal is set, the simulated player walks away on reaching it, and the closed form switches to the two-barrier formula so that it describes the same player. Both figures then answer a narrower question than the page's default one, and both are labeled to say so. The three bankroll targets are not shown in this branch at all: they invert the play-forever formula, which the branch is not using, and an answer read off the wrong formula is worse than a blank.
- The three bankroll targets (10%, 5% and 1% risk of ruin) solve backwards for the smallest bankroll that holds each target, as the inverse of the same closed-form model the headline figure above them reads forward, at whatever the current inputs are. That solve has no answer at a non-positive edge: a win rate at or below zero (edge model) or a win probability at or below 50% (even-money model) makes ruin certain given enough bets, at every bankroll, so there is no bankroll left to find for any of the three. The page states that plainly rather than leaving the cell blank or reporting the largest bankroll it happened to check, which would read as a number the reader could act on. This is a floor under one specific failure mode either way, not a safety threshold: a bankroll that clears a target has not been made safe by clearing it, it has only been sized against this one risk figure, at this bet size and this edge.
- The comparison panel's expected result is the exact expectation of the stopped game, the goal won with the probability of reaching it against the bankroll lost otherwise, and its bet count is the expected duration of the same two-barrier run: E[T] = (B − N(1 − r^B)/(1 − r^N))/(q − p), with r = q/p and N the bankroll plus the goal, and B×G at a fair price where that expression is 0/0. Neither is simulated and neither depends on the 1,000-bet horizon.
- The finite-horizon panel treats one bet as normally distributed with mean mu and standard deviation sigma per bet, the same per-bet conversion the edge model already uses, and applies it to the even-money model too by taking mu = 2p − 1 and sigma = 2·sqrt(p(1 − p)), the mean and standard deviation of a single ±1 unit bet won with probability p. The risk-of-ruin figure it prints is the reflection-principle first-passage probability of drifted Brownian motion at a single lower barrier: P(ruin by T) = Φ((−B − μT)/(σ√T)) + e^(−2μB/σ²)·Φ((−B + μT)/(σ√T)). The two bankroll targets and the bet count invert that formula by bisection rather than by an algebraic inverse, because this equation, unlike the play-forever ones above it, has none. The bisection runs 100 steps after an initial doubling search finds a bracket, which halves the search interval a hundred times over and settles on an answer far past the precision either figure is ever printed to.
- N0 is exact rather than approximated: 100 × (standard deviation ÷ win rate)² for the edge model, both per 100 bets, from setting the accumulating standard deviation (which grows as the square root of the bet count) equal to the accumulating mean (which grows in a straight line) and solving for the bet count. The even-money model's version converts p to a per-bet mean and standard deviation the same way the finite-horizon panel does.
- Bets to confirm this edge (95%) is also exact, and it is the same identity as N0 rather than a second one: the sample size at which a normal interval's half-width, z × standard deviation ÷ √n, first falls to the mean, solved for n. N0 is that identity at z = 1; this figure is the same identity at z = Z_95 (about 1.96), the same 95% confidence level clv-calculator asks of an observed CLV sample. Because only z changes between the two, this figure is always exactly Z_95² (about 3.84) times N0, for any edge and any game.
- The "Compare against a baseline" panel (#741) reruns the same closed-form risk of ruin the page already shows, continuousRoR for the edge model or coinRuin for the even-money one, at a pinned snapshot of the inputs, and prints how far the live figure and one fixed suggested scenario have moved against it, rather than computing anything new. Until a reader actually pins something the baseline is seeded from this page's own default inputs rather than left blank, and the panel's own copy discloses which case it is showing so a seed is never presented as a real pin. The suggested scenario is always the same edit: the bankroll doubled in whichever unit field the active model uses, with the win rate and standard deviation, or the win probability, held fixed. That is the same bet at half the stake, because the model is scale free in the unit, so doubling the units while holding the per-unit edge and swings fixed describes the identical position in smaller units rather than a different one. A baseline pinned in the other model reads as absent here rather than compared across units that do not mean the same thing. A move smaller than 0.05 percentage points reads as "unchanged" rather than as a false precision claim about a change too small for the underlying formula to distinguish from noise.
Limits8
- The simulated share that hit zero is always lower than the closed-form percentage, because the simulation stops at 1,000 bets and the formula does not stop at all. Playing forever, the formula runs until zero arrives; with a quit-at goal it runs until zero or the goal arrives. Either way a simulated run can end with neither having happened, and that run is counted as not ruined. They are not two estimates of one number and neither corrects the other.
- The continuous approximation is a normal-distribution model. A game with a large jackpot component has a return distribution the normal curve fits poorly, and the figure will understate the risk there.
- Drawdown is measured against the highest point a run reached, not against where it started, so a run that doubled and gave half of it back reads as a 50% fall.
- Proportional staking has no ruin probability for this page to report. Resize each bet to the bankroll and the stake shrinks with it, so the balance approaches zero without arriving, and the formula would be answering about a game nobody is playing. What carries over is the drawdown: at the full Kelly fraction, the chance of the bankroll ever being down to a fraction of its starting value is that fraction itself, and staking a fraction k of full Kelly raises it to the power 2/k minus 1.
- The simulated stretch is 1,000 bets, and for a poker player that is 1,000 hands, which is a long session rather than a month. The distribution and the drawdown band describe play at that scale and should not be read as a sample size a tracker would call meaningful. The closed-form percentage and the three bankroll targets do not depend on the horizon at all, so those are the figures that carry over.
- The bankroll a target asks for scales with the square of the standard deviation and only with the logarithm of the target. Tightening the target from 10% to 5% adds about 30% to the bankroll and from 5% to 1% about half as much again, while doubling the standard deviation at a fixed target quadruples it. Reading the three figures in the panel as comparable levers gets the size of the decision wrong.
- The diffusion approximation treats each bet as continuous and normally distributed. That is a close fit for the edge model, which already assumes a normal per-bet return, and a looser one for the even-money model's true ±1 outcome at a short horizon, the same central-limit gap the edge model's own return distribution has relative to the real game behind it. It also does not know about a quit-at goal: the finite-horizon panel is blank whenever one is set, and the simulated panel above, which does model the goal, is the bounded answer for that case instead.
- The baseline panel measures only the closed-form play-forever (or two-barrier, where a goal is set) figure, the same one the headline result above it prints. Pinning a baseline moves nothing in the simulated distribution, the finite-horizon panel, N0, or the confirm-the-edge figure, and none of those should be read as having a baseline to move against.
Evidence
The closed forms are the standard gambler's-ruin and continuous-approximation results, covered in math.test.ts, which pins both even-money branches: the play-forever (q/p)^units form, the two-barrier form a quit-at goal selects, and the figures this page quotes when it compares them.
At 40 units and a 50.5% price those are 44.932% with no goal and 7.205% at a goal of plus 5 units, and at a 47.4% price with the same goal, 40.954% against the flat 100% the play-forever form gives every negative edge.
The same file checks that the goal figure rises towards the play-forever one as the goal recedes and never passes it, which is the direction the panel's comparison assumes.
The comparison panel's third figure is pinned there too, and by a check rather than by restating its own formula: the expected result and the expected bet count are computed by separate routes in math.ts, one from the ruin probability and one from the duration formula, and the test asserts that their ratio is the per-bet edge at every whole win probability from 1% to 99% across three bankrolls and three goals.
That is Wald's identity, and it is the sentence under the panel stated as arithmetic: a stopping rule moves a result only by moving how many bets get made.
At a 47.4% price with 40 units and a plus 5 goal the two sides are a loss of 13.43 units and 258.3 bets at 5.2% of a unit each; at the shipped 50.5% defaults they are a gain of 1.76 units and 175.8 bets at 1.0% each.
Both were checked against a 400,000-run Monte Carlo of the same stopped game on 2026-09-11, which returned 257.5 bets and a loss of 13.41 units, and 176.1 bets and a gain of 1.73 units, agreeing within its own sampling error.
The goal branch is also evaluated in a form that divides through by r^N above r = 1, because the textbook expression overflows to NaN for r^N past the double ceiling, which a 1% win probability reaches at a bankroll of 155 units and a 5% one at 241; math.test.ts pins that the two forms agree wherever both are finite and that the figure stays a probability across the whole range the controls allow.
The simulation is covered in simulate.test.ts, which checks that the bounded ruin rate never exceeds the closed form, that it converges on the closed form when the horizon dwarfs the bankroll, and that the simulated walk carries the win rate entered.
A passing test means the code matches the model, not that the model fits every real game.
The two models agree with each other where they overlap: at the even-money defaults the exact gambler's-ruin figure is 44.932% and the continuous approximation applied to the same bet gives 44.929%, which is why the page can use one formula for a coin and the other for a card counter without the reader having to reconcile them.
The Kelly drawdown result quoted above is Thorp's, from The Kelly Criterion in Blackjack, Sports Betting and the Stock Market (1997, revised 2007), section 2: under the continuous approximation a full Kelly bettor's probability of the bankroll ever being reduced to a fraction x of its starting value is x.
The fractional form, x to the power 2/k minus 1 at a fraction k of full Kelly, follows from the same diffusion rather than from a separate source, and was checked here on 2026-09-09 by simulating 40,000 proportional-staking lifetimes at each of full, half and quarter Kelly: 49.0%, 12.2% and 0.8% for ever halving, against the 50%, 12.5% and 0.78% the formula gives.
That check is arithmetic on the copy above and is not part of the shipped tool, which stakes a fixed amount.
The continuous approximation is also the standard poker risk-of-ruin result, given as R = e^(-2 · w · b / s²) in Bill Chen and Jerrod Ankenman, The Mathematics of Poker (2006), chapter 22, and popularized earlier by Mason Malmuth in Gambling Theory and Other Topics.
Because the formula is scale free in the unit, taking the unit to be one big blind makes the two the same equation rather than two similar ones, which is why the poker figures quoted on this page are read off the same tested code as everything else: bankrollForRoR at a win rate of 3 and a standard deviation of 90 returns 4,044.2 and 6,217.0 big blinds for the 5% and 1% targets, and continuousRoR at 2,000 and 3,000 big blinds returns 22.7% and 10.8%.
The 90 is a working figure for online six-max no-limit hold'em rather than a measurement of any population, and it is the input that matters most here because it enters squared, so anyone with a tracker has a better number to hand than this one.
The finite-horizon panel's formula is the standard reflection-principle first-passage result for drifted Brownian motion at a single barrier, covered in math.test.ts, which pins the shipped defaults (37.664% risk of ruin within 1,000 bets at the edge-model defaults, 13.391% at the even-money ones), checks that the figure never exceeds the play-forever one, checks that it rises towards the play-forever figure as the horizon lengthens and converges on it exactly as the horizon grows without bound (continuousRoR read as this formula's own infinite-time limit), and checks it stays a finite probability at the bankroll and horizon combinations that would overflow the formula's second term if it were evaluated the naive way.
It is cross-checked against this tool's own Monte Carlo engine in simulate.test.ts, at the simulation's own 1,000-bet horizon (the only one it runs), across bankrolls spanning both a winning and a losing edge in both models, and agrees within the simulation's own sampling error in every case, the same standard the play-forever formulas above were held to on 2026-09-11.
That is a standing regression test rather than a one-off check: it fails the suite if the formula and the simulation ever disagree by more than sampling noise can explain, at any of the four cases it runs.
N0 is arithmetic rather than a citation: 100 × (standard deviation ÷ win rate)² for the edge model, derived from setting the accumulating standard deviation equal to the accumulating mean and solving for the bet count, and the 40,000-hand and 90,000-hand figures quoted in the FAQ are read off n0Edge directly.
The 95%-confidence confirm figure beside it (#737) is the same identity, shared as @/lib/distribution's betsForSignificance rather than copied a second time, evaluated here on n0Edge/n0Coin's own per-bet mean and standard deviation at Z_95 in place of 1; math.test.ts pins betsToConfirmEdge/betsToConfirmCoin against Z_95² × n0Edge/n0Coin directly, and the 153,658-hand and 345,731-hand figures quoted in the FAQ and copy are read off betsToConfirmEdge, matching Z_95² times the 40,000 and 90,000 N0 already quotes.
Gambling can cause serious harm. The National Problem Gambling Helpline is free, confidential and open 24/7, call or text 1-800-MY-RESET (1-800-697-3738), or chat at ncpgambling.org/chat.
Read up
Go deeper
- GuideBankroll Management: Unit Sizing, Staking and DownswingsHow to set a bankroll, size a betting unit or poker buy-in, pick flat or percentage staking, and survive the losing runs a real edge still goes through.
- GuideThe Kelly Criterion Explained (and Why Most People Use Half)What the Kelly criterion is, the formula for the optimal bet fraction, why full Kelly punishes hard, and how fractional Kelly trades growth for smaller swings.
- GuideTurn $1,000 Into $5,000? Here's What the Odds Actually SayThe real odds of turning $1,000 into $5,000 gambling, computed from this site's own risk-of-ruin math, and why grinding it out in small bets makes them worse.
Related tools
Try next
- Kelly StakeFind your optimal bet size
- Bankroll CalculatorSize your stake per bet
- Variance SimulatorWatch a downswing play out
- Poker Pot Odds CalculatorTurn the pot, the bet and your outs into a call-or-fold answer, and drill the decision until it's instant.
- ICM CalculatorTurn tournament chip stacks into real money equity, and see how much a chip lead is actually worth.
- CLV CalculatorWork out your closing line value, and whether the sample you have is large enough to mean anything yet.
- Problem Gambling Screening (PGSI)The nine-question PGSI, scored as published, with support resources beside your result. Nothing you enter is saved.
- Push/Fold Nash ChartThe equilibrium shove range for a short stack, with the calling range beside it, close hands left uncolored.