Random Number Generator

The Random Number Generator creates random numbers within a specified range.

Random Number Generator

What the result means

Each number is independently and uniformly random within the range.

How to use this calculator

  1. 1Enter the minimum and maximum values.
  2. 2Enter how many numbers to generate.
  3. 3Press Calculate.

The formula

The calculation uses a standard, verifiable formula. Here it is in its simplest form.

Random = floor(random() × (max − min + 1)) + min

What each variable means

SymbolNameDescription
minMinimumSmallest possible value.
maxMaximumLargest possible value.

Step-by-step example

Example: 1 to 100, 5 numbers

Min:1Max:100Count:5
  1. 1Each number is random between 1 and 100

Result

e.g. 42, 17, 89, 3, 65

What changes the result

  • Results are different each time.

Edge cases to be aware of

Unusual situations handled correctly

  • Min must be less than or equal to max.

Common mistakes

Avoid these errors

  • Expecting the same result twice.

Assumptions

  • Uniform distribution.

Limitations

  • Uses the browser's random number generator.

Frequently asked questions

Are the numbers truly random?+
The generator uses the browser's cryptographic random number generator, which is suitable for most purposes.