How to use
- Enter the min and max. Both ends can come up.
- Choose how many numbers you want, up to 1,000.
- Choose No repeats for unique numbers, like drawing raffle tickets.
- Press Generate for a fresh draw. The quick picks set up a die, a coin or a lottery draw.
How the fairness works
- Your browser’s secure generator,
crypto.getRandomValues, supplies 32 random bits: a number from 0 to 4,294,967,295. - We need a number from a range of n values. Taking the remainder after dividing by n would favour small numbers whenever n doesn’t divide 2³² evenly.
- So we discard any draw at or above the largest multiple of n and draw again. This is the “simple discard method” in NIST SP 800-90A.
- Every number in your range then has exactly the same chance: 1 in n.
Examples
- 1 to 100: each number has a 1 in 100 (1%) chance. Only 96 of the 4,294,967,296 possible draws are discarded.
- Lottery, 6 from 1 to 49 with no repeats: there are 13,983,816 possible sets.
- A die (1 to 6): each face has a 1 in 6 chance.
Why discarding matters
Imagine a generator that only made 3 bits (0 to 7) and we wanted a die. Using the remainder after dividing by 6, faces 1 and 2 would come up twice as often as the others:
| Face | Draws that give it | Chance |
|---|---|---|
| 1 | 0, 6 | 2 in 8 |
| 2 | 1, 7 | 2 in 8 |
| 3 | 2 | 1 in 8 |
| 4 | 3 | 1 in 8 |
| 5 | 4 | 1 in 8 |
| 6 | 5 | 1 in 8 |
Discarding 6 and 7 makes every face 1 in 6.
How "no repeats" works, and what not to use it for
For unique numbers we shuffle the range part-way (a Fisher–Yates shuffle) or, for huge ranges, simply redraw any repeat. Both keep every possible set equally likely.
Don’t use this page for passwords or keys: results appear on screen and in your recent calculations.
Want to summarise a list of draws? Paste them into the average calculator.