Random number generator
Pick a number between 1 and 100 or in any range you like, draw a list with no repeats, or get a random 4, 6 or 10-digit number.
Pick a random number in one click
Enter two limits, then click “Generate a number”. Both limits are included: from 1 to 100, you can get 1 or 100. If you swap them, the tool puts them back in order. Three tabs cover the usual needs:
- One number: one number at a time, with a history of your draws. Check “Don’t repeat a number already drawn” for bingo or a raffle.
- List of numbers: up to 10,000 numbers at once, with or without repeats, sorted or not, whole or with 1 to 6 decimals.
- X-digit number: a number from 1 to 50 digits long, such as a 4-digit code, with or without a leading zero.
Limits can be negative and go up to one quadrillion. Every result copies in one click.
Random number between 1 and 10, 1 and 100 and other common ranges
Click a range: the tool sets the limits and picks a number right away.
| Range | What it’s for |
|---|---|
| 1 to 2 | Settling a choice between two options, like a coin flip |
| 1 to 3 | Choosing among three options or players |
| 1 to 6 | Replacing a six-sided die |
| 1 to 10 | Giving a score or starting a party game |
| 1 to 20 | Replacing the 20-sided die used in role-playing games |
| 1 to 50 | Picking a ticket or a bib number |
| 1 to 100 | Playing higher or lower, or choosing from a numbered list |
| 1,000 to 9,999 | Getting a 4-digit number |
More ranges: 1 to 4, 1 to 5, 1 to 7, 1 to 8, 1 to 9, 1 to 12, 1 to 13, 1 to 14, 1 to 15, 1 to 16, 1 to 17, 1 to 18, 1 to 24, 1 to 25, 1 to 30, 1 to 31. For any other range, just type your limits into the tool.
Pick several numbers with no repeats
With repeats, each number is drawn on its own, so the same one can come up twice, as when you roll several dice. With no repeats, a number that came up is out of the game, like the balls in a lottery. The “List of numbers” tab offers both, and it tells you if you ask for more numbers than the range contains.
Use no repeats for a sample, a running order or assigning numbers to people. Keep repeats to simulate dice or a series of random values. The list also shows the total and the average, and you can copy it with one number per line for a spreadsheet, or on a single line.
Generate a 4, 6 or 10-digit number
The “X-digit number” tab draws each digit at random. Without a leading zero, a 4-digit number runs from 1,000 to 9,999. Check “Allow a leading zero” to go from 0000 to 9999, like a PIN code: that gives 10,000 possibilities instead of 9,000. The tool works digit by digit, so even at 50 digits nothing gets rounded.
Is this generator truly random?
The tool relies on crypto.getRandomValues, the generator browsers provide for security. It’s a pseudorandom generator: a calculation started from an unpredictable value supplied by your system. It doesn’t depend on a physical process such as a die or atmospheric noise, but it’s built so that nobody can guess what comes next. Math.random, the more common function on the web, doesn’t offer that guarantee.
Simple generators fall into another trap: squeezing a big number into a small range can favor the first numbers. Here, draws that would create that imbalance are thrown out and redone, so every number has exactly the same chance. It all happens in your browser, and no draw is sent or saved.
What are the odds for each number?
In a range of N numbers, each one has a 1 in N chance on every draw.
| Range | Odds of getting a given number |
|---|---|
| 1 to 2 | 1 in 2 (50%) |
| 1 to 6 | 1 in 6 (16.7%) |
| 1 to 10 | 1 in 10 (10%) |
| 1 to 100 | 1 in 100 (1%) |
| 1 to 1,000 | 1 in 1,000 (0.1%) |
The generator has no memory: a number that hasn’t come up for a while is no more likely on the next draw. Repeats, on the other hand, arrive sooner than most people expect. Between 1 and 10, five draws already give a 70% chance of seeing a number twice. Between 1 and 100, 13 draws are enough to pass one chance in two. That isn’t a flaw in the tool: it’s the same effect as the birthday paradox.
Why not just pick a number yourself?
Because people are bad at imitating chance. In a YouGov poll published in March 2025, a third of Britons (33%) picked 7 when asked for a number between 1 and 10, while pure chance would give 10%. They also avoided the extremes: 1, 2, 9 and 10. A generator has no such habits, which makes it useful whenever a choice has to be fair.
Generate a random number in Excel or in code
- Excel and Google Sheets:
=RANDBETWEEN(1,100)gives a whole number from 1 to 100, and=RAND()a number between 0 and 1. These formulas change on every recalculation: to keep a result, copy the cell and paste it as values. - Python:
random.randint(1, 100)includes both limits, andrandom.sample(range(1, 50), 5)picks 5 numbers with no repeats. - JavaScript:
Math.floor(Math.random() * 100) + 1for everyday use,crypto.getRandomValueswhen the draw must be unpredictable. - PHP:
random_int(1, 100). - Java:
new Random().nextInt(100) + 1.
More tools for random draws
- the random name picker draws winners from a list of names and makes teams;
- spin the wheel turns a wheel with your own choices;
- flip a coin tosses a coin once or thousands of times;
- the percentage calculator helps you turn odds into a percentage;
- Hakim explains and solves math problems, including probability.
Frequently asked questions
How do I pick a random number between 1 and 100?
Leave the limits at 1 and 100 in the “One number” tab, then click “Generate a number”. Both 1 and 100 can come up, and each number has a 1 in 100 chance.
How do I get numbers with no repeats?
For a list, check “No repeats” in the “List of numbers” tab. To draw numbers one at a time, as in bingo, check “Don’t repeat a number already drawn” in the “One number” tab.
Is this generator truly random?
It uses your browser’s cryptographic generator (crypto.getRandomValues). It’s a calculation rather than a physical process, but it’s designed to be unpredictable, and every number has exactly the same chance.
Can anyone guess the next number?
No. Each draw is independent of the ones before it. A number that came up often, or hasn’t appeared for a while, is no more or less likely next time.
How do I get a random 4-digit number?
Open the “X-digit number” tab and enter 4. You’ll get a number from 1,000 to 9,999. Check “Allow a leading zero” if you want codes such as 0427.
Can I pick negative numbers or decimals?
Yes. Limits can be negative in every case. For decimals, choose 1 to 6 decimals in the “List of numbers” tab: from 0 to 1 with 2 decimals gives a result such as 0.37.
Can I use it to pick lottery numbers?
Yes, but no method improves your odds. For Powerball, use “List of numbers” to draw 5 numbers from 1 to 69 with no repeats, then 1 number from 1 to 26. A ticket has a 1 in 292,201,338 chance of winning the jackpot, whether you chose it at random or not.
What are the tool’s limits?
Limits go up to one quadrillion, positive or negative. A list holds up to 10,000 numbers, and an X-digit number up to 50 digits. The tool is free, needs no sign-up and has no limit on draws.
Need help with a probability problem?
Hakim AIMathematics