onlinecalculator.me

Free online random number generator

A random number generator picks numbers with equal probability across the range you set. Use it for games, lotteries, statistics sampling, or any time you need unbiased random.

About this calculator

How to use

  1. Set the minimum and maximum values for your range.
  2. Choose how many numbers to generate (1–100).
  3. Select Integer or Decimal type.
  4. Check or uncheck Allow duplicates as needed.
  5. Click Generate to see your random numbers.

How it works

Each number is drawn independently and uniformly from the range [min, max].

For integers without duplicates, the calculator uses a Fisher-Yates partial shuffle:

Place all integers min..max in a pool.
For each position i from 0 to count-1:
  pick random j from i..poolLength-1
  swap pool[i] and pool[j]
  use pool[i] as the next result

For decimals, each value is drawn as:

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

rounded to 2 decimal places.

Notes

  • For very large ranges (e.g., 1 to 1,000,000), duplicate integers are unlikely even when duplicates are allowed.
  • The count is capped at 100 to keep results readable.
  • Decimal mode always allows duplicates because repeating a specific two-decimal-place value from a wide range is rare.
Are the numbers truly random?
The generator uses the browser's Math.random(), which is a pseudo-random number generator (PRNG). It produces numbers that are statistically uniform and unpredictable enough for everyday use — games, sampling, randomization — but not for cryptographic security. For cryptographic purposes, use a hardware-based generator.
What does "allow duplicates" mean?
When duplicates are allowed, the same number can appear more than once. When disabled, each generated integer appears at most once. Duplicates cannot be disabled for decimal numbers because the probability of the same decimal repeating is effectively zero.
Why does disabling duplicates sometimes give an error?
If you ask for more unique integers than exist in the range, it is impossible to comply. For example, generating 10 unique integers between 1 and 5 is impossible — there are only 5 values available.
What is the difference between integer and decimal output?
Integers are whole numbers (no decimal point). Decimal results are shown with exactly two decimal places and can represent any value in the range, including fractional values.
How do I share a fixed random seed?
This calculator does not support fixed seeds — each click generates a new result. Use Share with my numbers to share your range and count settings, not the specific numbers generated.