Random Number Generator
Pick random whole numbers or decimals in any range, with or without repeats. You can also roll dice, flip coins, or draw winners from a list of names. Every result comes from your browser’s secure random source.
Your result
Press Generate to see your result.
Results come from your browser’s cryptographic random source and are not stored. This tool is for games, draws among friends, teaching and sampling, and is not certified for regulated lotteries or for creating passwords.
What this tool does
Sometimes you need a number nobody chose: a winner for a giveaway, the order for a classroom presentation, a roll for a board game, or a sample from a long list of records. Doing it by hand tends to go wrong, because people are poor at being random. We avoid repeats, we favour numbers like 7, and we shuffle in patterns we do not notice.
This generator handles the common cases in one place. It can draw whole numbers or decimals from any range, roll dice of any size, flip coins, and pick names from a list you type in. You can ask for numbers with or without repeats, sort them, and copy the result.
How to use it
- Numbers: set the smallest and largest value, choose how many numbers you want, and decide whether repeats are allowed. Pick decimals if you need fractions and set the number of places.
- Dice & coin: choose a die with 4, 6, 8, 10, 12, 20 or 100 sides, or enter your own number of sides, then set how many dice to roll. Or switch to a coin and set the number of flips.
- Pick from list: paste or type one name per line, choose how many to pick, and keep “no repeats” so the same person is not chosen twice.
Press Generate, and again Generate again whenever you want a fresh result. Each press is independent of the last.
How the numbers are produced
The numbers come from your browser’s cryptographic random source, which gathers unpredictable input from the device. That is a better source than a simple formula, which can be reproduced if someone knows the starting value.
One detail matters for fairness. If you want a number from 1 to 6 and you take a large random number and divide by 6 for the remainder, the low numbers come up slightly more often, because the large number does not divide evenly. This is called modulo bias. The generator avoids it by throwing away any draw that falls in the uneven leftover part and drawing again, so every number in your range has exactly the same chance.
For no-repeat draws, the tool tracks what has been used, and for shuffles it uses the Fisher–Yates method, which gives every possible order the same chance.
Worked examples
A raffle with 100 tickets
Tickets are numbered 1 to 100 and you need three winners. Set the smallest number to 1, the largest to 100, the count to 3 and repeats to “no repeats”. You get three different ticket numbers.
A team draw
Type eight names, one per line, and pick eight with no repeats. The result is the full list in random order, which you can split into teams by reading off the first four and the last four.
A game night
Roll two six-sided dice and you get the two values and their sum. Or switch to a d20 for a role-playing game, or a d100 when you need a percentage.
What to expect from two dice
Random does not mean every outcome is equally likely. With two six-sided dice there are 36 combinations, but only one way to make 2 and six ways to make 7, so 7 appears far more often. Here is the full picture.
| Total | Ways | Chance | Total | Ways | Chance |
|---|---|---|---|---|---|
| 2 | 1 | 2.78% | 8 | 5 | 13.89% |
| 3 | 2 | 5.56% | 9 | 4 | 11.11% |
| 4 | 3 | 8.33% | 10 | 3 | 8.33% |
| 5 | 4 | 11.11% | 11 | 2 | 5.56% |
| 6 | 5 | 13.89% | 12 | 1 | 2.78% |
| 7 | 6 | 16.67% |
That is why the average of two dice sits near 7 while a single die is spread evenly from 1 to 6.
Streaks, patterns and the gambler’s fallacy
If you flip a fair coin five times, the chance that all five are heads is 1 in 32, about 3.1%. That is rare for any one set of five, but if you do it often it will happen. After four heads in a row, the next flip is still 50/50. The coin has no memory.
Randomness also produces repeats sooner than people expect. The classic example is the birthday problem: in a group of just 23 people, there is about a 50.7% chance that two share a birthday. When you ask for random numbers with repeats allowed, a duplicate turning up early is normal and not a sign of a fault.
Likewise, the chance of rolling at least one six in four rolls of a die is 1 − (5/6)4, which is about 51.8%. Small samples can look lopsided. Over many draws the results settle towards the expected proportions.
Good uses and bad uses
- Good: informal draws, classroom activities, choosing who goes first, settling a tie, picking a sample of rows to check, trying out a game.
- Not suitable: regulated lotteries or prize draws that require an audited method, and anything security-related. For passwords use the password generator, which is built for the purpose.
Frequently asked questions
Are these numbers truly random?
They are generated with your browser's cryptographic random source, the same kind of source used for security software, rather than a simple formula that can be predicted. That makes them fair and unbiased for games, draws, classroom use and sampling. Strictly speaking a computer produces randomness from physical noise and system events, so purists call it high-quality pseudo-random, but there is no practical way to guess the next value.
Is every number in the range equally likely?
Yes. Whole numbers are drawn with a method that rejects any value that would make some numbers slightly more likely than others. A common shortcut, taking a big random number modulo the range size, makes small numbers a tiny bit more likely, and this calculator avoids it.
What does 'allow repeats' mean?
If repeats are allowed, each number is drawn independently, so the same number can come up more than once, like rolling a die several times. If repeats are not allowed, every number is different, like drawing numbered balls from a bag without putting them back. With no repeats, you cannot ask for more numbers than the range contains.
Can I generate random decimals?
Yes. Choose decimal numbers and set how many places you want, from 1 to 10. Each value is chosen uniformly across the range and then rounded to that many places.
How do I pick a random winner from a list?
Use the Pick from list tab. Type one name or item per line, choose how many winners you want, and keep 'no repeats' selected so nobody is drawn twice. To put the whole list in a random order, pick as many items as the list contains.
Why do I sometimes get the same result several times in a row?
Because genuinely random results do that. People expect random sequences to look evenly mixed, so streaks feel suspicious. With a fair coin, a run of five heads happens about once in every 32 sets of five flips. Each flip is independent of the one before it, so a streak says nothing about the next result.
Can I use this for a lottery, gambling or a prize draw?
It is fine for informal draws, classroom activities, games and choosing between options. For anything with legal or financial rules, such as a regulated prize draw or a lottery, follow the rules and the approved method that apply to you. This tool is not certified for that purpose.
Can I use it to create passwords or keys?
No. Passwords and cryptographic keys need a purpose-built generator and careful handling. Use the password generator on this site for passwords, and never reuse a number generated for a game as a secret.
What is the largest range I can use?
Whole numbers can be anywhere from −1,000,000,000,000,000 to 1,000,000,000,000,000. You can generate up to 1,000 numbers at a time, up to 100 dice at once, and up to 1,000 coin flips.
Is anything I enter saved or sent anywhere?
No. The numbers are generated in your browser. Your lists and settings are not uploaded or stored on our servers.
Related calculators
To describe a set of numbers, use the average calculator or the standard deviation calculator. For splitting a quantity into parts, try the fraction calculator or the percentage calculator.