Random Number Generator

Pick a range and how many numbers you want. Use “no repeats” for classroom draws, choosing people fairly and picking a random order.

Generate numbers

Enter your values and select Calculate to see the result.

How the numbers are made

Numbers come from the Web Crypto API (crypto.getRandomValues), the same source browsers use for security keys. Rejection sampling removes the small bias that the simple “random mod range” method introduces, so every number in your range is equally likely. Nothing is sent anywhere, and results are not stored.

Without repeats

With repeats turned off, the tool draws like names from a hat: each number can appear at most once, so you cannot ask for more numbers than the range contains. Asking for every number in a range (e.g. 1 to 30, 30 numbers) gives a random shuffle.

Ideas

  • Roll a die: 1 to 6. Roll two: set “how many” to 2 with repeats on.
  • Pick a name at random from a numbered class list of 1 to 30.
  • Choose random page numbers or questions for revision.
  • Assign people to groups in a random order.