Random Number Generator — Free Online Tool

Need a raffle winner, a dice roll, or lottery-style picks? Set your range and count, choose whether duplicates are allowed, and generate instantly.

Try the Random Number Generator

What is the Random Number Generator?

Random numbers power everything from games and giveaways to sampling and simulations. This generator produces uniformly distributed integers: every number in your range has an equal chance each draw, whether you allow repeats or not.

Two modes cover the common cases. With duplicates behaves like rolling dice — the same number can come up again. Unique numbers behaves like drawing names from a hat — each result is removed from the pool, which is what you want for raffles, teams, or lottery picks. (For cryptography or security tokens, use the password generator instead — it uses a cryptographically secure source.)

How to use this calculator

  1. Enter the minimum and maximum of your range.
  2. Set how many numbers to generate.
  3. Toggle unique numbers and sort results as needed.
  4. Click Generate.

Formula

Each draw: floor(random() × (max − min + 1)) + min, giving a uniform integer in [min, max]. Unique mode draws without replacement from the full range.

Frequently asked questions

Is this truly random?

It uses your browser's pseudorandom generator — uniform and unpredictable enough for games, raffles, and sampling, but not for cryptography.

Why did I get a duplicate?

Duplicates are allowed by default (like dice rolls). Turn on “unique numbers” to prevent repeats.

Can I generate numbers for a lottery?

Yes — set min 1, max to your lottery's top number, count to the picks needed, and enable unique numbers.

What is the maximum count?

1,000 per generation. Unique count can't exceed the size of the range.

Related calculators

← View all 24 calculators