Skip to the tool
CALCPARK

Random Number Generator

Generate one or many random whole numbers between a minimum and maximum, with no repeats and sorting if you need them. Uses your browser’s cryptographic randomness.

Runs on your device
Loading the tool…

How to use it

  1. Enter the lowest and highest number you want. Negative numbers and very large ranges are fine.
  2. Choose how many numbers to draw, whether repeats are allowed, and the order to show them in.
  3. Press Generate. Press again for a fresh draw; the last few draws stay visible below the result.
  4. Copy the numbers, or copy the link to reproduce the same settings (not the same numbers) later.

Example

To draw lottery numbers for a 6-of-49 game: minimum 1, maximum 49, six numbers, “No repeats” on and “Lowest first” – or just click the Lotto 6 of 49 preset. To decide who goes first among eight players, draw one number from 1 to 8.

How the numbers are generated

The browser supplies 32-bit random words through crypto.getRandomValues, which is seeded by the operating system’s entropy source. A random word is mapped onto your range with rejection sampling: words that would make the top of the range slightly less likely are thrown away and redrawn, so the result is uniform rather than “almost uniform” as with a plain modulo.

draw 32-bit word r; if r ≥ 2³² − (2³² mod range) redraw; result = min + (r mod range)

With “No repeats” the tool performs a partial Fisher–Yates shuffle over the range, which is the standard way to take a uniformly random sample without replacement. Ranges wider than 2³² combine two words, and the limits of ±10¹⁵ keep every value exact in JavaScript’s number type.

Sources: MDN – Crypto.getRandomValues(), Fisher–Yates shuffle.

Is this random enough for a raffle or a giveaway?

Yes. The source is the same cryptographic generator browsers use for security keys, and the mapping onto your range is unbiased. What it does not give you is a public, auditable proof of a draw – if you need that, run the draw in front of the participants or record your screen while you do it.

Questions

Can the same number come up twice?
With repeats allowed, yes – each draw is independent, like rolling a die. Tick “No repeats” to get distinct numbers, for example for a lottery or a raffle.
Does the link reproduce the same numbers?
The link reproduces your settings (range, count, options), not the numbers. Cryptographic randomness cannot be replayed from a link, which is also why nobody can predict a draw.
Can I generate decimals or numbers with a fixed step?
This tool draws whole numbers. For decimals, draw a whole number from a scaled range (for example 0–1000) and divide by 1000.