Random Number Generator explained with worked examples
The Random Number Generator does one job: it picks whole numbers inside a range you choose, as many as you ask for. It has three settings, a minimum, a maximum and a count, and one rule: every whole number from the minimum to the maximum, inclusive, is equally likely on every pick. The four worked examples below use the tool’s own defaults and limits, so you can check your own results against them.
At a glance
Example 1: the default, five numbers from 1 to 10
Leave the tool as it opens, with a minimum of 1, a maximum of 10 and a count of 5, and press Generate numbers. You get five numbers, each between 1 and 10 inclusive — a possible set is 3, 7, 1, 10, 4. The range holds 10 whole numbers, so each one has a 1 in 10 chance, or 10%, on every pick. The two smaller lines under the set give the smallest and the largest: with the example set, the smallest is 1 and the largest is 10.
Example 2: a dice roll, one number from 1 to 6
Set the minimum to 1, the maximum to 6 and the count to 1, then press Generate. You get a single number from 1 to 6, which is a fair dice roll: each face has a 1 in 6 chance, or 16.67%. Change the count to 2 and you get two rolls at once, such as 4 and 2, and each roll is independent, so the second roll is not affected by the first.
Example 3: a raffle, one number from 1 to 100
Set the minimum to 1, the maximum to 100 and the count to 1. The range now holds 100 whole numbers, so each ticket has a 1 in 100 chance, or 1%, of being picked. That is the same maths as drawing one ticket from a hat of 100, except the tool does it in a second and cannot be accused of peeking. If the raffle has 250 tickets, set the maximum to 250: each ticket then has a 1 in 250 chance, or 0.4%.
Example 4: twenty numbers from 1 to 10
Set the count to 20, the most the tool gives in one press, and keep the range at 1 to 10. You get 20 numbers, and because there are only 10 values to pick from, repeats are guaranteed: some numbers will appear twice or three times. On average, any one value, such as 7, appears twice in 20 picks, and the chance that 7 appears at least once is 87.84%. The smallest and largest lines still read between 1 and 10, because every number stays inside the range.
Why the numbers repeat
Each pick is independent, which means the tool does not remember what it picked a moment ago and does not avoid numbers it has already used. With 5 picks from 10 values, only 30.24% of sets have all five numbers different, so most sets contain a repeat. That is what real randomness looks like: a set with no repeats at all is the unusual one, not the set with a number twice.
The common mistake
People count the values in a range by subtracting, and get it wrong: 10 minus 1 is 9, but the range from 1 to 10 holds 10 whole numbers, because both ends count. The same slip makes 0 to 10 look like 10 values when it is 11, and 1 to 100 look like 99 when it is 100. Always add 1 after subtracting: maximum minus minimum plus 1 is the count of values, and 1 divided by that count is the chance for any one number.
Frequently asked questions
How many values are in the default range of 1 to 10?
10 whole numbers, from 1 to 10 inclusive. Each one has a 1 in 10 chance, or 10%, on every pick.
What is the chance of rolling a 6 with this tool?
Set the minimum to 1, the maximum to 6 and the count to 1. Each face has a 1 in 6 chance, or 16.67%.
How many numbers can the tool generate at once?
20. The count runs from 1 to 20, and the minimum and maximum run from 0 to 1,000.
Why do numbers repeat in one set?
Because each pick is independent and repeats are allowed. With 5 picks from 10 values, only 30.24% of sets have all five numbers different.
More guides on the Random Number Generator
- How to use the Random Number Generator — step by step
- Random Number Generator formula — how it actually works
- Random Number Generator for beginners — start here
- Common mistakes people make with the Random Number Generator
- Random Number Generator vs doing it by hand — which is faster?
- Random Number Generator — the complete guide
- How to get an accurate result from the Random Number Generator
- Random Number Generator for students — with examples
- Random Number Generator for homeowners and DIYers
Try the Random Number Generator — free, in your browser.