How to use the random number generator
Type the lowest and highest number (commas appear as you type, handy for ticket numbers), say how many you want, and press Generate. Choose whole numbers or up to six decimal places. Tick No repeats to draw different numbers each time, such as six lottery-style picks, and Sort to put them in order. The quick ranges set up common jobs: one to ten, a six-sided or 20-sided die, or pick 6 of 49.
The other tabs do more. Pick a winner draws raffle winners from a list of names or from ticket numbers. Watch the draws stacks up to 100,000 draws into bars so you can see what fair looks like. What are the odds answers questions such as how likely a repeat is. Copy gives you the numbers as a comma list, one per line, or separated by spaces.
How a number is picked
The numbers are drawn before the drums move. When you press Generate, the page asks your browser for secure random numbers, the kind built for cryptography, and turns them into your range. The drums are a replay of that decision: a faster or longer roll cannot change a digit.
Turning a big random number into a small range is where many generators go slightly wrong. The browser hands over a random number from 0 to 4,294,967,295, which is 4,294,967,296 possible values. Take the remainder after dividing by the size of your range and some results come up a little more often, unless the range divides evenly into 4,294,967,296. A range of 1 to 6 does not: the remainder is 4, so the first four faces would each get one extra value.
4,294,967,296 mod 6 = 4
keep values 0 to 4,294,967,291, throw away 4,294,967,292 to 4,294,967,295 and draw again
kept value 17 → 17 mod 6 = 5 → 1 + 5 = 6
This page throws away the leftover values and draws again, so every number in your range gets exactly the same share. That happens about once in 1,073,741,824 draws for a range of six. For ranges larger than the browser can cover in one number, the page joins two or more of them and applies the same rule, so a range of 1 to a quadrillion is as even as 1 to 6.
No repeats works differently. The page picks from the full range, sets that number aside, picks from what is left, and so on. It never draws and checks, so a large no-repeat draw is as fast as a small one, and every possible ordered set is equally likely.
Is it truly random?
It is as random as your browser's generator, and that is good enough for any game, class or small raffle. Strictly, that generator is a pseudo-random one: a program seeded with enough unpredictable data from your device, built for cryptography. A physical source, such as radio noise, is called truly random, and the practical difference for choosing a number is nil.
The page never uses Math.random() for a draw. Browsers describe it as not cryptographically secure, and the program cannot choose or reset its starting point. Those traits are fine for a game's background effects and wrong for a fair draw.
Does "no repeats" change the odds?
Yes. Take 5 numbers from 1 to 10. With repeats allowed, each draw is separate, so the chance that a chosen number turns up at least once is 1 − 0.95, which is 41.0 percent. Without repeats, 5 of the 10 numbers are chosen, so the chance is exactly 5 in 10, or 50 percent.
The reverse question surprises people more. Draw 10 numbers from 1 to 100 with repeats allowed and there is a 37.2 percent chance that some number appears twice. In a group of 23 people, there is a 50.7 percent chance that two share a birthday.
What fair looks like
Fair does not mean even. Draw 100,000 numbers from 1 to 6 and each face is expected 16,667 times, but 95 percent of the time a face lands within about 231 of that, so counts such as 16,500 and 16,800 are normal. The shaded band in Watch the draws shows that range.
The page also runs a chi-square check: it adds up how far every bar is from its even share, scaled by the share, and compares the total with a limit that a fair generator exceeds only 5 percent of the time. So a fair generator fails the check about once in 20 runs on purpose. Press Repeat the check 20 times and you will usually see one or two failures, and that is the sign it is working.
Where the numbers come from
- Random numbers: the Web Cryptography API,
Crypto.getRandomValues(). MDN Web Docs says it fills your list with cryptographically strong values from a pseudo-random generator seeded with enough entropy, and that one call is limited to 65,536 bytes. Math.random(): MDN Web Docs says it is not cryptographically secure and the seed cannot be chosen or reset.- Random bit generators: NIST SP 800-90A Revision 1 (June 2015). Statistical tests: NIST SP 800-22 Revision 1a (April 2010), which itself says no set of statistical tests can certify a generator.
- The chi-square limits come from the standard table in the NIST/SEMATECH e-Handbook of Statistical Methods.
- Birthday, combinations and coupon-collector figures are exact arithmetic, checked by the page's tests and by simulation.
No laboratory has tested or certified this generator. Do not use it for gambling, lotteries, security keys, passwords or any drawing the law regulates.
Odds worth knowing
| Question | Answer |
|---|---|
| Ways to pick 6 numbers from 49 | 13,983,816 |
| Ways to pick a 5-card hand from 52 | 2,598,960 |
| Rolls of a die to see all six faces (average) | 14.7 |
| Draws until a repeat is more likely than not, from 1 to 10 / 1 to 100 / 1 to 1,000 | 5 / 13 / 38 |
| People until two share a birthday is more likely than not | 23 |
The Odds tab works these out for any range you type.
How to run a fair raffle
- Fix the list before the draw and share it. Late entries after the draw starts are the usual source of arguments.
- Number the entries or use the names exactly as listed, one line per ticket. A name that appears twice has two tickets.
- Say how many winners there are and how an absent winner is handled. The simplest rule is to draw one or two extra in the same sitting, in order.
- Draw once, in front of people or on a shared screen, and keep the draw record.
- If the prize has value or tickets are sold, check the raffle rules where you live first. Many places regulate them, and this page is not certified for that.
Tips and common mistakes
- A number is never "due". The generator has no memory, so after five 7s the next draw is still the same chance as any other.
- Real random sets look streaky and clumped. People expect them to be too even, so a smooth-looking list is the suspicious one.
- The same number can come up twice in a row. For a range of 100 that happens about once in 100 pairs.
- For a password or a key, use a password manager's generator. This page is built for fair choices, not secrets.
Questions
Is this number generator fair?
Yes. Each number comes from the browser's secure generator, and values that would favor a few numbers are thrown away and redrawn. Open Watch the draws to see 100,000 draws land near an even split.
Can two people get the same number?
Yes. Each draw is separate, and the page cannot know what anyone else drew. Within one draw you can switch on No repeats.
Why did I get the same number twice in a row?
Because draws do not remember each other. In a range of 1 to 100, two draws in a row match about once in 100 pairs.
Are my numbers saved or sent anywhere?
No, unless you press Share on Facebook or Copy the link. Those save the last result (the first numbers drawn and your range) on AerialQuote for 90 days so the link can show it. Names you paste into Pick a winner are never sent. The TikTok video is made in your browser and is not uploaded.
How do I post a number on Facebook or TikTok?
After a draw, press Share. Share on Facebook posts a link with a picture of the result. Make a video for TikTok records a 9:16 replay of the drums, then you download it or send it to TikTok from your phone's share sheet. Both carry the address aerialquote.com/random-number-generator so friends can draw their own.
Can I use it for a giveaway or a lottery?
It is fine for friendly draws among people who agree to the rules. If money, prizes from ticket sales or the law are involved, check the rules where you live first, and note that this page has not been certified.