All tools › Math Calculators › Statistics & Probability
Pick one or many random whole numbers between a minimum and a maximum.
Pick random whole numbers in any range
This random number generator picks one or more whole numbers between a minimum and a maximum you choose. Every whole number in the range, including both ends, can come up. You can ask for up to 1,000 numbers at a time, allow or block repeats, and sort the list.
It is useful for classroom and office raffles, choosing who goes first, rolling dice for a board game, picking a random sample from a numbered list, or assigning people to groups.
How to use the random number generator
- Enter the lowest number allowed in Minimum and the highest in Maximum.
- Enter How many numbers you want, from 1 to 1,000.
- Set Repeats. “Allow the same number twice” treats each pick separately, like rolling a die again. “No repeats (unique numbers)” works like drawing tickets from a hat without putting them back.
- Set Order to “As drawn” to keep the order the numbers came out, or “Sorted low to high”.
- Press Generate.
How the numbers are picked
Each pick starts with a random fraction r that is at least 0 and less than 1. The calculator stretches it across your range and rounds down:
number = Minimum + floor( r x (Maximum – Minimum + 1) )
- Maximum – Minimum + 1 is how many whole numbers are in the range. From 1 to 6 that is 6.
- floor means round down to a whole number.
- r comes from your browser’s cryptographic random source when the browser has one. If it is not available, the browser’s ordinary random function is used instead.
With repeats allowed, every pick is independent of the ones before it. With no repeats, the tool shuffles the numbers in the range and takes from the front when the range is small (up to 5,000 values); for larger ranges it redraws any number that has already come up.
If you type a decimal as a limit, the range is tightened to the whole numbers inside it. A minimum of 1.5 and a maximum of 10.5 becomes 2 to 10.
Example run
Say 50 people each hold a raffle ticket numbered 1 to 50 and there are five prizes. Use these settings:
| Field | Setting |
|---|---|
| Minimum | 1 |
| Maximum | 50 |
| How many numbers | 5 |
| Repeats | No repeats (unique numbers) |
| Order | Sorted low to high |
Press Generate and you get five different whole numbers between 1 and 50, listed from lowest to highest. The numbers themselves change on every press, so yours will not match anyone else’s. Under the result, the Range line reads “1 to 50 (50 possible values)”, and because you asked for more than one number, the tool also shows their Sum and Average.
If the prizes are different and order matters (first prize, second prize and so on), set Order to “As drawn” instead, so the first number out wins the first prize.
How to read the result
- A streak or a cluster is normal. Random does not mean evenly spread; rolling 1 to 6 twice can show the same number both times.
- Earlier draws do not affect later ones. A number is not “due” because it has not come up.
- With no repeats, you cannot ask for more numbers than the range holds. Asking for 6 unique numbers from 1 to 5 returns a message explaining why.
Limits and fair-use notes
- Whole numbers only. It does not produce decimals.
- Limits must be between minus one trillion and one trillion, and you can draw at most 1,000 numbers per run.
- Very wide ranges. Each pick is built from a 32-bit random value, which has 4,294,967,296 possible states. A range with more whole numbers than that cannot reach every value, so keep ranges well below it.
- No seed and no record. You cannot repeat a past draw, and the tool keeps no log. If others need to trust the result, generate it while they watch or take a screenshot.
- It is fine for games, casual raffles, classroom picks and simple sampling. We make no claim that it meets the rules that apply to regulated lotteries, official prize draws or audited selections, and it is not meant for creating passwords or security keys.
Frequently asked questions
How do I roll dice with it?
Set Minimum to 1 and Maximum to 6, choose how many dice you want under How many numbers, and allow repeats. Use 1 to 20 for a 20-sided die.
How do I pick a random name from a list?
Number the names from 1 upward, set Maximum to the last number, and generate one number. For several winners, ask for that many numbers with no repeats.
How do I split people into random groups?
Number everyone, generate as many numbers as there are people with no repeats and Order set to As drawn, then cut the list into groups in the order shown.
Where are the numbers generated?
The numbers are produced by the calculator code running in your browser, using your browser’s own random source.
Related calculators
- Password Generator – the right tool for random passwords.
- Average Calculator – mean, median and mode of the numbers you drew.
- Standard Deviation Calculator – measure the spread of a sample.
- Percentage Calculator – work out the chance of one outcome as a percent.

