The Martingale strategy: a sure bet if you have infinite money
There was a casino at my A level prom (it was a fake casino, we were 17 or 18 years old at the time). I think there was a prize for whoever collected the most chips by the end of the night.
Two guys spent a while at the roulette table, with what I remember to be this strategy:
- Bet a chip on red
- If you win, great! You win 1 chip! Bet another chip on red (go back to 1)
- If you lose, double your bet.
- If you win, great! You win 1 chip (overall)! Bet another chip on red (go back to 1)
- If you lose, double your bet (go back to 3)
- Repeat
This is called the Martingale strategy, and it worked for those guys – they won the most chips, so walked away the winners. (I suppose it might depend on your definition of “winner” of course – this was prom after all and I’m reasonably certain they spent all night gambling).
So for years, I thought that was a good strategy. Bet an amount, if you lose, double up.
I didn’t know what the strategy was called, so I never looked it up. But I did realise, about 10 years later, that I could code up a simulation to see whether it worked.
I mean, obviously it couldn’t work, otherwise casinos wouldn’t exist. But maybe there was a way to make sure it worked, something no one else had thought of!
There wasn’t, of course. But at least I didn’t have to pay a casino to find that out.
Background
Roulette is a casino game where a little ball is spun around a little wheel (“roulette” = “little wheel” in French), and it lands on any number from 0 to 36. Even numbers are red, odd numbers are black, and zero is green. Occasionally there is also a “00” on the wheel, to make doubly sure the house will always win.
You can bet on any number, or combination of numbers (red/even, black/odd, first third etc.), and you win if the ball falls on the number you bet on (or within the combination of numbers). If the ball falls anywhere else, you lose the bet, usually down a little hole in the table.
Winnings are proportional to risk of the bet – if you bet on even numbers, you win the same amount as you put in (£1 for a £1 bet), doubling your money. If you bet on the number 2, you win 36 times the amount you bet (£36 for a £1 bet).
This is how the game is profitable for the casino, since the probability of winning each bet is LESS than the return for the bet: the probability of winning if you bet on red is NOT 50% (necessary to break even if you double your money if you win), it’s 48.6% (18 evens divided by 37 total numbers). It’s because of the “0” (and “00”) – don’t be fooled though, even without the “0”, this strategy has the potential to bankrupt you.
In any case, that 1.4% difference is where casinos make their money on roulette (more if there’s a “00” too).
The Martingale
As described above, you bet some amount on red (or black, or evens, anything where you double your money if you win). If you win, bet the same amount again, pocketing the winnings. If you lose, double your bet. Then if you win, you win the original bet back as well.
Example:
- Bet £1 on red (£0 up)
- Come up red, so win £1 (£1 up)
- Bet £1 on red (£1 up)
- Comes up black, lose £1 (£0 up)
- Bet £2 on red (£0 up)
- Comes up black, lose £2 (£2 down)
- Bet £4 on red (£2 down)
- Come up red, so win £4 (£2 up)
- Continue until you’ve won enough! Or gotten so bored you joined a poker game or something.
If you make sure you leave after you WIN, rather than leaving after any loss, then surely you could make money?
Surely you can’t get into a losing streak so long that this wouldn’t work?
Simulation
I’m actually not that great at maths, at least, the hard kind: I can’t work out how to write down an equation to work out whether or not I would win using this strategy. Wikipedia tells me that I wouldn’t win doing this, and implicitly trust Wikipedia, but I don’t know how to calculate that for myself.
But what I can do is simulate things.
So I wrote a simulation in Stata to see if the Martingale strategy would work.
In the simulation, I started out betting £1, and stopped betting once I’d won £100, so I just needed to win an almost-even bet 100 times in total.
I wanted to know a) how long it would take, on average, to win £100 with this strategy, and b) the maximum amount I’d have to bet to win £100.
I repeated this 10,000 times, so I’d win £1,000,000 total.
I gave myself infinite money to bet, so placed no limit on how much I could bet per wheel spin of roulette (no limits on my own money and no table limit) – I couldn’t bankrupt myself in the simulation, unlike in real life.
Results
I ended up winning £100 quickly and easily about half the time. So far, so good.
Half the time, I won £100 in 205 rounds or fewer of betting – neatly, this is the same as £100 divided by the probability of winning (48.6%). That probably meant my simulation was working as intended.
Half the time, I bet a maximum of £128 or less (a streak of 7 losses, £255 bet in total including all the previous bets I lost).
BUT.
1% of the time I’d bet a maximum of at least £8,192 (a streak of 13 losses, £16,383 bet in total, including all the previous bets I lost).
In one simulation, I got up to a maximum of £2,097,152, meaning I lost 21 times in a row, and bet £4,194,303 in total. To win £1…
This graph shows the longest losing streak across each of the 10,000 simulations (remember, this is all to win £100 in total – that’s it):

So, is this strategy good for winning at roulette?
If you have infinite money, or you happen to be a casino, then yes! Go for it.
If you don’t, then no.
To win £100, you might have to bet £4,194,303.
Code
To be honest, I probably had more fun coding the simulations that I would constantly betting increasingly large amounts to win £1.
That’s the kind of fun you just can’t put a price tag on.
This is the Stata code I used, enjoy!
clear
set seed 123 //make this reproducible by setting the seed
set obs 10000 //10,000 simulations
*Summary values
gen max_bet = . //maximum bet in each simulation
gen rounds = . //total number of bets in each simulation
*Simulation-specific values
gen bet = . //how much the current bet is worth
gen total = . //how much money I have in total after winning/losing the current bet
gen n = _n //keep track of the bet number
qui{ //qui is short for quietly, supressing Stata output - this speeds up the simulations, but looks less cool
forvalues i = 1/10000 { //simulating 10,000 runs of bets
replace bet = . //reset bet amounts
replace total = . //reset total amounts
replace bet = 1 in 1 //starting bet of £1
*If I win the bet
if runiform() < 18/37 { // 18/37 because if betting on red, I'd win 18 out of 37 times on a fair roulette wheel
replace total = 1 in 1 //I won £1, woop
replace bet = 1 in 2 //The next bet stays at £1 if I win
}
*If I lose the bet
else {
replace total = -1 in 1 //Ah, I lost £1, so now have -£1. Woops.
replace bet = 2 in 2 //Every time I lose a bet, I double the bet amount, so the next bet goes up to £2
}
local j = 2 //Current bet round
local k = 3 //Next bet round
while total[`j'-1] < 100 { //A while loop means I'll keep betting until I've won £100
if runiform() < 18/37 { //same probability of winning as above
replace total = total[`j'-1] + bet[`j'] in `j' //if I win, the total increases by the bet amount
replace bet = 1 in `k' //and the next bet resets to 1
}
else {
replace total = total[`j'-1] - bet[`j'] in `j' //if I lose, the total decreases by the bet amount
replace bet = bet[`j']*2 in `k' //and the next bet doubles
}
local j = `j' + 1 //next round of betting
local k = `k' + 1 //next round of betting
}
su n if total == 100 //find the number of rounds of betting it took to make £100
replace rounds = r(min) in `i'
su bet //find the maximum bet I had to make to make £100
replace max_bet = r(max) in `i'
}
}
keep max_bet rounds //only need to know the maximum bet and the number of rounds it took to make £100
gen losing_streak = ln(max_bet)/ln(2) //each bet is 2 to the power of something - it starts out at 0 and increases by 1 each time (since the bet doubles).
//Using logs means I can find the length of my longest losing streak
su, d
hist losing, bin(19) xtitle("Longest losing streak") //Histogram of longest losing streak