How to Use
- Set the range
Enter the minimum and maximum values for your random numbers.
- Configure options
Set how many numbers to generate, choose integer or decimal, and enable or disable duplicates.
- Generate
Click Generate to instantly produce random numbers matching your settings.
What is a random number generator?
A random number generator is a tool that picks numbers within a chosen range in a way that no one can predict or deliberately influence. You set a 'minimum to maximum' interval, decide how many numbers to draw and whether the same value may appear again (allow duplicates or no repeats), and a list of numbers matching your conditions appears instantly.
Where is it used?
- Draws and giveaways: Remove human bias from situations where fairness matters, such as choosing prize winners, presentation order, or team assignments.
- Lottery and number picking: Use it to draw numbers under specific rules, like 6 unique numbers from 1 to 45.
- Simulation and sampling: Handy for dice and coin simulations, random sampling of survey respondents, or splitting groups for A/B testing.
This tool uses the browser's crypto.getRandomValues() to produce high-quality random numbers based on operating-system entropy, and removes bias that would break a uniform distribution.
Calculation formula
A single integer drawn from the range [min, max] is computed as follows.
result = min + ⌊ r × (max − min + 1) ⌋
- min / max: the minimum and maximum of the range (both inclusive)
- r: a uniform random number from 0 up to (but not including) 1
- max − min + 1: the total count of possible integers (= range)
Example: with min=1, max=45 and r=0.732,1 + ⌊0.732 × 45⌋ = 1 + ⌊32.94⌋ = 1 + 32 = 33
For no repeats, if an already-drawn value comes up again it is discarded and re-drawn (rejection sampling). So count ≤ range must hold; from 1 to 45 you can generate at most 45 unique numbers.