How to use the Random Number Generator
- Set the range and how many numbers you need.
- Choose whole numbers or decimals, and whether repeats are allowed.
- Press Generate. Each press makes a fresh draw.
Formula
For whole numbers: result = min + ⌊u × (max − min + 1)⌋, where u is a uniform random value in [0, 1) from crypto.getRandomValues. Without repeats, duplicates are redrawn.
Examples
- Dice roll: min 1, max 6, count 1.
- Raffle of 250 tickets, 3 winners: min 1, max 250, count 3, no repeats.
Frequently asked questions
Is this truly random?
It uses the browser’s cryptographic random generator, which is suitable for games, draws and sampling. For regulated lotteries, follow your local legal requirements.
Is the range inclusive?
Yes. Both the minimum and maximum can be drawn.