Lottery Number Generator
Draws lottery number sets without repeats from five preset game matrices or a custom range, with bonus balls from a separate pool. Presets cover Powerball, Mega Millions (with the 1 to 24 Mega Ball pool used since April 2025), EuroMillions, EuroJackpot, and Lotto 6/49, and excluded numbers are removed from both pools before each draw.
This tool sends nothing over the network. Everything you enter is processed on your device and never reaches our servers.
Documentation
A lottery number generator draws sets the way a lottery machine does: each ball leaves its pool once and is not put back, so no number repeats within a set. The presets carry each game's published matrix. Powerball draws 5 white balls from 1 to 69 plus 1 red Powerball from 1 to 26. Mega Millions draws 5 from 1 to 70 plus 1 Mega Ball from 1 to 24, the smaller Mega Ball pool introduced with the April 2025 game change. EuroMillions draws 5 from 1 to 50 plus 2 Lucky Stars from 1 to 12, and EuroJackpot draws 5 from 1 to 50 plus 2 Euro numbers from 1 to 12. Lotto 6/49 draws 6 from 1 to 49; its bonus number is drawn by the lottery rather than chosen by players, so the preset has no bonus pool.
A custom game takes a count, a minimum, and a maximum for the main pool and the same three values for the bonus pool. A bonus count of zero means the game has no bonus ball, and a minimum of zero is allowed for games numbered from 0. Because numbers never repeat within a pool, digit games that allow repeats, such as Pick 3 and Pick 4, are not modeled. A batch holds up to 100 sets.
Each pick is taken uniformly at random from the numbers still in the pool and then removed, using the browser's standard random number generator. Excluded numbers are taken out of both the main and the bonus pool before the draw, so excluding 7 for Powerball also removes the red ball 7. When exclusions leave fewer numbers than a set needs, no sets are produced and a notice says which pool ran short. Sort order (ascending, descending, or the order drawn) changes only how a set is displayed. Settings holds the exclusion list and the sort order.
Every combination is equally likely, including 1, 2, 3, 4, 5, so a random set has exactly the same chance as one chosen by hand, and excluding numbers does not improve it. The practical advantage of a random set is that it avoids patterns many people play, such as birthdays from 1 to 31 or straight sequences; a jackpot won on a popular combination is more likely to be split. The Feeling Lucky? option shows the same six numbers every time, 4, 8, 15, 16, 23, 42, the recurring sequence from the television series Lost. They are a fixed set rather than a draw and do not fit every format: Powerball's red ball stops at 26.
Powerball has 69 x 68 x 67 x 66 x 65 / (5 x 4 x 3 x 2 x 1) = 11,238,513 ways to choose the white balls, and 26 choices of red ball, so one set wins the jackpot with probability 1 in 11,238,513 x 26 = 292,201,338. Mega Millions works out to 12,103,014 x 24 = 290,472,336. EuroMillions and EuroJackpot both have 2,118,760 main combinations times 66 pairs from 12, which is 139,838,160, and Lotto 6/49 has 13,983,816. Ten generated Powerball sets cover ten of those 292,201,338 combinations.
Random number selection removes personal bias from lottery entries and works across many scenarios beyond traditional ticket purchases.
- Weekly Lottery Play: Five fresh Powerball sets each week replace the habit of playing the same personal numbers, which carry the same odds but are more often shared with other players. The same batch can come from the Mega Millions or EuroMillions matrix instead.
- Office Pool Coordination: Twenty or more sets in one batch give each participant in a workplace lottery pool a line of their own, and the uniform format makes checking against the drawn results quick.
- International Lottery Exploration: The EuroMillions, EuroJackpot, and Lotto 6/49 presets enforce each game's pool sizes and bonus rules, so the sets are valid entries for lotteries in different countries.
- Custom Raffle and Fundraiser Draws: A custom range matches a local raffle or charity draw. Three numbers from a pool of 1 to 200 with no bonus pool fits a school fundraiser whose tickets are numbered 1 to 200.
- Probability and Statistics Education: Hundreds of sets for one format show how drawn numbers spread out. Each Powerball white ball should appear in about 5 of every 69 sets, roughly 7.2 percent, and students can compare that expectation with the observed counts.
- Superstition Testing: Personal unlucky numbers in the exclusion list never appear in any generated set. Removing them leaves the odds of every remaining combination unchanged, which makes a useful classroom point about perceived luck.
- Board Game and Party Number Selection: A custom game matching a board game's numbered drawing mechanic produces the needed draws in one batch and keeps play moving without manual shuffling or ball machines.
- Decision Making by Random Draw: One main number from a pool of 1 to 10 with no bonus pool works as a random decision maker for ten numbered options.
Inputs, outputs, and what the Lottery Number Generator computes
What the Lottery Number Generator asks for and what it returns, as a plain list. Defaults, units, and ranges are the ones the form loads with.
Inputs
- Lottery Game · default: Powerball (US)
- Main Numbers to Pick (numeric input) · default: 5 · range: 1 to 20
- Main Number Minimum (numeric input) · default: 1 · range: 0 to 999
- Main Number Maximum (numeric input) · default: 69 · range: 1 to 999
- Bonus Numbers to Pick (numeric input) · default: 1 · range: 0 to 10
- Bonus Number Minimum (numeric input) · default: 1 · range: 0 to 999
- Bonus Number Maximum (numeric input) · default: 26 · range: 1 to 999
- Number of Sets to Generate (numeric input) · default: 5 · range: 1 to 100
- Exclude Numbers (comma-separated) (text input)
- Sort Order · default: Ascending
Controls
Generate · Reset
Example
Powerball has 69 x 68 x 67 x 66 x 65 / (5 x 4 x 3 x 2 x 1) = 11,238,513 ways to choose the white balls, and 26 choices of red ball, so one set wins the jackpot with probability 1 in 11,238,513 x 26 = 292,201,338.