Random Number Generator
Pick a random number between any two numbers you choose. Make one number or a list of up to 10,000, with or without repeats, then copy or download it. Everything runs in your browser.
What the random number generator does
It picks numbers between a minimum and a maximum you choose, with both ends included. Every number in the range has exactly the same chance of coming up, and each pick has no link to the one before it.
The numbers come from your browser's secure random number generator,crypto.getRandomValues(), not the simpler Math.random(). The tool also avoids a common shortcut that makes some numbers come up slightly more often than others, so a range like 1 to 7 is just as fair as 1 to 8.
Why use our random number generator
- ·Free. No signup, no paywall, no limits.
- ·No repeats when you need it. Draw unique numbers for raffles, lotteries, and bingo.
- ·Bulk lists. Up to 10,000 numbers at once, sorted or in draw order.
- ·Any range. Negative numbers, very large numbers, and up to 6 decimal places.
- ·Private. Numbers are made on your device. Nothing is uploaded.
How to generate a random number
- 1
Set the range
Enter the smallest and largest number you want. Both ends are included, so 1 to 100 can give you 1 or 100. For common ranges, click a quick pick like 1 to 10 or Roll a die.
- 2
Choose how many numbers
Leave How many at 1 for a single number, or enter up to 10,000. Turn on No repeats if every number in the list must be different, as in a raffle or lottery draw.
- 3
Add decimals or sort if you need to
Set Decimal places from 1 to 6 to get numbers like 4.27 instead of whole numbers. Use Sort results to list the numbers from smallest to largest, or the other way round.
- 4
Generate and copy
Click Generate or press Enter. Copy one number, copy the whole list with the separator you picked, or download it as a .txt file. Your last 20 results stay listed below until you reload the page.
Random numbers with and without repeats
With repeats allowed, every pick uses the full range, so the same number can come up more than once. This is like rolling a die over and over. Repeats are more common than most people guess: pick 10 numbers from 1 to 100 and there is about a 37% chance that at least two of them match.
With No repeats on, each number can only be drawn once, like pulling numbered balls out of a bag. Use it for raffle winners, lottery picks, seating orders, or a bingo calling list. The list can never be longer than the range, so 1 to 49 gives at most 49 numbers.
The chance of guessing a single number is 1 divided by the size of the range, so 1 in 100 for 1 to 100. Matching all 6 numbers drawn from 1 to 49 is much harder: there are 13,983,816 possible sets of 6, so a single guess has a 1 in 13,983,816 chance.
How to generate a random number in Excel, Google Sheets, Python, and JavaScript
If you need random numbers inside a spreadsheet or a script, these formulas give a number from 1 to 100. Change the two numbers to set your own range.
| App | Formula or code | What it gives you |
|---|---|---|
| Excel and Google Sheets | =RANDBETWEEN(1, 100) | A whole number from 1 to 100, both included. It picks a new number every time the sheet recalculates. |
| Excel and Google Sheets (decimal) | =RAND() | A decimal from 0 up to, but not including, 1. |
| Python | random.randint(1, 100) | A whole number from 1 to 100, both included. Run import random first. |
| JavaScript | Math.floor(Math.random() * 100) + 1 | A whole number from 1 to 100. Math.random() is not meant for security, so use crypto.getRandomValues() for anything secret. |
Spreadsheet formulas pick new numbers whenever the sheet recalculates, which can change a raffle result after the fact. To keep a result, copy the cells and paste them back as values, or generate the numbers here and paste them in.
When to use a random number generator
- ·Raffles and giveaways. Number each entry, then pick one number between 1 and the total. For several winners, turn on No repeats so no one wins twice.
- ·Games and classrooms. Roll a virtual die, decide who goes first, or call on a random student by their number on the class list.
- ·Lottery and bingo numbers. Draw 6 different numbers from 1 to 49, or set How many to 75 with No repeats to get a full bingo calling order for 1 to 75.
- ·Sampling and test data. Pick random rows to check from a spreadsheet, choose survey participants by ID, or fill a test file with numbers in a set range.
- ·Settling a choice. Give each option a number and let the generator choose, so no one can say the pick was unfair.
Frequently asked questions
- How do I pick a random number between two numbers?
- Enter the lower number in Minimum and the higher one in Maximum, then click Generate number or press Enter. For common ranges, click a quick pick such as 1 to 10, 1 to 100, or 1 to 1,000 instead.
- Are the minimum and maximum numbers included?
- Yes. Both ends of the range can come up. With a range of 1 to 10 there are 10 possible numbers, and 1 and 10 are as likely as any other.
- How do I generate random numbers without repeats?
- Turn on No repeats, then set How many. Every number in the list will be different. You cannot ask for more numbers than the range holds, so 1 to 10 gives at most 10 numbers without repeats.
- How do I pick a raffle winner?
- Give every ticket or entry a number from 1 up to the total, set that as your range, and generate one number. For more than one winner, set How many to the number of winners and turn on No repeats.
- How do I draw numbers one at a time without repeats, like bingo?
- Set the full range (for example 1 to 75), set How many to the size of the range, and turn on No repeats. Leave Sort results on Draw order. The list is the full calling order, so read the numbers out from left to right.
- Why did I get the same number twice in a row?
- Each draw is independent, so repeats happen more than most people expect. With a range of 1 to 10 there is a 10% chance the next number matches the last one. If you pick 10 numbers from 1 to 100, there is about a 37% chance that at least two are the same. Turn on No repeats if you need every number to be different.
- Is this random number generator truly random?
- It uses your browser's crypto.getRandomValues(), the secure random number generator used for encryption keys. Its output cannot be predicted in practice. It is not a physical source like dice or radio noise, but for games, draws, and sampling there is no difference you could detect.
- Can I generate random decimal numbers?
- Yes. Set Decimal places to any value from 1 to 6. With 2 decimal places and a range of 0 to 1, you get numbers like 0.47, and every step of 0.01 from 0.00 to 1.00 is equally likely.
- Can I use negative numbers or very large ranges?
- Yes. The minimum and maximum can each be anywhere from minus one quadrillion to one quadrillion (1,000,000,000,000,000), so a range like -50 to 50 works fine.
- Are my numbers saved or sent anywhere?
- No. The numbers are made in your browser and nothing is uploaded. Your last 20 results are listed on the page, and they are gone when you reload or close it.