Set a minimum, maximum, and count to generate random integers or decimals instantly. Optional uniqueness enforces no duplicates; optional sorting orders the output. Descriptive stats (mean, min, max) are also shown.
How to use this calculator
Set the minimum and maximum bounds for the range.
Choose how many numbers to generate and whether duplicates are allowed.
Select integer or decimal output and sort order.
Click Calculate to regenerate — each run gives a different set.
Formula & method
Uniform random integer generation
x = Math.floor(Math.random() × (max − min + 1)) + min
Each integer in [min, max] has equal probability 1/(max−min+1). Decimal mode uses min + Math.random() × (max−min).
JavaScript Math.random() produces uniform pseudo-random numbers in [0, 1).
For integer x in [min, max]: x = Math.floor(Math.random() × (max − min + 1)) + min.
Without replacement (no duplicates), the generated set is a random sample without repetition.
Random numbers are used in statistical sampling, games, cryptography, and simulations.
How to interpret your result
Pseudo-random vs true random
Browser-generated numbers are pseudo-random (deterministic algorithm with a seed). For cryptography-grade randomness, use window.crypto.getRandomValues().
Uniqueness constraint
With no-duplicates, the tool uses rejection sampling. If count exceeds the range size, an error is returned.
Frequently asked questions
Is this truly random?
No — it is pseudo-random, generated by a deterministic algorithm. For most purposes (games, sampling, simulations) this is sufficient.
Can I generate random numbers without duplicates?
Yes — enable 'No duplicates'. The count must be less than or equal to the range size.
What is the range for random decimals?
Decimals are uniformly distributed between min and max, displayed to 4 decimal places.
Related calculators
Probability Calculator — Calculate basic probability, complement, odds, and combined probability of two events (AND, OR) for any scenario.
Statistics Calculator — Full descriptive statistics: five-number summary, IQR, mean, variance, standard deviation, and skewness for any dataset.
Sample Size Calculator — Determine the minimum sample size needed for a survey or study based on margin of error, confidence level, and population size.