🎲 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

  1. Enter the lowest and highest number allowed.
  2. Choose how many numbers to generate.
  3. Tick "No repeats" if each number may appear only once, and "Sort" if you want them in order.
  4. 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

Formula and content last reviewed: September 2026. All calculations run in your browser — nothing you enter is sent to or stored on our servers.

⚠️ This calculator is for general informational and educational purposes only. It does not constitute financial, tax, legal, or other professional advice, and results are estimates that may not reflect your exact situation. GelirLab.com and its owners accept no liability or responsibility for any decision made or action taken based on this tool. Always consult a qualified professional (CPA, financial advisor, or attorney) before making financial decisions.
Spotted a wrong result or outdated figure? Let us know — it helps keep every calculator accurate. 🚩 Report a problem

More Utility calculators

See all →

✔ Reviewed by GelirLab Editöryal Ekibi · Last reviewed: September 2026 · How we check our calculators

🔗 Embed this calculator on your website

Free for blogs, news sites and schools. Paste this code into your page; the calculator stays up to date automatically.