Risk of Ruin Calculator & Reserve Boundary Explorer
Compare the probability that a reserve reaches zero or a positive target before a chosen event horizon. Enter fixed gains, fixed losses and a constant gain probability for two different scenarios. The model follows the probability of each reachable balance and stops a path at its first boundary. Explore which outcome becomes possible at each event and see where the remaining active reserves end. Scenarios with the same average gain can have different chances of stopping.
Compare the chance of hitting a reserve boundary
Test two repeated gain-and-loss scenarios with the same reserve, target and event horizon. Follow which paths stop and which are still active.
Set the shared reserve and horizon
Use the same unit scale for reserve, targets and step sizes. A path stops when its reserve reaches or passes either boundary.
Where paths stand at the horizon
Ruin by event 20. Scenario A 9.70%. Scenario B 23.02%.
Scenario A
Ruin by event 20
9.70%
- Target reached
- 32.34%
- Still active
- 57.96%
- Mean change per active event
- 0.10 units
- Expected events until stop or horizon
- 17.11
Scenario B
Ruin by event 20
23.02%
- Target reached
- 42.77%
- Still active
- 34.21%
- Mean change per active event
- 0.10 units
- Expected events until stop or horizon
- 13.79
Both scenarios have the same expected change per active event. The boundary risks also depend on step sizes and the number of events available.
Edit the two gain-and-loss scenarios
Events are independent. Each event is either a fixed gain or a fixed loss. Loss probability is 100% minus the entered gain probability.
Follow the boundary probabilities
The selected outcome uses the same 0% to 100% scale in both scenarios.
Event 20
- Scenario A · 9.70% ruin reached · 32.34% target reached · 57.96% still active
- Scenario B · 23.02% ruin reached · 42.77% target reached · 34.21% still active
| Event | A ruin | B ruin | A target | B target | A active | B active |
|---|---|---|---|---|---|---|
| 0 | 0% | 0% | 0% | 0% | 100% | 100% |
| 2 | 0% | 0% | 0% | 0% | 100% | 100% |
| 3 | 0% | 2.70% | 0% | 0% | 100% | 97.30% |
| 5 | 0% | 4.40% | 0% | 0% | 100% | 95.60% |
| 7 | 0.83% | 7.97% | 2.77% | 11.76% | 96.40% | 80.26% |
| 8 | 2.06% | 9.56% | 6.88% | 11.76% | 91.06% | 78.68% |
| 10 | 3.44% | 12.65% | 11.46% | 22.14% | 85.11% | 65.21% |
| 12 | 4.82% | 16.53% | 16.07% | 30.53% | 79.11% | 52.94% |
| 13 | 4.82% | 16.53% | 16.07% | 30.53% | 79.11% | 52.94% |
| 15 | 6.16% | 19.71% | 20.53% | 37.30% | 73.31% | 43.00% |
| 17 | 7.42% | 20.59% | 24.74% | 37.30% | 67.84% | 42.11% |
| 18 | 8.60% | 22.30% | 28.68% | 42.77% | 62.72% | 34.94% |
| 20 | 9.70% | 23.02% | 32.34% | 42.77% | 57.96% | 34.21% |
Where the active reserves end
Each amount is a share of all starting paths. Paths that reached a boundary are already counted in the stopped outcomes.
Average reserve among paths still active at event 20. Scenario A 6.61 units · Scenario B 6.78 units
Show active reserve distribution
Scenario A uses solid bars and Scenario B uses striped bars. The longest bar represents 15.95% of all paths.
2 reserve units
Scenario A · 5.02%
Scenario B · 4.63%
4 reserve units
Scenario A · 10.68%
Scenario B · 0%
5 reserve units
Scenario A · 0%
Scenario B · 10.97%
6 reserve units
Scenario A · 15.10%
Scenario B · 0%
8 reserve units
Scenario A · 15.95%
Scenario B · 12.28%
10 reserve units
Scenario A · 11.21%
Scenario B · 0%
11 reserve units
Scenario A · 0%
Scenario B · 6.34%
Export the probability ledger
Save every event’s outcome fractions, reachability, and each active reserve at the horizon. Unrepresentably small positive values are flagged and left blank.
Download risk of ruin CSVSelectable risk of ruin CSV copy
How to use this calculator
- Enter a shared starting reserve, positive target and number of events. Choose a unit scale and use it consistently.
- For each scenario, enter the probability of a gain, the units gained on an upward event and the units lost on a downward event.
- Compare the outcome shares at the horizon. Look at both ruin and target probabilities because a faster stop can move probability into both.
- Choose one outcome to chart and move the event slider. The selected event and milestone rows show the same modeled probabilities.
- Open the active-reserve distribution to see where surviving paths finish. Download the CSV for every event and balance.
The Formula
The mathematical logic powering this calculation is:
Use one reserve unit scale. At an active balance b, the next event increases reserve by a fixed gain g with probability p, or decreases reserve by a fixed loss l with probability 1 − p. Events are independent and the probabilities stay constant. There are no other outcomes.
At event zero, assign all probability to the entered initial balance. At every subsequent event, move each active balance’s probability to b + g and b − l in the entered proportions. Any new balance at or below zero contributes to ruin. A balance at or above the target contributes to target reached. Crossing either boundary stops a path, including overshoots and any boundary already met at event zero. The remaining mass belongs to active paths, and all three shares sum to 100% up to numerical precision.
The first possible ruin event takes enough consecutive losses to cross zero. The first possible target event takes enough consecutive gains to reach the target. These earliest events require the corresponding branch to have positive probability and the path to start inside the boundaries. A boundary that does not become possible within the entered horizon contributes zero probability.
Average reserve change per active event is p × g − (1 − p) × l. Expected events to stop or horizon adds the active probabilities from event zero through the event before the horizon. Conditional mean active reserve divides the expected active reserve at the horizon by its active probability, when numerically meaningful. The final active-reserve histogram shows unconditional shares of all paths.
The calculation uses a deterministic double-precision state recurrence. It tracks reachability separately so a possible but unrepresentably small probability is labeled below numeric range. A chance close enough to 100% to round up is displayed above 99.99% if another outcome is possible. For available displayed values, an exceptionally small positive percentage is shown in scientific notation. The CSV records computed fractions and reachability.
Reserve and step inputs are whole units. The target is 1 to 500, starting reserve is 0 through the target, and gain and loss sizes are 1 to 500. The horizon accepts 0 to 1,000 events. Gain probability is 0% to 100% with up to four decimal places.
The MIT and University of Washington references describe absorbing states and first-step analysis for the classical equal-unit walk. This worksheet applies the same recurrence to a finite horizon with selectable integer step sizes. It compares the entered mathematical scenarios. Actual returns, changing probabilities, withdrawals, dependence between events and recommended decisions are outside the model.Worked Example
If you input:
- Starting reserve and target: 6 and 12 units
- Events to model: 20
- Scenario A gain probability and steps: 55% gain probability, +1 on a gain and −1 on a loss
- Scenario B gain probability and steps: 70% gain probability, +1 on a gain and −2 on a loss
Result:
Both scenarios average +0.10 units per active event. By event 20, Scenario A has 9.70% ruin, 32.34% target reached and 57.96% still active. Scenario B has 23.02% ruin, 42.77% target reached and 34.21% still active. The larger losses and different gain probability in Scenario B lead more paths to stop within the same horizon.
Frequently Asked Questions
Does the reserve have to hit zero or the target exactly?
A loss that moves reserve below zero counts as ruin. A gain that moves reserve above the target counts as reaching the target. Both stop the path immediately.
Can the same path count in both boundary probabilities?
Each path stops on its first boundary. Paths that have crossed neither boundary by the selected event remain active, so the three shares exhaust the outcomes.
Why does the target probability stay zero at first?
Even a string of gains can take several events to close the gap between the starting reserve and the target. The chart stays at zero until a path can reach the target within the horizon.
Why are the ruin probabilities different at the same average gain?
An average is a single number. The size and frequency of losses determine the paths that can cross zero. Different steps can change the first-crossing probability while preserving the same average gain.
What does below numeric range mean?
At least one path can reach that outcome, but its probability is smaller than the recurrence can represent. The CSV leaves the numeric value blank and records the reachability flag.
Does this estimate risk for an actual investment or wager?
The result applies to a process with the same fixed two outcomes, constant independent probabilities and stop rules. For other circumstances these quantities can differ, and the worksheet does not estimate them.
Similar Calculators
Expected Value & Outcome Risk Calculator
Calculate expected value, variance and standard deviation from discrete outcomes. Compare probabilities, target risk and average gaps for two alternatives.
Binomial Probability Calculator
Find exact, cumulative, or upper-tail binomial probabilities for repeated yes/no events.
Odds from Probability Calculator
Convert a win probability into decimal odds for model checks, betting comparisons, and risk analysis.
Kelly Criterion Calculator
Determine the optimal bet size for a sequence of bets to maximize wealth using the Kelly formula.
