The Martingale strategy is the oldest "can't lose" idea in gambling: bet $10 on red, double after every loss, and the first win recovers everything plus $10. Every completed sequence ends in profit.
The catch is the word completed. I wanted to see what that catch costs, so I gave the strategy to 10,000 simulated roulette players and let them play 1,000 spins each. The whole simulation is about 30 lines of NumPy and runs in a couple of seconds.
The model
- European roulette, betting on red: wins 18 of 37 spins (48.6%), so the house edge is 1/37 = 2.7%
- $1,000 bankroll, $10 base bet, $1,000 table limit
- Double after a loss, reset to $10 after a win
- A player is out when they can't cover the $10 base bet
The code
The trick that makes it fast: don't loop over players. Every player is one slot in a NumPy array, and each spin updates all 10,000 at once with boolean masks.
import numpy as np
rng = np.random.default_rng(777)
P_WIN = 18 / 37 # red on a European wheel
PLAYERS, SPINS = 10_000, 1_000
BANK, BASE, LIMIT = 1_000.0, 10.0, 1_000.0
bal = np.full(PLAYERS, BANK)
bet = np.full(PLAYERS, BASE)
alive = np.ones(PLAYERS, bool)
wagered = np.zeros(PLAYERS)
for spin in range(SPINS):
bet[alive & (bet > LIMIT)] = BASE # table limit: start over
bet = np.minimum(bet, bal) # can't bet more than you have
win = rng.random(PLAYERS) < P_WIN
wagered[alive] += bet[alive]
bal += np.where(alive, np.where(win, bet, -bet), 0)
bet = np.where(win, BASE, bet * 2) # Martingale: double after a loss
alive &= bal >= BASE # broke = can't cover the base bet
print(f"broke: {(~alive).mean():.1%}")
print(f"ahead: {(bal > BANK).mean():.1%}")
print(f"average loss: ${BANK - bal.mean():.0f} on ${wagered.mean():,.0f} wagered "
f"({(BANK - bal.mean()) / wagered.mean():.2%} of every bet)")
Output with that seed:
broke: 79.0%
ahead: 18.8%
average loss: $379 on $14,726 wagered (2.58% of every bet)
What the numbers say
79% of players were broke after 1,000 spins. Only 18.8% finished ahead.
That surprises people, because Martingale feels safe while you play it. After 100 spins, 62% of the same players were ahead and the median player was up $390. The balance line climbs in small, steady steps, which is exactly why the strategy is so convincing.
The reason it fails is the ladder. $10, $20, $40, $80, $160, $320, $640: after six losses in a row you have lost $630 and the next bet is $640, but you only have $370 left. A $1,000 bankroll survives six losses in a row, not seven.
Seven reds missed in a row is about 1 in 106 on any single spin. Sounds rare, but a Martingale player is not making one bet; they are rolling that dice every spin. Over a 1,000-spin session, a streak of at least seven showed up in 99% of sessions.
The number that does not move
Look at the last line of the output: the average player lost 2.58% of everything they wagered. The theoretical house edge is 2.70%. Martingale doesn't change that number at all. It only changes the shape of the losses: many small wins, then one large loss that takes all of them.
That is the general lesson for any betting system. The expected value of every bet is fixed by the game, and you can't add up negative-expectation bets into a positive one by changing their size. I later tested Martingale against six other systems (Fibonacci, D'Alembert, Labouchere, Paroli, Oscar's Grind and flat betting) on 70,000 players, with the same result.
Try it yourself
- Change
BANK,BASEorLIMITand watch the bust rate. A bigger bankroll delays the bust; it does not prevent it. - Set
P_WIN = 18 / 38for an American wheel (two zeros) and the losses nearly double. - Add a stop-win rule: stop each player once they are $100 up. In the full write-up that variant got 89% of players to +$100, yet the average player still lost $23.
The full write-up with charts, the stop-win variant and the streak distribution is here: Martingale strategy tested on 10,000 players. All the simulation code is on GitHub: casino-math-simulations. If you want to plug in your own bankroll, there is also a Martingale calculator.
18+. This is a math exercise, not a betting tip: no system removes the house edge.
Top comments (0)