Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Lottery number generator

Pick random numbers for Powerball, Mega Millions or your own game, and see the exact odds of every match.

Private: calculated on your device. Nothing you type is sent anywhere.

Next: See how combinations like C(69, 5) are counted with the permutation and combination calculator.

What this lottery number generator does

It picks a random, valid set of numbers for Powerball, Mega Millions, or any "pick k of n" game you describe, and works out the exact odds of the jackpot. Use it for a quick pick when you'd rather not choose, or for an office pool.

A random pick, not a prediction. Every combination has exactly the same chance in a fair draw. No generator, pattern, "hot" number or past result can make one ticket more likely to win than another.

The current game formats

  • Powerball: five different white balls from 1 to 69, plus one red Powerball from 1 to 26. $2 per play.
  • Mega Millions: five different white balls from 1 to 70, plus one gold Mega Ball from 1 to 24. $5 per play, with a multiplier included. This format started with sales on April 5, 2025 and the first drawing on April 8, 2025. It has fewer Mega Ball numbers than before, which improved the jackpot odds from about 1 in 303 million to about 1 in 290 million.

How the odds are calculated

The order of the main numbers doesn't matter, so the number of possible main-number sets is a combination, C(n, k). Each one pairs with any of the m bonus balls:

jackpot odds = 1 in C(n, k) × m    where C(n, k) = n! ÷ (k! × (n − k)!)

The odds of matching exactly j main numbers count the ways to pick j of your k winners and k − j of the n − k losers:

P(j main, bonus) = C(k, j) × C(n − k, k − j) ÷ C(n, k) × (1 ÷ m)

For "no bonus", replace 1 ÷ m with (m − 1) ÷ m. The calculator uses exact whole-number arithmetic (BigInt), so the big numbers aren't rounded.

Worked example: Powerball

C(69, 5) = 11,238,513 sets of white balls. Times 26 Powerballs = 292,201,338. That matches the official jackpot odds of 1 in 292,201,338. Mega Millions works the same way: C(70, 5) × 24 = 12,103,014 × 24 = 290,472,336.

Powerball matchOdds
5 white balls + Powerball1 in 292,201,338.00
5 white balls , no Powerball1 in 11,688,053.52
4 white balls + Powerball1 in 913,129.18
4 white balls , no Powerball1 in 36,525.17
3 white balls + Powerball1 in 14,494.11
3 white balls , no Powerball1 in 579.76
2 white balls + Powerball1 in 701.33
1 white ball + Powerball1 in 91.98
0 white balls + Powerball1 in 38.32

Adding up the chances of all nine prize tiers gives overall odds of winning any prize of 1 in 24.87 for Powerball and 1 in 23.07 for Mega Millions, the same as the official figures.

How the numbers are picked

Numbers come from your browser's cryptographic random generator with rejection sampling, so each number is equally likely and there's no modulo bias. Main numbers are drawn without replacement, like balls from a drum, and sorted. The bonus ball is drawn separately.

Limitations

  • Game rules, prices and prizes are set by the lotteries and can change. Check the official game rules before you play.
  • The custom mode assumes the bonus ball comes from its own separate set of numbers. Games that draw the bonus from the same drum, or that need the numbers in order, have different odds.
  • Odds aren't payouts. Jackpots are shared between winners, and prize amounts vary by game and state.

Sources

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • Powerball: C(69, 5) × 26 = 1 in 292,201,338 ✓
  • Mega Millions (2025 format): C(70, 5) × 24 = 1 in 290,472,336 ✓
  • Powerball 5 white balls without the Powerball: 1 in 11,688,053.52 ✓
  • Powerball, any prize: 1 in 24.87 (matches the official chart) ✓
  • Mega Millions, any prize: 1 in 23.07 ✓
  • Custom 6 of 49, no bonus ball: 1 in 13,983,816 ✓
  • Edge: 6 numbers from 1 to 5 is impossible ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

What are the odds of winning the Powerball jackpot?

1 in 292,201,338. That's C(69, 5) × 26: about 11.2 million sets of white balls, times 26 possible Powerballs.

What are the odds of winning the Mega Millions jackpot?

1 in 290,472,336 since the April 2025 change: C(70, 5) × 24. Before that, with one more Mega Ball number, the odds were about 1 in 303 million.

Are quick picks or random numbers more likely to win?

No. In a fair draw every combination has the same chance. Quick picks and self-picked numbers win at the same rate.

Does picking unpopular numbers help?

It can't change your chance of winning. It may lower the chance of sharing a jackpot, since many people pick birthdays (1 to 31), but no pick is more likely to be drawn.

Related calculators