Lottery Number Generator
The lottery number generator draws one random line with no repeated numbers: five of 69 plus a Powerball, five of 70 plus a Mega Ball, six of 49, or a format you set. Pick a preset or fill in your own range, then press Generate numbers.
Sources: Mega Millions, Virginia Lottery Updated
Quick presets
Custom settings
Lottery presets: Powerball, Mega Millions and 6 from 49
| Preset | Main numbers | Extra ball |
|---|---|---|
| Powerball | 5 different numbers from 1 to 69 | 1 Powerball from 1 to 26 |
| Mega Millions | 5 different numbers from 1 to 70 | 1 Mega Ball from 1 to 24 |
| 6 from 49 | 6 different numbers from 1 to 49 | None |
| Custom | Your own range and count | Up to 3, with their own range |
The Powerball format comes from the Virginia Lottery's Powerball page and the Mega Millions format from Mega Millions' own how-to-play page, both checked on October 16, 2026. Game formats change from time to time, so compare the preset with your play slip before you fill it in.
“6 from 49” is a generic format used by several national lotteries and is not tied to any one of them. It leaves out any bonus number that a lottery draws itself. For other games, such as ones with two extra balls, use Custom.
For Powerball alone, the Powerball number generator also lists the price, the drawing days and the odds of each prize.
How the lottery number generator draws a line
Main numbers are drawn without repeats. The page draws a whole number in the range, skips it if it is already in the line, and continues until the line is full. The line is then sorted from lowest to highest.
Extra balls are drawn the same way from their own range, which always starts at 1. An extra ball can therefore match a main number, as it can in the real games. The last five lines stay listed under the result.
Each number comes from the browser's cryptographic random generator, as described in how our randomness works. For whole numbers in any other range, with or without repeats, use the random number generator.
Jackpot odds for each lottery preset
The odds of a line follow from the format. A 6 from 49 game has 13,983,816 possible lines, the standard example in lottery mathematics. Powerball has 292,201,338 and Mega Millions 290,472,336, because the extra ball multiplies the number of main-number combinations by 26 or 24.
Does a lottery number generator improve your odds?
No. Every combination has the same chance in the official drawing, whoever or whatever chose it, so a generated line is no more likely to win than your own numbers. Earlier draws do not change the next one either.
Random lines tend to avoid popular patterns, such as birthdays or a straight row on the play slip. That only affects how many people would share a prize if the line won.
This page is not connected to any lottery, does not sell tickets and does not show results. Check a ticket with the official lottery, and play only with money you can afford to lose.
Questions about the lottery number generator
Can the same number appear twice in one line?
Not among the main numbers: a number that is already in the line is skipped and drawn again. An extra ball comes from its own range, so it can share a value with a main number, as it can in Powerball and Mega Millions.
Are my lines saved?
The last five lines stay listed under the result while the page is open. They are not stored or uploaded, and they are gone when you reload the page.
Can I play a game with two extra balls?
Yes. Choose Custom, set the main range and count, then enter up to three bonus balls and their highest number. Bonus balls in one line never repeat each other.
Sources
- Mega Millions: How to play — five different numbers from 1 to 70 and one Mega Ball from 1 to 24, $5 a play (checked October 16, 2026)
- Virginia Lottery: Powerball — five white-ball numbers from 1 to 69 and one Powerball from 1 to 26 (checked October 16, 2026)
- Wikipedia: Lottery mathematics — the 13,983,816 possible lines in a 6 from 49 game (checked October 16, 2026)