🎲 Random Number Generator
Generate one or many truly unbiased random numbers in any range — with or without repeats.
How the Random Number Generator Works
Set a minimum and maximum (both included), how many numbers you want, and whether repeats are allowed.
Numbers are generated with your browser's cryptographically secure random generator (crypto.getRandomValues)
rather than the ordinary Math.random() function, and a technique called rejection sampling removes the small
bias that simple "modulo" methods introduce — so every number in the range is exactly as likely as any other.
With "no repeats" switched on, the tool draws without replacement, like pulling numbered balls from a bag — handy for raffles, picking winners, assigning random order, or classroom activities. Nothing is sent to a server; the numbers are created on your device.
Formula
range = max − min + 1 limit = floor(2³² / range) × range repeat: r = random 32-bit integer until r < limit result = min + (r mod range)
Discarding values above the limit (rejection sampling) is what makes every outcome equally likely.
How to Use It
- Enter the lowest and highest number allowed.
- Choose how many numbers to generate.
- Tick "No repeats" if each number may appear only once, and "Sort" if you want them in order.
- Press Generate. Use Copy to paste the result elsewhere.
Frequently Asked Questions
Is this random number generator truly random?
It uses the browser's cryptographically secure random number generator, the same source used for security keys, together with rejection sampling so every number in your range has exactly the same probability. It is suitable for games, raffles, and sampling, though official lotteries use certified hardware.
How do I pick random numbers without duplicates?
Tick "No repeats". The generator then draws without replacement, so each number can appear at most once. You cannot ask for more unique numbers than there are values in the range.
Can I use this to pick a random winner?
Yes. Number your entries from 1 to the total count, set that as the range, and generate one number (or several with "No repeats" for multiple winners).
Related Calculators
- 🔐 Random Password Generator — Generate strong, secure passwords — entirely in your browser.
- 📊 Average Calculator (Mean, Median, Mode) — Get the mean, median, mode, range, and sum of any list of numbers.
- 📉 Standard Deviation Calculator — Sample and population standard deviation and variance, with a step table.
- 🧾 Bill Split Calculator — Split rent, groceries, or any shared bill unevenly by percentage.
Formula and content last reviewed: September 2026. All calculations run in your browser — nothing you enter is sent to or stored on our servers.
More Utility calculators
See all →✔ Reviewed by GelirLab Editöryal Ekibi · Last reviewed: September 2026 · How we check our calculators