How to use the random number generator
Enter the lowest and highest numbers you want — both are included — and how many numbers to draw, then press Generate. Check No duplicates to draw each number at most once, like pulling numbered tickets from a hat. Check Sort results to list them from smallest to largest. Use the Copy button to paste the list into a spreadsheet, document or message. Negative numbers work too.
How the numbers are generated
The numbers come from crypto.getRandomValues, the cryptographically secure random number generator built into your browser, rather than the general-purpose Math.random. Everything runs on your device; nothing is sent to a server, and nobody — including us — can predict or see the results.
Turning a raw random value into a number in your range takes care. The quick method — take the remainder after dividing by the range size — slightly favors the lowest numbers whenever the range doesn't divide the raw range evenly. Imagine a source that produces 0 to 9 and a range of three numbers: remainders give 0 four times (from 0, 3, 6 and 9) but 1 and 2 only three times each. This generator uses rejection sampling: it discards the few raw values at the top that would cause that imbalance and draws again, so every whole number in your range has exactly the same chance.
With or without duplicates
With duplicates allowed, each draw is independent, like rolling a die again and again, and repeats show up more often than intuition suggests. Drawing 5 numbers from 1 to 100, the chance of at least one repeat is about 9.65%. With no duplicates, you cannot draw more numbers than the range holds — 1 to 10 gives at most 10 unique numbers — and the calculator warns you if you try.
Practical uses
- Picking a winner. Number the entries from 1 to N and draw one. For three winners, draw three with no duplicates.
- Dice and games. 1–6 for a standard die, 1–20 for a d20, duplicates allowed. For several dice, set how many to the number of dice.
- Random samples. Choose 30 survey respondents from a numbered list of 500 with no duplicates.
- Shuffling an order. Set the range to 1–N, draw N numbers with no duplicates and leave sorting off to get a random order for presentations, teams or a playlist.
- Classroom. Call on students by number or generate practice problems.
The odds of a specific number
With a range of N whole numbers, each draw lands on any particular value with probability 1 in N — 1 in 100 for the range 1 to 100. Over k independent draws, the chance that a given number appears at least once is 1 − (1 − 1/N)k. Past results never change the next draw, so a number that hasn't come up in a while is not "due."
Frequently asked questions
Are these numbers truly random?
They come from a cryptographically secure generator seeded by your operating system, which is unpredictable enough for drawings, games, sampling and security uses. Regulated lotteries and gambling require certified hardware and audits, so don’t use any website for those.
Are the minimum and maximum included?
Yes. A range of 1 to 10 can produce both 1 and 10, and each of the ten numbers is equally likely.
Can I generate random decimals?
The generator produces whole numbers. For decimals, scale up and divide: for two decimal places between 0 and 1, generate numbers from 0 to 100 and divide each by 100.
Why do I get repeated numbers?
With duplicates allowed, every draw is independent, so repeats are normal — about a 1 in 10 chance with five draws from 1 to 100. Check "No duplicates" to prevent them.
Is the result saved anywhere?
No. Numbers are generated in your browser and disappear when you change the inputs or leave the page, so copy them if you need a record.
Last updated: October 8, 2026