1. Home
  2. Maths
  3. Random number generator

Random number generator

Pick one or more random whole numbers between any two values.

Repeats
Order

Working it out…

How the numbers are picked

Numbers come from your browser's cryptographic random generator, the same source used for security keys, rather than a simple pseudo-random formula. Each whole number in your range, including both ends, is equally likely.

To keep the draw fair, any raw random value that would favour some numbers over others is thrown away and drawn again. This removes the small bias that simple methods can introduce.

With or without repeats

With repeats allowed, each pick is independent, like rolling a die several times. With no repeats, each number can come up only once, like drawing raffle tickets from a hat.

Ideas

  • Roll a die: lowest 1, highest 6.
  • Pick lottery-style numbers: 6 numbers from 1 to 59, no repeats, sorted.
  • Choose a winner from a numbered list of entries.

Questions people ask

Are the numbers truly random?

They come from your device's cryptographically secure generator, which is unpredictable for any practical purpose, including draws and games.

Can I get decimals?

This tool picks whole numbers. For decimals, generate a whole number in a larger range and divide it. For example, 1 to 1000 divided by 100 gives values from 0.01 to 10.