Gambler's Ruin Calculator
Calculate the probability of going bust versus reaching your goal—the classic probability problem.
Use this tool →One of the most profound questions in gambling—and in life—is knowing when to stop. The Optimal Stopping Problem, famously known as the Secretary Problem or the 37% Rule, provides a mathematically proven strategy for making the best possible decision when faced with a sequence of options.
This calculator demonstrates how optimal stopping theory works and why the magic number is approximately 37%. Whether you're deciding when to leave a winning session, choosing between slot machines, or simply curious about decision mathematics, this tool reveals the science behind knowing when to quit.
Based on the 37% Rule (1/e ≈ 36.79%)
Observe the first 37 options without selecting any. Remember the best one you saw. Then, starting from option 38, select the first option that is better than everything you observed before.
The optimal stopping problem has a beautiful mathematical solution that converges to exactly 1/e ≈ 36.79% (commonly rounded to 37%). This isn't a coincidence or approximation—it's a fundamental constant that emerges from the mathematics of sequential decision-making.
According to research published in The American Mathematical Monthly, this problem has been studied extensively since the 1960s and the 1/e solution has been proven optimal under standard assumptions.
The optimal strategy divides your decision process into two distinct phases:
While the classic Secretary Problem assumes you can perfectly rank options, the concept translates to gambling scenarios in interesting ways. As documented by the UNLV International Gaming Institute, understanding decision-making psychology is crucial for responsible gambling.
If you plan to visit 10 different casinos or try 10 different sessions during a Vegas trip, the math suggests:
The optimal stopping problem teaches us that having a pre-defined quit strategy is mathematically superior to deciding in the moment. This aligns with what the National Council on Problem Gambling recommends: set limits before you start, not while you're playing.
Of course, there's a crucial difference between the mathematical problem and real gambling: in gambling, the house edge means there is no "best" option—every session has negative expected value. The optimal stopping problem is more applicable to choosing between entertainment experiences than to expecting profit.
For those curious about the mathematics, here's why 1/e emerges as the optimal threshold:
The probability of selecting the best option approaches 1/e (≈36.79%) as the number of options increases. This was proven by multiple mathematicians in the 1960s, and the result holds under standard assumptions about random ordering and the ability to compare options.
The Stanford Encyclopedia of Philosophy's entry on Decision Theory provides deeper context on how optimal stopping relates to broader decision-making frameworks.
The optimal stopping problem appears in many life decisions:
Explore more about gambling mathematics and decision-making:
Calculate the probability of going bust versus reaching your goal—the classic probability problem.
Use this tool →See the probability of winning, losing, or breaking even based on house edge and session length.
Use this tool →How casinos are designed to make it hard to stop—and what the psychology reveals.
Read the story →