How to use the random Number Generator
- Enter the minimum.
- Enter the maximum.
- Enter the how many numbers.
- Tick No repeats if you want that option; leave it clear otherwise.
- Tick Sort results if you want that option; leave it clear otherwise.
- The result updates instantly as you type. There is no button to press.
- Use Copy result to copy the figures, or Copy link to share a link that reopens the random Number Generator with the same inputs.
How it works
This generator picks whole numbers uniformly at random between the minimum and maximum you set, including both ends. "Uniform" means every number in the range is equally likely. Use it to draw raffle or giveaway winners, pick lottery-style numbers, assign people to groups, choose a random question or page, or replace a die: set 1 to 6 for a standard die or 1 to 20 for a d20.
The numbers come from your browser's cryptographically secure random number generator (the Web Crypto API), the same source used to create encryption keys, rather than the predictable Math.random function. The calculator also uses rejection sampling to avoid modulo bias, a subtle flaw where some numbers come up slightly more often when a random value is squeezed into a range that doesn't divide evenly.
With No repeats ticked, each number can appear only once, like drawing numbered balls from a bag without putting them back. Without it, numbers are drawn independently and can repeat, like rolling a die several times. Press Generate again for a fresh draw with the same settings. Nothing is recorded, so if you are running a public draw, take a screenshot of the result.
Formula
The probability of any single number is 1 ÷ (max − min + 1). Drawing k numbers without repeats from a range of n gives n! ÷ (n − k)! possible ordered results.
Example
To pick a winner from 250 numbered entries, set the minimum to 1 and the maximum to 250. Each entry has a 1 in 250 (0.4%) chance. To draw 6 lottery-style numbers from 1 to 49, set How many to 6, tick No repeats and Sort results. There are 13,983,816 possible combinations, so any particular set has about a 1 in 14 million chance.
Frequently asked questions
Are these numbers truly random?
They come from a cryptographically secure pseudo-random generator seeded by your device's hardware entropy. For all practical purposes, including draws and games, they are unpredictable and unbiased.
Can I generate decimals?
This tool produces whole numbers. For decimals, generate a larger whole-number range and divide. For example, 0 to 1000 divided by 100 gives values from 0.00 to 10.00.
Is the result stored anywhere?
No. Numbers are generated in your browser and are not sent or saved. Copy or screenshot the result if you need a record.