Random Number Generator
Generate random numbers within a range for games, statistics, sampling and more with our free online random number generator.
How to Use This Calculator
- Set the minimum and maximum values to define the range.
- Choose how many numbers to generate (1 to 1000).
- Enable Allow No Duplicates to ensure each number appears only once.
- Click Generate to produce the random numbers.
- Click Copy to Clipboard to easily paste results elsewhere.
Formula
Each random integer is generated using a uniform distribution where random() returns a value in [0, 1). This ensures every integer in [min, max] has an equal probability of being selected.
Examples
Lottery Simulation
Generate 6 unique numbers from 1 to 49 to simulate a lottery draw. Enable "No Duplicates" to ensure no repeats.
Classroom Grouping
Randomly assign students to groups by generating numbers from 1 to the number of groups.
Dice Roll
Set min=1, max=6, count=1 to simulate rolling a single die. For two dice, set count=2.
Frequently Asked Questions
How are random numbers generated?
This tool uses JavaScript's Math.random(), which produces pseudo-random numbers via a linear congruential generator. For cryptographic purposes, use a dedicated CSPRNG.
What does "no duplicates" mean?
When enabled, each number can appear at most once in the output. This requires that the range (max − min + 1) is at least as large as the count requested.
Are these truly random?
No — they are pseudo-random, meaning they are generated by an algorithm that appears random but is deterministic if the seed is known. This is fine for most everyday uses.
Can I generate decimal numbers?
This generator produces integers only. For decimal random numbers, you can divide the result by a power of 10.