Random Number Generator

Pick random numbers in any range, with or without repeats.

–

How to use the random number generator

Enter the smallest and largest whole numbers you want, choose how many numbers to draw and press Generate. Both ends of the range are included, so a range of 1 to 6 behaves like a die. Untick Allow repeats to draw unique numbers, which is what you need for a raffle, a lottery-style pick or assigning people to a random order.

How the numbers are chosen

The generator asks your browser for secure random bits and turns them into a number in your range. A naive approach, taking the remainder after division, makes low numbers slightly more likely whenever the range does not divide evenly into the pool of raw values. This tool avoids that with rejection sampling: raw values outside the largest evenly divisible block are thrown away and redrawn, so the result is exactly uniform.

Common uses

  • Rolling dice (1–6), flipping a coin (1–2) or drawing a card (1–52).
  • Choosing giveaway winners from a numbered list.
  • Selecting a random sample of rows for an audit or survey.
  • Splitting a class or team into random groups.

Frequently asked questions

Are the numbers truly random?

They come from your browser’s cryptographically secure random generator (crypto.getRandomValues), which is seeded from operating-system entropy. This is the same source used for encryption keys and is suitable for draws and raffles.

Is every number equally likely?

Yes. The tool uses rejection sampling, which discards raw values that would make some results slightly more common. Every whole number in your range, including the minimum and maximum, has exactly the same chance.

How do I pick winners without repeats?

Number your entries from 1 to the total, set that as the range, enter how many winners you need and untick “Allow repeats”. Each number can then appear only once.

What is the largest range I can use?

Any whole numbers between −9,007,199,254,740,991 and 9,007,199,254,740,991, the limits of exact integers in JavaScript. You can draw up to 10,000 numbers at a time.

Related tools