Random Number Generator
Set your range, choose how many numbers you want, and whether repeats are allowed.
100 possible numbers, 1 to 100.
Repeats, and why the default is off
By default every number you draw is different. That is what you want for a raffle, a lottery line, or picking five seats out of thirty - the same ticket cannot win twice.
Turn repeats on when each draw should be independent, like simulating dice or generating a PIN. The distinction catches people out: drawing six numbers from 1 to 49 with repeats allowed is not a lottery line, it is six separate draws that happen to have been made together.
Where the randomness comes from
Numbers are drawn using your browser's cryptographic random number generator, not Math.random(). The difference matters more than it sounds. Math.random() is a pseudorandom generator seeded from a small amount of state, fine for shuffling a playlist and not fine for anything where someone has an incentive to predict the next value.
The result is then reduced into your range using rejection sampling rather than a modulo. Taking a 32-bit random number modulo 100 makes the numbers 1 to 96 very slightly more likely than 97 to 100, because 2^32 does not divide evenly by 100. The bias is tiny and it is real, and it compounds across a large draw. Rejection sampling discards the values that would skew it and draws again.
Proving a draw after the fact
Every generation produces a receipt containing the range, the seed and the results, so anyone can reproduce it. For a prize draw that is the difference between announcing a winner and being able to show your working. How the receipts work.
Picking from a list instead
If the numbers are standing in for something - names, entries, options - it is usually better to put the actual list into the name picker or the wheel. The receipt then records what was actually being chosen between, rather than an index somebody has to map back by hand.
Popular ranges
- 1 to 2A coin flip in number form. Useful when you want the result recorded as a value rather than a face.
- 1 to 3The smallest range where the odds stop feeling intuitive. Each number lands about 33.3% of the time.
- 1 to 4Four-way choice: quarters of a group, the four suits, or a d4 without the dice.
- 1 to 5Five options, 20% each. The usual shape for a shortlist you have already narrowed down.
- 1 to 6A standard die, without the die. The most-searched small range there is.
- 1 to 7Seven days, seven options. Common for picking a day of the week at random.
- 1 to 8Eight-way splits: bracket seeds, octagon positions, or a group of eight.
- 1 to 9Single digits excluding zero. Handy for grids, puzzles and Sudoku-style setups.
- 1 to 10The default mental range. Ten options, 10% each, easy to sanity-check.
- 1 to 12Twelve months, twelve hours, a dozen of anything.
- 1 to 15Fifteen options. Common for class sizes and small squad selection.
- 1 to 20A d20 without the dice. Also the standard range for a twenty-person list.