Worked answers
What your result means
Each number is drawn independently from the whole range, so with repeats allowed the same number can come up twice. Choose "every number is different" for things like picking winners or shuffling an order. The chance figure tells you how likely any single number is on one pick, which is useful for checking whether a result is as surprising as it feels.
How to use the Random Number Generator
- Enter the lowest and highest whole numbers you want (negative numbers work too).
- Choose how many numbers to generate, up to 1,000.
- Decide whether numbers may repeat.
- Press Generate as many times as you like; use Download CSV to keep a list.
Formula and worked example
range size = highest − lowest + 1chance per pick = 1 ÷ range sizeunbiased draw = lowest + (random 32-bit value mod range size), redrawing values that would bias the resultno repeats = draw again whenever a number has already been picked
Worked example: for a number between 1 and 16, the range size is 16, so each number has a 1 in 16 (6.25%) chance on every pick. Asking for 3 numbers with no repeats draws until 3 different numbers come up.
Chances for common ranges
| Range | Chance per pick | Chance a repeat appears in 5 picks |
|---|---|---|
| 1 to 6 | 16.67% | 90.74% |
| 1 to 10 | 10.00% | 69.76% |
| 1 to 16 | 6.25% | 50.01% |
| 1 to 20 | 5.00% | 41.86% |
| 1 to 50 | 2.00% | 18.64% |
| 1 to 100 | 1.00% | 9.65% |
The last column is the "birthday problem": repeats come up sooner than most people expect.
Assumptions and limits
- Numbers come from your browser's cryptographic random generator (crypto.getRandomValues), with rejection sampling so every number in the range is equally likely.
- The page itself shows no random result: press Generate. Nothing is stored or sent anywhere.
- Don't use it for lotteries, gambling or anything with legal requirements for certified randomness.
Frequently asked questions
Is this random number generator truly random?
It uses your browser’s cryptographic random source (crypto.getRandomValues), which is suitable for games, classroom draws and sampling. It is not a certified device for lotteries or gambling, which have their own legal requirements.
How do I pick a random number between 1 and 10?
Set the lowest number to 1 and the highest to 10, leave "how many" at 1 and press Generate. Each of the 10 numbers has a 10% chance of coming up.
Can I generate numbers without repeats?
Yes. Choose "No, every number is different". You can ask for as many unique numbers as there are in the range: up to 16 different numbers between 1 and 16, for example.
Why do I keep getting the same number?
Repeats are normal in random draws. With 5 picks from 1 to 20 there is about a 42% chance of at least one repeat, which surprises most people. The table on this page shows the odds for common ranges.
Can I use it to pick a winner?
Yes: number your entries, set the range to match, and generate one number (or several unique numbers for several winners). For transparency, share your screen or record the draw.
Related calculators
More free calculators
About this calculator
Written and maintained by Ahsan Khan. See how every number is calculated, and the test cases checked on every update, on the methodology page.
Sources
- Web Cryptography Level 2: the getRandomValues() method, W3C (World Wide Web Consortium) (accessed Oct 11, 2026)
- Fast Random Integer Generation in an Interval, Daniel Lemire, ACM Transactions on Modeling and Computer Simulation 29(1), 2019 (accessed Oct 11, 2026)
Found an error? Email a correction and include the link from “Copy link” so we can reproduce it.