Random Number Generator
Draw one or thousands of random numbers in a range you set, with a no-repeat option for draws and a normal distribution option
Your data stays with you. Conversion happens inside the browser; nothing is sent to a server.
Did this tool do the job?
Thanks, your feedback came through.
How it works
Type the count in the left box, then the start and end of the range below it; the numbers appear on the right straight away. Example: a class of 32 students and you need to pick five at random. Type 5 as the count, 1 as the lowest and 32 as the highest, and keep "No — no repeats"; no student number can come up twice. For dice, where every roll is independent, choose "Yes — each number is independent": ask for 10 numbers from 1 to 6 and the same face can come up several times, just like a real die. The highest number is part of the range, so 6 can come up in 1–6. For decimals, pick the number of decimal places: with 2 places, 1 to 5 gives values like 3.47, and no-repeats works with those steps too. Type decimals with a point (2.5); a thousands comma (1,000) is also read. If the range does not hold enough different numbers (six unique numbers from 1–5, say), the tool refuses and says why. There is no "generate again" button: retype the count or change any setting and a fresh list is drawn. The maximum is 10,000 numbers per draw. Sorting "Smallest first" makes a set of lottery numbers easy to read. Because every change redraws the list, copy or download it if you need to keep it.
This tool is also known as random number generator, random number between 1 and 100, random number picker, random number generator no repeats, lottery number generator.
What is Random number?
A random number is a value that no rule can predict in advance. A computer cannot roll real dice; browsers instead offer a source fed by unpredictable events the operating system collects, such as hardware timing. This tool uses that source, crypto.getRandomValues, the same one used to create passwords and keys. To keep every value in the range equally likely, draws that fall in the uneven top end of the source are discarded, so in 1–100 the number 1 is exactly as likely as 100.
What is Normal distribution?
The normal distribution (the Gaussian or bell curve) describes values that bunch around an average and thin out further away. Two numbers define it: the mean sets the center and the standard deviation sets the spread. About 68 percent of values lie within one deviation of the mean and about 95 percent within two. This tool uses the Box-Muller method to turn two equal-chance numbers into two normal values; the result is unbounded, so rare extreme values can appear.
What is the difference between drawing with and without repeats?
With repeats, every number is independent of the ones before: the ball goes back in the bag, and a second roll of 1–6 can be another 6. Without repeats, a drawn number is removed: 6 numbers drawn from 1–59 are all different, and the count can never exceed the size of the range. Raffles, order numbers and lotteries are draws without repeats; dice, coin flips and simulated independent measurements are draws with repeats. The wrong choice breaks the result: a raffle run with repeats can pick the same person twice.
Is it really random? Modulo bias and the secure source
Many simple generators compute "big random number modulo range". When the range does not divide the source size evenly, small numbers come up slightly more often; this is modulo bias. This tool throws away any draw that lands in the uneven leftover part and draws again (rejection sampling), so in 1–6 every face has exactly a 1/6 chance.
The source is crypto.getRandomValues, the generator browsers provide for cryptography, not Math.random. The draw runs on your device; no number is sent to a server or saved. That also means the result cannot prove itself to anyone else: there is no seed or receipt to check later. For a draw others must trust, share your screen or record it while you generate.
- 60,000 rolls of 1–6 give each face about 10,000 times
- In a no-repeat draw, a count larger than the range is refused with a reason
- The highest number is included: 100 can come up in 1–100
- Up to 10,000 numbers per draw
Which setting for which job
Raffles, prize draws, lottery picks, assigning order numbers: keep "No — no repeats". For a draw like the UK Lotto (6 numbers from 59), set the count to 6, the range to 1–59 and the order to smallest first.
Dice, coin flips (1–2), random samples where each try is independent: choose "Yes — each number is independent". Here the count may be larger than the range; 100 numbers from 1–2 is the same as flipping a coin 100 times.
For experiments, homework or test data that should cluster around an average, choose "Normal (Gaussian)": the two boxes turn into mean and standard deviation. A mean of 170 and a deviation of 10 gives numbers that look like heights in centimeters; about two thirds fall between 160 and 180. The result line also shows the actual mean of the sample, which drifts from the target in small samples. Decimal places switch to 2 by default in this mode.
Frequently asked questions
How do I get a random number between 1 and 100?
Type 1 in the left box (for one number), 1 in the lowest box and 100 in the highest box. The number appears on the right at once. For another number, delete the count and type it again, or change any setting; each change draws afresh.
How do I stop the same number from coming up twice?
Set "Can the same number come up twice?" to "No — no repeats". Every number in the list is then different. If the count is larger than the number of values in the range (12 numbers from 1–10, for example), the draw is impossible; the tool says so and asks you to lower the count.
Are these numbers fair enough for a raffle or giveaway?
They come from the browser's cryptographic random source and a method that keeps every value equally likely, so no number is luckier than another. But the draw happens on your device, so the result does not prove itself to others. For a public giveaway, run it while sharing your screen or recording it.
Are the numbers or settings sent to a server?
No. The numbers are generated inside your browser and never leave your device; nothing is logged or stored. Once the page has loaded, it keeps working with the internet switched off.