How to use the random number generator
Enter the smallest and largest number you want, choose how many numbers to draw and press Generate. Both limits are included, so a range of 1 to 6 can return any face of a die.
- How many can be anything from 1 to 1,000.
- Allow duplicates lets the same number appear more than once, like rolling a die several times. Leave it unchecked to draw unique numbers, like pulling raffle tickets from a hat.
- Sort results lists the numbers from smallest to largest instead of in the order they were drawn.
Use the Copy button to put the list on your clipboard, separated by commas.
How the numbers are chosen
The numbers come from the cryptographically secure random generator built into your browser, the same kind of source used for encryption keys. Nothing is sent to a server.
A common mistake when turning a random value into a range is to take the remainder after division. If the random source can produce 10 different values and you want a number from 1 to 3, the remainder method gives one result four chances and the others only three. To avoid this bias, the generator throws away the few raw values that would make the split uneven and draws again. Every number in your range therefore has exactly the same chance.
Example
To pick 6 lottery numbers from 1 to 49, set the minimum to 1, the maximum to 49 and how many to 6, leave duplicates off and tick Sort results. The result might look like 4, 11, 23, 30, 38, 47.
Good to know
- Without duplicates you cannot ask for more numbers than the range contains. From 1 to 10 you can draw at most 10 unique numbers.
- Negative numbers are allowed, for example a range from -50 to 50.
- Each press of Generate is independent of the previous one. Earlier results do not make any number more or less likely next time.
- For official draws, games of chance with real money or security purposes, follow the rules and tools required by the organizer.