Random Number Generator

Generate secure random numbers in any range

Generate one or many secure random numbers between a minimum and maximum - whole or with decimals, with no repeats, excluded values and sorting - plus the sum, average, lowest and highest.
Try an example:

Output will appear here...

About Random Number Generator

How it works

  1. Numbers come from your browser's cryptographically secure generator, using rejection sampling so every value in the range is equally likely.
  2. Both the minimum and maximum can be drawn. With decimals, every step (e.g. 0.01) is equally likely.
  3. "No repeats" draws without replacement; excluded numbers are never drawn.
  4. For several numbers, the sum, average, lowest and highest are shown.

What you need

  • A minimum and maximum. Negative numbers and decimals are allowed.

Tips

  • Lottery: 6 numbers from 1-49, no repeats, sorted.
  • Dice: minimum 1, maximum 6; roll several at once with "How many".
  • Exclude numbers that were already drawn to continue a raffle.

Limitations

  • At most 10,000 numbers per run.
  • With "No repeats", you cannot ask for more numbers than exist in the range.

Runs in your browser. Numbers are generated in your browser.

Frequently asked questions

Are the numbers truly random?+

They come from crypto.getRandomValues, a cryptographically secure source seeded by your operating system - suitable for draws and games, and much better than Math.random.

Are the minimum and maximum included?+

Yes. With 1 to 6, both 1 and 6 can come up.

How does "No repeats" work?+

Each number can be drawn only once, like drawing balls from a bag. You cannot draw more numbers than the range contains.

Can I generate negative or decimal numbers?+

Yes. Set a negative minimum and choose the number of decimal places.