About this tool
This tool draws random whole numbers from a range you choose, one at a time or up to 100 at once, with or without repeats. People use it for raffles, games, classroom picks, and statistical sampling. A random number generator produces values that cannot be predicted; here every integer in the range, including both endpoints, has the same chance of being drawn.
Typical uses include picking a raffle ticket from 1 to 500, choosing a random student number, selecting rows for a spot check, or replacing a lost die. Because unique draws are supported, you can also create lottery-style picks or a random order without repeated numbers.
How it works
Enter the minimum and maximum values, or pick a dice preset: D6, D10, D20, or D100. Set the quantity from 1 to 100 with the buttons, a preset, or by typing. Turn Allow Duplicates off to get unique numbers, and turn Sort Results on to list them in ascending order. Select Generate Numbers. For multiple results, the tool also shows the minimum, maximum, sum, and average.
The range summary shows how many possible values there are, which helps you check settings before drawing. With duplicates allowed, every number is drawn independently, so the same value can appear more than once. With duplicates off, each number is removed from the pool once drawn. Click a result to copy it, or copy and download the whole list as text.
Example
To draw lottery-style numbers, set the range to 1–49, the quantity to 6, turn Allow Duplicates off, and turn Sort Results on. The range has 49 possible values, and one possible result is 4, 11, 23, 30, 37, 45, with a sum of 150 and an average of 25. With duplicates off, asking for 50 numbers from this range shows an error.
In that draw, any particular number has a 6 in 49 chance, about 12.2%, of being among the results. For a classroom pick, set the range to 1–28 for a class of 28 students and the quantity to 1. Each student then has a 1 in 28 chance, about 3.6%, on every draw.
Assumptions and limits
Only integers are generated, between -9007199254740991 and 9007199254740991, with at most 4294967296 values in the range. Numbers come from the browser's crypto.getRandomValues with rejection sampling to avoid bias; very old browsers fall back to Math.random. Results are not provably fair or auditable, so they are not suitable for regulated draws.
Frequently asked questions
Are the numbers truly random?
They come from the browser's cryptographically secure pseudorandom generator, which is seeded by the operating system and is unpredictable for practical purposes. They are not from a physical source, but they are suitable for games, raffles, and sampling.
How do I pick random numbers without repeats?
Turn off Allow Duplicates. Each number in the range can then appear at most once, so the quantity cannot exceed the number of values in the range. To shuffle a whole range, such as 1 to 30, set the quantity equal to the range size and leave sorting off.
Does the range include the minimum and maximum values?
Yes. Both endpoints are included, so a range of 1 to 6 can return any of the six faces of a standard die. The number of possible values is therefore maximum minus minimum plus one, which the tool displays as the number of possible values.
Is this the same as rolling dice?
For one die, yes: the D6 preset gives each face from 1 to 6 an equal chance. Rolling several dice and adding them is different, because sums near the middle are more likely than extreme totals.
Can I generate negative numbers or decimals?
Negative numbers work: a range such as −10 to 10 has 21 possible values, including zero. The tool returns whole numbers only. For decimals with fixed precision, generate integers and divide them yourself, for example a range of 0 to 1000 divided by 100 gives values from 0.00 to 10.00 in steps of 0.01.
Link with your values
Add these parameters to this page’s address to open it with the values filled in, for example to share a calculation or to link to it from an AI assistant. The result is calculated in the browser: the page HTML shows an example for the default values, and the tool sets the data-url-params attribute once the link’s values are applied.
| Parameter | Value | If omitted |
|---|---|---|
minMinimum Value | whole number; allowed -9007199254740991–9007199254740991 | default 1 |
maxMaximum Value | whole number; allowed -9007199254740991–9007199254740991 | default 100 |
countQuantity | whole number; allowed 1–100 | default 1 |
allow_duplicatesAllow Duplicates | true or false | default true |
sortedSort Results | true or false | default false |
Examples
?min=1&max=49&count=6&allow_duplicates=false&sorted=true?min=-10&max=10
Write decimals with a point. Encode a space as %20, + as %2B, # as %23 and & as %26.
Result elements: [data-result-block="numbers"]