Random Number Generator
Draw up to 1,000 numbers from any range, whole or with up to 6 decimal places, skip the numbers you list, or switch to Lottery for a sorted ticket and a bonus ball.
Each number has a 1 in 100 chance per draw.
Set the range and press Generate.
Any range, one number or a long list
Two fields set the range and a third sets the length of the list: Min, Max and How many. Every number from Min to Max, both ends included, has the same chance on each draw, and the line above the results states that chance as 1 in N. Decimal places turns the range into steps of 0.1, 0.01 and smaller, and Exclude takes the numbers you list out of the draw.
For a single number on a spinning wheel, the random number wheel builds one from any Min, Max and Step, and the 1 to 10 wheel and the 1 to 100 wheel explain their odds spin by spin. This page covers long lists, negative and very large ranges, decimals and lottery tickets.
Sample draws
Each row is one press of Generate with the settings in the first column.
| Settings | Result |
|---|---|
| 1 to 10, 5 numbers | 6 · 5 · 2 · 5 · 4 |
| 1 to 49, 6 numbers, no repeats, smallest first | 4 · 12 · 15 · 38 · 41 · 48 |
| −50 to 50, 4 numbers | 40 · −26 · 18 · 34 |
| 1 to 1,000,000,000,000, 2 numbers | 690,049,396,299 · 958,559,513,721 |
| 0 to 9, 10 numbers, no repeats | 5 · 2 · 4 · 8 · 7 · 3 · 0 · 9 · 1 · 6 |
| 1 to 6, 8 numbers, largest first | 6 · 6 · 5 · 5 · 4 · 2 · 2 · 2 |
| 0.00 to 1.00, 5 numbers, 2 decimal places | 0.30 · 0.79 · 0.80 · 0.30 · 0.43 |
| 1 to 20, 5 numbers, excluding 7, 13, no repeats, smallest first | 3 · 8 · 12 · 17 · 20 |
A sample from this generator; press Generate for new results.
How to draw numbers
- Keep Mode on Range. Type the smallest allowed number in Min and the largest in Max. Both ends can come up.
- Set How many, from 1 to 1,000.
- Leave Decimal places on Whole numbers, or pick 1 to 6 places to draw in steps of 0.1, 0.01 and smaller. Min and Max must sit on that grid.
- List any numbers to skip in Exclude, separated by commas. A range such as 20-25 skips both ends and everything between them.
- Tick No repeats if no number may appear twice in the list. How many then has to fit inside what is left of the range.
- Choose Sort: Draw order keeps the numbers as they came out, Smallest first and Largest first put them in order.
- For a lottery ticket, switch Mode to Lottery, set Numbers per ticket and Highest number, and fill in Bonus ball up to only if your game has one.
- Press Generate, or Enter in any field. Copy puts the result on the clipboard: a list one number per line, a lottery ticket on one line.
The draws use the browser's random source, the same one the wheels use: How it works.
How many numbers a range holds
A range holds Max − Min + 1 whole numbers, because both ends count. That count is the N in the chance line under the buttons.
Scroll the table sideways for more columns.
| Min | Max | Numbers in the range | Chance of one number per draw |
|---|---|---|---|
| 1 | 6 | 6 | 1 in 6 |
| 1 | 10 | 10 | 1 in 10 |
| 0 | 99 | 100 | 1 in 100 |
| 1 | 100 | 100 | 1 in 100 |
| −50 | 50 | 101 | 1 in 101 |
| 1 | 1,000 | 1,000 | 1 in 1,000 |
| 1,000 | 9,999 | 9,000 | 1 in 9,000 |
| 1 | 1,000,000,000,000 | 1,000,000,000,000 | 1 in 1,000,000,000,000 |
| −1,000,000,000,000 | 1,000,000,000,000 | 2,000,000,000,001 | 1 in 2,000,000,000,001 |
Computed exactly on this site: count of whole numbers from Min to Max.
Example: two draws that match
With No repeats off, draws are independent. Two draws from 1 to 1,000 make 1,000,000 ordered pairs, and 1,000 of those pairs repeat the same number, so the second draw matches the first 1/1000 of the time (0.10%).
In the widest range, −1,000,000,000,000 to 1,000,000,000,000, the second draw matches the first 1 in 2,000,000,000,001 times.
Example: 25 prize tickets from 1 to 1,000
Tickets are numbered 1 to 1,000 and 25 prizes go to 25 numbers. With No repeats off, the 25 draws are independent, so the list repeats a ticket 26.10% of the time and holds 24.70 different numbers on average. A given ticket is in the list with chance 2.47%.
Tick No repeats and every list holds 25 different tickets, so a given ticket wins with chance exactly 1/40 (2.50%) and no prize goes to the same ticket twice.
Chance of at least one repeat
With No repeats off, every draw is independent, so a list can repeat a number long before the range runs out.
Scroll the table sideways for more columns.
| Range | Draws | At least one repeat |
|---|---|---|
| 1 to 20 | 5 | 41.86% |
| 1 to 52 | 8 | 43.24% |
| 1 to 365 | 23 | 50.73% |
| 1 to 1,000 | 40 | 54.64% |
| 1 to 10,000 | 100 | 39.14% |
| 1 to 1,000,000 | 1,000 | 39.33% |
Computed exactly on this site: exact count of draw sequences.
Example: six numbers from 1 to 49 with No repeats
Set Min to 1, Max to 49, How many to 6 and tick No repeats. Each number then has a 6/49 chance (12.24%) to land in the list. There are 13,983,816 possible sets of six, so one exact set comes up 1 time in 13,983,816.
In Draw order the same six numbers can arrive in 720 different orders, which makes 10,068,347,520 possible lists. Smallest first folds those 720 orders into one, so sorting changes how the list reads, not the chance of any set.
Example: No repeats, step by step
Take 3 numbers from 1 to 5 with No repeats. The first draw has 5 choices, the second 4 and the third 3, so there are 60 draw orders, each with chance 1/60.
Sorted, those orders fold into 10 sets of three, each with chance 1/10, and any one number ends up in the list 3/5 of the time (60.00%).
Example: steps of 0.01, and two numbers left out
With Decimal places set to 2, the range 0 to 1 holds 101 values: 0.00, 0.01 and so on up to 1.00. Each of them comes up with chance 1/101 (0.99%) on every draw.
Exclude changes the count the same way. From 1 to 10 every number has a 1/10 (10.00%) chance; type 3, 7 in Exclude and the 8 numbers that are left each get 1/8 (12.50%), while 3 and 7 never appear.
Example: a lottery ticket with a bonus ball
In Lottery mode with 5 numbers per ticket and Highest number 69, there are 11,238,513 different sets, so one ticket matches the main numbers once in 11,238,513 draws.
Set Bonus ball up to 26 and the bonus comes from its own range of 26 values. Matching the main numbers and the bonus together then happens once in 292,201,338 draws, and the bonus alone matches 1/26 (3.85%) of the time.
Big ranges with No repeats
The generator never writes out the range. With No repeats it keeps a short record of the positions it has already taken and swaps each new pick past them, so the work depends on How many, not on how wide the range is. A list of 1,000 different numbers from −1,000,000,000,000 to 1,000,000,000,000 takes no more steps than a list of 1,000 from a range just big enough to hold them.
Frequently asked questions
Can Min be a negative number?
Yes. Min and Max accept any whole number from −1,000,000,000,000 to 1,000,000,000,000, so a range such as −10 to 10 works. Min only has to be no greater than Max.
How do I pick winners from a numbered list?
Number the entries, set Min to 1 and Max to the last number, then generate. For several winners, tick No repeats so nobody is drawn twice, and keep Draw order if the first number should get the first prize.
What is the most numbers one press can give?
How many goes up to 1,000. With No repeats, the range must also hold at least that many numbers. Two separate presses can share numbers, so for one long list without repeats, draw it in a single press.
Can I get the same list again later?
No. Each press of Generate draws a new list, and there is no seed field to repeat one. Use Copy to keep a list you will need again.
Why does the chance line change when I tick No repeats?
A no-repeat list cannot hold a number twice, so besides the 1 in N chance of the first draw, the line also gives the chance that a given number lands somewhere in the list: How many in N.
Can it give decimal numbers?
Yes. Pick 1 to 6 in Decimal places and the draw moves in steps of 0.1, 0.01 and smaller, with Min and Max on that grid. More places mean a narrower allowed range: with 6 places, Min and Max stay between −1,000,000 and 1,000,000.
How do I leave certain numbers out?
Type them in Exclude, separated by commas, for example 4, 13, 40-49. A range keeps both of its ends out. The chance line then counts only the numbers that are left, and No repeats can use only those.
How is Lottery mode different from No repeats?
Lottery always draws different numbers from 1 up to Highest number and lists them smallest first, so the ticket is ready to read. It can also add a bonus ball, and its chance line gives the odds of one ticket matching the whole draw.
Can the bonus ball show one of the main numbers?
Yes, when the two ranges overlap. The bonus ball is drawn on its own, from 1 to the number in Bonus ball up to, and it does not skip the main numbers already on the ticket.
Related wheels and tools
- Random Number Wheel 1-10One number from 1 to 10 on a wheel you can watch, with odds for ranges and repeats.
- Random Number Wheel 1-100One spin from 1 to 100, with ticket draws and guessing games worked out.
- Random Number WheelOne number you can watch land: a wheel built from Min, Max, Step and Exclude.
- Online Dice RollerDice totals instead of a flat range: 3d6 bunches up in the middle.
- Raffle GeneratorWhen the tickets carry names instead of numbers: winners, alternates and a list hash you can publish.