Random number generator
Set the range and how many, get random numbers instantly.
How do I pick a random number between 1 and 10?
Set From to 1 and To to 10 and press Generate. Every whole number in the range, both ends included, is equally likely.
How random are these numbers?
They come from your browser's cryptographic random number generator (crypto.getRandomValues), the same source used for security keys — not a predictable pattern. Nothing is sent to a server.
How do I pick several numbers without repeats?
Set "How many" and choose "No repeats" — like drawing numbered balls from a hat. You cannot ask for more unique numbers than the range holds: 1 to 5 gives at most 5.
Can I use it for a raffle or giveaway?
Yes: number the entries, set the range to match, and generate one winner, or several with no repeats. For anything with legal rules, such as a sweepstakes, follow the rules that apply to you.
Can it pick decimals or negative numbers?
Negative ranges work — for example −10 to 10. It picks whole numbers only; for a decimal between 0 and 1 to two places, pick from 0 to 100 and divide by 100.
Why do I sometimes get the same number twice?
With repeats allowed, each draw is independent, so a repeat is normal. Drawing 5 numbers from 1 to 10 gives a repeat about 69.8% of the time. Choose “No repeats” if every number must differ.
What “random” means here
Each whole number from the lowest to the highest value has the same chance of being picked, and each draw is independent of the earlier ones. With the “No repeats” option the generator keeps drawing until it has the count you asked for, discarding duplicates, so every set of that size is equally likely. Because the generator draws from the browser’s cryptographic source rather than a formula seeded with the clock, the sequence cannot be predicted from earlier results.
Worked examples of the odds
Picking one number from 1 to 100 gives each number a 1 in 100 chance. Drawing 5 numbers from 1 to 10 with repeats allowed produces at least one repeat with probability 1 − (10 × 9 × 8 × 7 × 6) ÷ 10⁵ = 69.8%. With 23 draws from 365 values the chance of a repeat passes 50%, at 50.7%, which is the birthday problem. Choosing 6 distinct numbers from 49 can be done in 13,983,816 ways, and each combination is equally likely.
Common mistakes
Expecting results to even out is the gambler’s fallacy: after five low numbers, the next draw is no more likely to be high. Another is treating a short run of numbers as proof of a fault; patterns, repeats and streaks appear regularly in random data. Entering a range where the lowest value is larger than the highest is harmless, since the generator swaps them, but a range of a single number always returns that number. And for legal drawings such as sweepstakes, keep a record of the entries, the range and the result, and follow the rules that apply.
Sources: OpenStax Introductory Statistics (probability topics, counting and combinations); the browser Web Crypto API, crypto.getRandomValues, as specified by the W3C. Related: dice probability calculator, lottery odds calculator, birthday paradox calculator and permutation and combination calculator.