NotesExperiment

I bought ₩1 million of lottery tickets 20,000 times: the odds, checked with a simulator

With Lotto Lab's draw engine, I ran a 1,000-game experiment 20,000 times, 20 million games in all. The jackpot came up twice, and every ₩1 million spent returned ₩180,000 on average in 4th and 5th prizes.

Seven lottery balls and the jackpot odds, 1 in 8,145,060

Lotto Lab started with a simple question: "What happens if I buy ₩1 million of Korea's Lotto, 1,000 games?" Actually buying them felt like a waste of money, so I built a simulator that draws exactly by the real rules. This time I took that engine as is and repeated the same experiment 20,000 times. That is 20 million games in all, ₩20 billion of simulated tickets.

The math first

Lotto 6/45 picks 6 numbers from 1 to 45. The number of possible combinations, choosing 6 of 45, is 8,145,060. Each draw picks 6 winning numbers and 1 bonus number.

Counting the cases by how many of my 6 numbers match, for each prize tier, gives this:

PrizeConditionCasesOdds per game
1stall 6 match11/8,145,060
2nd5 + bonus match61/1,357,510
3rd5 match2281/35,724
4th4 match11,1151/733
5th3 match182,7801/44.6

Here is where 3rd prize's 228 comes from. There are 6 ways to match 5 of the 6 winning numbers, and the remaining slot must be one of the 38 numbers that are neither winning numbers nor the bonus. 6 × 38 = 228. For 5th prize, 3 of the winning numbers (20 ways) times 3 of the other 39 (9,139 ways) gives 182,780.

If you buy 1,000 games, the chance of hitting the jackpot at least once is 1 − (1 − 1/8,145,060)1,000, about 0.0123%. You would need to spend ₩1 million more than 8,000 times to expect it once.

How I ran it

I loaded the draw code that actually runs on the Lotto Lab website (core.js) unchanged and ran it in Node.js.

  • Random numbers come from the xoshiro128** generator. When picking a number from 1 to 45, values from the range that does not divide evenly are thrown away and drawn again, so no number comes up more often than another.
  • The 6 numbers are picked with a partial Fisher–Yates shuffle of the 45 balls. Every combination is equally likely.
  • One experiment is "draw the winning numbers once, then buy 1,000 auto-pick games". I repeated it 20,000 times.
  • The seed is fixed, so running the same code again gives the same result.

Computing all 20 million games took 14 seconds on an M2 Pro Mac.

Results: almost exactly the theory

PrizeTimes hitExpected in theoryPer 1,000 games
1st22.460.0001
2nd1514.730.0008
3rd558559.850.028
4th27,43627,292.621.37
5th448,879448,811.9222.44

In 20 million games, the jackpot came up twice, close to the expected 2.46. ₩20 billion of tickets, two jackpots.

Per experiment, it looks like this.

  • In 2.83% of the 20,000 experiments, 3rd prize or better came up at least once. That matches the theoretical 2.83%.
  • 4th prize or better came up in 75.3%. Three times out of four, you hit 4th or better at least once.
  • Not one experiment won nothing at all. With 1,000 games, 5th prize came up at least 7 times and at most 42 times.

In money

In the real Lotto, only 4th prize (₩50,000) and 5th prize (₩5,000) have fixed amounts. The 1st to 3rd prizes change each draw with ticket sales and the number of winners, so here I added up only the 4th and 5th prizes.

Experiments01,0002,0003,000₩20,000–₩40,000: 1 experiment₩40,000–₩60,000: 38 experiments₩60,000–₩80,000: 282 experiments₩80,000–₩100,000: 1,049 experiments₩100,000–₩120,000: 1,807 experiments₩120,000–₩140,000: 2,215 experiments₩140,000–₩160,000: 2,581 experiments₩160,000–₩180,000: 2,637 experiments₩180,000–₩200,000: 2,210 experiments₩200,000–₩220,000: 2,047 experiments₩220,000–₩240,000: 1,574 experiments₩240,000–₩260,000: 1,147 experiments₩260,000–₩280,000: 867 experiments₩280,000–₩300,000: 550 experiments₩300,000–₩320,000: 374 experiments₩320,000–₩340,000: 274 experiments₩340,000–₩360,000: 150 experiments₩360,000–₩380,000: 95 experiments₩380,000–₩400,000: 31 experiments₩400,000–₩420,000: 39 experiments₩420,000–₩440,000: 9 experiments₩440,000–₩460,000: 14 experiments₩460,000–₩480,000: 5 experiments₩480,000–₩500,000: 2 experiments₩500,000–₩520,000: 1 experiment₩520,000–₩540,000: 1 experiment₩20k₩100k₩200k₩300k₩400k₩500kMean ₩180,810Fixed prizes returned (4th ₩50,000 + 5th ₩5,000) · 20,000 experiments of ₩1,000,000
Fixed 4th and 5th prizes returned when buying ₩1,000,000 worth (1,000 games), repeated 20,000 times. The luckiest run got back ₩535,000, and no run recovered the ₩1,000,000 spent.
Fixed 4th and 5th prizes returned per ₩1,000,000 spentAmount
Mean₩180,810
Median₩175,000
Bottom 10% to top 10%₩105,000 – ₩265,000
Luckiest experiment₩535,000
Unluckiest experiment₩35,000

The mean of ₩180,810 is almost the same as the calculated expected value of ₩180,435 (22.44 fifth prizes × ₩5,000 + 1.365 fourth prizes × ₩50,000). In other words, spending ₩1 million brings back about ₩180,000 in fixed prizes. Of the 20,000 experiments, none got its money back from fixed prizes alone. Even the luckiest one lost ₩465,000, and half of them lost more than ₩825,000.

After seeing the numbers

You can work all of this out by calculation, but running it yourself changes how it feels. "1 in 8.14 million odds of a jackpot" is too big a number to grasp, but "₩20 billion of tickets, two jackpots" lands a little better.

One thing I found interesting is that 5th prize comes up more often than you would think: 22 times on average in 1,000 games. With win notices coming in again and again, it is easy to feel that "a bit more and I'll get there." But all 22 of them together add up to ₩110,000.

On Lotto Lab you can run the same experiment right in your browser. Raise the purchase to ₩10 million, ₩100 million or ₩1 billion, and see for yourself how far away the jackpot is. All the calculations run in your browser, and no real money is involved.

Tool in this note

Lotto Lab

Would ₩1M of tickets win?

Learn more

Lucian · runs lucianLabs

I build the tools I need for working with AI agents and write down the numbers and mistakes behind them. If something here is wrong, let me know.