Random number generator

Set the lowest and highest number and how many you need, and the tool draws whole numbers where every value has the same chance. Handy for contests, raffles and games.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter minimum, maximum, how many numbers, no repeats, sort results ascending and draw number.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

Possible values N = max - min + 1, and each value has a 1/N chance per draw. Each number comes from crypto.getRandomValues with rejection sampling, so no value is favoured.

Example

Inputs: Minimum = 1, Maximum = 100, How many numbers = 1, No repeats = yes, Sort results ascending = no. Result: Result: 22; Numbers drawn: 1; Possible values: 100.

Limits and caveats

  • Earlier draws are not saved, and any change to the inputs gives a new draw.
  • It is not a substitute for a licensed official draw system.

Questions about this tool

Are the numbers really random?

They come from the browser cryptographic generator crypto.getRandomValues, with rejection sampling so no number is favoured.

What does no repeats mean?

A number that has come out cannot appear again in the same draw, like pulling balls from a bag without putting them back. So you cannot draw more numbers than the range holds.

How do I draw again?

Change the draw number or any other input and a new result appears at once.