Developer Tools

Random Number Generator

Generate one or many random numbers within any range, with options for integers, decimals and unique-only values.

About the Random Number Generator

A random number generator is useful for draws, games, sampling, passwords and testing. This tool produces cryptographically-adequate pseudo-random numbers directly in your browser within the range you choose.

Pick your minimum and maximum, decide how many numbers you need, and choose whether repeats are allowed.

How to use the Random Number Generator

  1. Enter the minimum and maximum values.
  2. Set how many numbers to generate.
  3. Choose whole numbers or decimals, and whether values must be unique.
  4. Click Generate.

How the calculation works

value = min + random() × (max − min)

For whole numbers the result is rounded down into the inclusive range between your minimum and maximum.

Example

Generating 6 unique whole numbers between 1 and 49 might return: 4, 18, 23, 31, 42, 47.

Frequently asked questions

They use the browser's pseudo-random generator, which is more than adequate for games, draws and general use.
Yes, enable the unique-only option to ensure every generated whole number is different.
Yes, switch to the decimals option for fractional random numbers within your range.
You can generate up to 1000 numbers at once, which covers almost every practical need.

Related calculators