What is a random number generator for?
A random number helps whenever a choice has to be fair. Pick a winner from the comments on a giveaway, decide the order of presentations, run a Secret Santa draw, replace a lost die during a board game or take a random sample from a customer list. Teachers use it to call on students at random. Because the computer decides, nobody can accuse you of favouritism.
How it works
- Range: enter the minimum and maximum. Both ends are included, so 1 to 6 behaves exactly like a die. Negative numbers are allowed.
- How many: choose how many numbers to draw, up to 1,000 at once.
- Duplicates: with dice the same number may come up again. For a raffle you want unique numbers, so nobody wins twice.
- Order: keep the numbers in the order they were drawn, or sort them ascending for a tidy list.
How random is it?
Many simple generators use Math.random(), a pseudo-random function that is fine for games but not designed for security. This tool uses crypto.getRandomValues(), the cryptographic generator built into every modern browser and also used for passwords and encryption. On top of that we use rejection sampling: raw values that would introduce a tiny bias are discarded, so every number in your range has exactly the same chance.
Everything happens in your browser. Nothing is stored or sent, and we cannot influence or see the result.
Example: choosing giveaway winners
Your giveaway post has 248 comments and you want three winners.
- Number the comments from 1 to 248 (for example in the order they were posted).
- Enter minimum 1, maximum 248 and how many 3, and choose "unique numbers only".
- Suppose you get 17, 203 and 88: the 17th, 203rd and 88th comments win.
The chance that a given entrant is among the three winners is 3 ÷ 248 ≈ 1.2%. For transparency, take a screenshot of the result or draw live on a stream.
Handy settings
| What do you need? | Min | Max | How many | Unique |
|---|---|---|---|---|
| Roll a die | 1 | 6 | 1 | no |
| Roll two dice | 1 | 6 | 2 | no |
| Coin flip (1 = heads) | 1 | 2 | 1 | no |
| Powerball white balls (5 of 69) | 1 | 69 | 5 | yes |
| Random order for 25 students | 1 | 25 | 25 | yes |
| 4-digit PIN | 0 | 9 | 4 | no |
Drawing 25 unique numbers from 1 to 25 gives you a random order of the whole group: a fair way to form teams or split up a rota.
Random numbers in school and work
Random numbers are not just for games. Researchers use them to assign people to a test group and a control group, so that the groups differ only by chance. Auditors pick random invoices to check, quality inspectors pick random items from a production run, and survey teams pick random addresses. Teachers can use a random sequence to set the order of oral exams, which is fairer than going alphabetically every time.
Odds with random numbers
In a fair range every number has the same chance; from 1 to 100 that is 1%. Still, a repeat shows up surprisingly often: draw 10 numbers from 100 with repeats allowed and the chance of at least one duplicate is about 37%. It is the same effect as the birthday paradox. To work out exact odds, use the probability calculator.
Frequently asked questions
Is the result truly random?
The numbers come from your browser's cryptographic generator (crypto.getRandomValues). It is unpredictable enough for passwords and encryption, so certainly for raffles and games.
Is the maximum included?
Yes. Both the minimum and the maximum can be drawn, so 1 to 6 gives 1, 2, 3, 4, 5 and 6.
Can I see the same draw again?
No. Every draw is new and nothing is saved. Take a screenshot if you want to keep the result or show it to participants.
How do I pick a winner from a list of names?
Number the names, draw a number between 1 and the number of names, and see which name has that number. For several winners, choose "unique numbers only".
Can I generate negative numbers?
Yes. Enter for example −10 as the minimum and 10 as the maximum; 0 can be drawn too.
How many numbers can I draw at once?
Up to 1,000 per draw. With unique numbers, the count cannot exceed the number of values in your range.
Last reviewed: 2026-10-06. Results are estimates for information only.