Random Number Generator
Fairly draw random numbers in any range: unique picks, decimals, sorting and presets such as dice, 1–100 and lotto.
Fairly draw random numbers in any range: unique picks, decimals, sorting and presets such as dice, 1–100 and lotto.
Generates random numbers within a range you set. Use it for drawings, deciding order and test data.
Enter the minimum and maximum values.
Choose the amount and whether duplicates are allowed.
Copy the generated numbers.
When you set a range (for example 1–100) and a count, it draws numbers within it with equal probability. It uses the browser's cryptographic random numbers so that some numbers do not come up more often. You can also draw without duplicates, set decimal places and sort.
When drawing numbers for a prize draw, keeping the drawn result on screen gives you a record as evidence.
Korea's Lotto 6/45 means choosing 6 numbers from 1 to 45 without repeats. To win first prize you must match one of 8,145,060 possible combinations, so the probability is about 1 in 8.14 million. Whichever combination you choose, the chance of winning is the same.
This tool's lotto preset draws 6 numbers from 1–45 without duplicates. It only helps you pick numbers and does not raise your chance of winning.
For a die, set the range to 1–6. To roll two, set the count to 2. To decide an order, draw without duplicates from a range as large as the number of people and you get a random order.
Set just the minimum, maximum and count and you can draw right away; the rest are options you turn on only when needed.
Minimum and maximum
Count
Decimal places
Allow duplicates
Sort
Separator
Yes. The range includes both values, so entering 1 and 6 gives 1, 2, 3, 4, 5 and 6 with equal probability.
When you use decimal places, the range boundaries are calculated at that precision. For example, drawing 0 to 1 with two decimal places gives one of 101 values, from 0.00 to 1.00.
With duplicates allowed, every draw starts from scratch; without, each number that comes up is removed, so use it for things that mustn't overlap, like winners or queue numbers.
When drawing without duplicates, the count can't be larger than the number of values in the range. You can't draw 11 without duplicates from 1 to 10, and a notice appears on screen in that case.
If the input doesn't follow the rules, the generate button won't work and the reason is shown.
Please enter the minimum and maximum
The minimum is greater than the maximum
The range is too wide
The count is larger than the range
It multiplies the range by a power of 10 matching the decimal places to make integers, draws, then divides back, so every value has the same probability.
For example, drawing 1.5 to 2.5 with one decimal place picks one of the 11 integers from 15 to 25 and divides by 10. The result is one of 1.5, 1.6, ..., 2.5. Only the chosen number of decimal places is shown, and it pads the digits so 0.30 doesn't shrink to 0.3.
Pressing a preset button fills in commonly used range, count and duplicate settings all at once.
Dice
1~100
Lottery
Queue numbers
Coin
For the coin, decide beforehand which of 0 and 1 is heads.
It uses the browser's cryptographic randomness and corrects for the remainder operation so that no particular number comes up slightly more often.
For example, if the range has 7 slots and the total number of random outcomes isn't divisible by 7, the earlier numbers could get a slight advantage. The tool discards that leftover portion and draws again, so every number has exactly the same probability.
You can draw up to 10,000 at once, but only 1,000 are shown on screen, and you need to copy to get the full set.
With a large range, the same number rarely appears twice, but when drawing without duplicates, it's processed quickly only when the range has many numbers. Above the results, the count, sum and average are summarized for quick checks.
Yes. If 23 people's birthdays are assigned randomly across 365 days, the chance of two or more sharing a day is known to be about 50.7%.
You can try it yourself by drawing with the range 1–365, count 23 and duplicates allowed, several times. It's the classic example showing that overlaps in random draws come up more often than you'd expect. That's why you should turn on draw without duplicates for anything that mustn't overlap.
This tool isn't suited for uses like tests that must reproduce the same result, or security passwords.
Take a screenshot when the draw result comes out, and it serves as evidence later.
Set the range from 1 to the number of people, the count equal to the number of people, and duplicates off, and every number comes out shuffled once each.
The queue number preset is this setting. For example, drawing 10 from 1 to 10 without duplicates sets the order of ten people at random. Pairing names with numbers makes it easier to use.
Like the coin preset, draw one of 0 and 1 and decide beforehand that 0 is A and 1 is B.
To choose among three, set the range to 1–3. Even with more options, number them the same way, and if there are many options, the random picker tool is easier.
Even with a very large range, drawing just a few finishes instantly.
When drawing without duplicates, if the range is 200,000 or less it shuffles and takes only as many as needed, and if larger it redraws only on overlaps. The upper limit of the range is about 4.3 billion possibilities.
Fix the entry numbers first, then announce the number range and count before drawing, and you reduce disputes over fairness.
If there are 120 entrants, set range 1–120, count 3 and no duplicates to draw 3 people. Draw only once with the same settings and take a screenshot of the result.
For the sum of two dice, 7 can be made in 6 ways, the most of any, so 7 comes up most often.
A sum of 2 or 12 can happen in just 1 way each, so 1 in 36, while 7 is 6 in 36. You can feel it yourself by drawing several times with range 1–6, count 2 and checking the sums.
2 or 12
3 or 11
6 or 8
7
Change the separator to line breaks, press copy all and paste into the sheet, and one number goes on each line.
Copying with commas puts everything in one cell, so choose according to your purpose. If you set decimal places, check that the sheet's number format doesn't cut the digits.
Use integers for number of people, queue numbers and dice, and set decimal places for continuous values like probabilities or measurements.
With each extra decimal place, the possible values in the same range grow tenfold. In a 0–1 range, one decimal place gives 11 values, two give 101 and three give 1,001.
Integer
1 place
2 places
3 places
It's good for simple test data where you copy the numbers on screen and paste them into another tool.
Even over many draws, duplicates can show up fairly often, so turn on draw without duplicates for values that must be unique. If you need a unique identifier, the UUID generator is more suitable.
Most random numbers a computer makes are pseudorandom numbers made by rules, and this tool uses the hard-to-predict cryptographic kind among them.
Ordinary pseudorandom numbers give the same sequence from the same starting value, so they can be predicted. Cryptographic random numbers are built on irregular information collected by the operating system and designed so the next number is very hard to predict. So it's fair enough for a draw.
The sum and average above the results are for a quick check of whether the drawn numbers spread properly.
If you draw 1,000 from 1 to 100, you'll see the average gather around 50. With a small count, it's normal for the average to swing widely.