Random Number Generator

Generate random whole numbers between any two bounds — useful for draws, sampling, games and picking a fair winner.

Fill in the fields above and select Calculate to see your result and the full working.

Formula used

value = min + floor(random × (max − min + 1)), giving a uniform distribution across the range

How to use this calculator

  1. Set the minimum and maximum — both are included in the possible results.
  2. Choose how many numbers you need.
  3. Turn off repeats for lottery-style draws where each number must be distinct.
  4. Press Calculate again for a new set.

Example calculation

Six unique numbers between 1 and 49:

Each draw picks uniformly from the 49 values

Any duplicate is discarded and redrawn

A typical result: 4, 11, 23, 30, 38, 45.

What does this result mean?

Every value in the range has an equal chance of being drawn, and each draw is independent of the last — a number appearing twice in a row is not 'due' to be avoided. This uses the browser's pseudo-random generator, which is fine for games, sampling and picking winners, but is not suitable for cryptographic keys or anything requiring auditable randomness.

Frequently asked questions

Is this truly random?
It is pseudo-random — generated by an algorithm that is statistically uniform but ultimately deterministic. For games, sampling and prize draws this is more than adequate.
Are the minimum and maximum included?
Yes, the range is inclusive at both ends.
Can I use it for a prize draw?
Yes. Number your entrants sequentially, then draw as many unique numbers as you have prizes.

Related calculators

More in Mathematics

Browse the Mathematics category or the full calculator directory.