Random number generator
Pick random numbers in any range, draw without repeats, or paste a list to randomise it or pick winners.
Runs in your browser
Your numbers will show up here
Set the range and press Generate. Nothing is picked until you do.
Next step
Category: Math 2
- Percentage Calculator
- Random Number GeneratorThis page
How the draw stays fair
Every number comes from your browser’s cryptographic random number generator, crypto.getRandomValues – the same source browsers use for encryption keys. Earlier results tell you nothing about the next one, and the page doesn’t send anything anywhere.
Turning a random 32-bit value into, say, a number from 1 to 6 by taking the remainder would make some numbers slightly more likely than others. To avoid that, values from the uneven tail are thrown away and drawn again, so every number in your range has exactly the same chance.
With No repeats, numbers are drawn without being put back, like balls from a lottery drum: once a number comes up, it can’t come up again in the same draw. Shuffling a list uses the Fisher–Yates method, which makes every possible order equally likely.
Decimal places work the same way. A range of 0 to 1 with 2 decimal places is a draw from the 101 values 0.00, 0.01 … 1.00.
- Chance of each number
- P = 1 ÷ (max − min + 1)
- Values with d decimal places
- values = (max − min) × 10^d + 1
- Most numbers without repeats
- how many ≤ max − min + 1
- Possible orders of n entries
- n! = n × (n − 1) × … × 1
Examples
| What you want | Settings |
|---|---|
| Roll a die | Min 1, Max 6, How many 1 |
| Lottery-style picks, 6 from 49 | 1 to 49, 6 numbers, No repeats, Smallest first |
| Flip a coin | Min 0, Max 1 (0 = heads, 1 = tails) |
| Pick 3 winners from a list of names | From a list, Pick some, 3 |
| Random order for class presentations | From a list, Shuffle the whole list |
| A random price between £1 and £5 | Min 1, Max 5, 2 decimal places |
Questions
Are the numbers really random?
They come from your browser’s cryptographically secure random generator and are drawn so that every value has the same chance. Past results don’t affect the next draw, so a number that just came up is as likely as any other the next time you press Generate.
Can the same number come up twice?
Only if you choose Allow repeats. With No repeats, each value appears at most once per draw, so you can’t ask for more numbers than the range holds – 1 to 10 gives you at most 10.
How do I pick winners from a list of names?
Switch to From a list, paste the names one per line, choose Pick some and enter how many winners you need. Each line is one entry, so a name that appears on two lines gets two chances. Remove duplicates first if everyone should have exactly one chance.
Can I use this for an official lottery, raffle or prize draw?
It’s fine for classrooms, games, giveaways among friends and everyday decisions. For a regulated lottery or a public prize draw, follow the rules that apply where you are. Some require approved equipment, an independent witness or a record of how the draw was made, and a web page can’t stand in for those.
Can I use it to make passwords or PINs?
The random source is strong enough, but this page isn’t built for passwords: it doesn’t mix letters and symbols or check the length. Use the password generator in your password manager or browser instead.
Is my list sent anywhere?
No. The numbers are drawn and lists are shuffled right in your browser. Nothing you type is uploaded or saved.
Sources
The random source and the methods used on this page are described in these references.