Random Number Generator

Pick a random number from any range, or a whole batch with no repeats. One tap for 1–10, 1–100, dice, a coin flip or lottery numbers.

Quick picks

Exclude numbers

Whole numbers or ranges, separated by commas. After a draw, Exclude these next time adds the winners here, so a second draw can't pick them again.

Why use a random number generator?

Picking a number "at random" in your head isn't random: people steer away from the ends of a range and drift toward favorites like 7. Paper slips and coin flips are fair but slow, and hard to show afterwards. This generator draws from your browser's cryptographic random source, gives every number in your range the same chance, and can draw a whole batch without repeats, which is what raffles, classroom picks and sampling actually need. It also keeps a list of your recent draws on this device, so you can show what came up.

How to use it

  1. Tap a quick pick (1–10, 1–100, a die, two dice, a coin or 6/49 lottery numbers), or type your own Minimum and Maximum. Both ends are included and negative numbers work.
  2. Set How many to draw several numbers at once, and tick No repeats when each number may come up only once.
  3. Open Exclude numbers to leave some out, such as tickets that weren't sold or winners already drawn.
  4. Press Generate (or Enter). Copy or share the result; it's also saved under Recent draws.

Random numbers between 1 and 10, 1 and 100, or any range

A range of 1 to 10 holds ten possible values, with 1 and 10 both included. The count is always the maximum minus the minimum plus one, so 0 to 9 is also ten values and −5 to 5 is eleven. The generator works in whole numbers and rounds a decimal limit inward, so every result stays inside the range you typed: 1.5 to 3.5 draws from 2 and 3. Both ends can be as large as ±9,007,199,254,740,991, the biggest whole number a browser stores exactly, and one draw returns up to 10,000 numbers. With several numbers you also get their total and average, which is handy for dice.

Unique draws, repeats and exclusions

With No repeats off, each number is drawn independently, so repeats are possible, just as two dice can both land on 4. With it on, a number can't appear twice in the same draw, like pulling tickets from a hat without putting them back. That also means you can't ask for more unique numbers than the range holds: 10 unique numbers from 1 to 5 is impossible, and the tool tells you so.

Exclude numbers removes values from the pool before anything is drawn, so the remaining numbers stay equally likely. Type single numbers or ranges, like 7, 13, 20-25. For a raffle drawn in rounds, pressExclude these next time after each round: the winners go into the list and can't be picked again, even with No repeats off.

Dice, coins and lottery numbers

Roll a die draws from 1 to 6, and Roll 2 dice draws two independent numbers and adds them. Rolling two dice is not the same as picking a number from 2 to 12: there is only one way to throw a 2 but six ways to throw a 7, so the totals cluster in the middle.

How often each total comes up with two six-sided dice
Two-dice totalWays out of 36Chance
212.8%
325.6%
438.3%
5411.1%
6513.9%
7616.7%
8513.9%
9411.1%
1038.3%
1125.6%
1212.8%

Flip a coin draws 1 or 2 and shows it as Heads or Tails; set How many to flip several coins and see the tally.Lotto 6/49 draws six different numbers from 1 to 49 and sorts them. Every set of numbers has exactly the same chance, in this generator and in a real draw, including 1, 2, 3, 4, 5, 6. The odds of matching every main number depend only on how many are drawn and from how many:

Odds of matching all the numbers in common lottery formats
FormatOdds of matching all of them
6 numbers from 1 to 491 in 13,983,816
5 numbers from 1 to 501 in 2,118,760
7 numbers from 1 to 351 in 6,724,520
5 numbers from 1 to 691 in 11,238,513
6 numbers from 1 to 591 in 45,057,474

Games that also make you match a bonus number from a separate pool multiply those odds by the size of that pool. A generator can't improve the odds: it only saves you choosing.

How the randomness is generated

Every number starts as raw bits from crypto.getRandomValues, the browser's cryptographically secure generator and the same source used to create encryption keys. It is seeded by your operating system from hardware events, so its output can't be predicted from earlier draws. It is not Math.random, which was never meant to be unpredictable. A range of up to about 4.3 billion values is drawn from one 32-bit value; a wider range combines two of them into a 64-bit value so every number in it can still come up.

Turning that raw value into a number in your range takes care. Taking the remainder after division on its own quietly favors some results. Picture a source that only produced 0 to 9 and a range of 1 to 3: the remainders would give one number four chances in ten and the other two three each. The generator uses rejection sampling instead. It discards the few raw values at the top that would cause the imbalance and draws again, so every number in your range is exactly as likely as every other. Unique draws use a partial Fisher–Yates shuffle that only tracks the positions it touches, so drawing 5 numbers from a range of a billion is as quick as drawing 5 from 50.

Common uses

  • Raffles and giveaways. Number the entries, turn on No repeats, and draw a few extra numbers as alternates in case a winner doesn't reply. The Recent draws list and a screenshot of the settings make the draw easy to show. To spin for names instead of numbers, use the wheel spinner.
  • Classroom and team picks. Give everyone a number and draw one; exclude people who have already had a turn.
  • Sampling. To audit or survey part of a list, number its rows and draw a unique sample of the size you need, sorted ascending so it's easy to find each row.
  • Random order. To shuffle presenters or teams, set the range to 1 through the group size, draw that many unique numbers, and keep draw order. To shuffle lines of text directly, the text sorter can randomize a list.
  • Games. Roll dice for a board game, settle who goes first with a coin flip, or practice guessing with the guess the number and higher or lower games.

Random numbers are not a substitute for a password: for that, the password generatordraws letters, digits and symbols from the same secure source, and the UUID generator makes random identifiers.

Mistakes to avoid with random draws

  • Redrawing until you like the result. Once you redraw selectively, the draw stops being random. Decide the rules, such as how many alternates, before you press Generate.
  • Forgetting that both ends count. For 100 tickets numbered 1 to 100, the range is 1 to 100, not 0 to 100, which would add a 101st ticket.
  • Expecting results to even out. After five tails in a row, heads is still exactly a 50% chance. Streaks are normal in random data.
  • Leaving repeats on for winners. If one person can't win twice, turn on No repeats or exclude earlier winners.

Frequently Asked Questions

How do I generate a random number between 1 and 10?

Tap the 1–10 quick pick, or type 1 as the minimum and 10 as the maximum and press Generate. Both 1 and 10 can come up, and each of the ten numbers has exactly the same chance. The 1–100 and 1–1000 buttons work the same way, and any other range just needs a minimum and maximum.

Is this random number generator truly random?

It uses your browser's cryptographically secure generator (crypto.getRandomValues), which your operating system seeds from unpredictable hardware events. Its output can't be predicted from earlier results, which is the standard used for encryption keys, and rejection sampling makes every number in your range equally likely. It isn't a physical source like atmospheric noise, but for raffles, games, sampling and decisions the difference can't be detected.

How do I pick random numbers without repeats?

Tick No repeats and set How many. Each number can then appear only once in the draw, like pulling tickets from a hat. The count can't exceed the size of the range, which is the maximum minus the minimum plus one, so 10 unique numbers from 1 to 5 is refused with an explanation.

How do I pick a raffle or giveaway winner fairly?

Number the entries 1 to N in the order they arrived, set the range to 1 to N, turn on No repeats, and set How many to the number of winners plus a few alternates. Keep draw order, so the first number drawn is the first winner. Decide the rules before you draw, and keep a screenshot or the Recent draws list to show how it was done.

Can I exclude certain numbers from the draw?

Yes. Open Exclude numbers and type single numbers or ranges separated by commas, such as 7, 13, 20-25. They're removed from the pool before anything is drawn, so the remaining numbers stay equally likely. After a draw, Exclude these next time adds the numbers just drawn, which is the easy way to run a raffle or a bingo-style draw in rounds.

Can it roll dice or flip a coin?

Yes. Roll a die draws a number from 1 to 6, Roll 2 dice draws two and shows their total, and Flip a coin shows Heads or Tails. Set How many to roll more dice or flip more coins at once; the result shows the total for dice or the count of heads and tails for coins. Leave No repeats off, since dice and coins can match.

How do I generate lottery numbers?

Tap Lotto 6/49 for six different numbers from 1 to 49 in ascending order, or set your own format: for 5 numbers from 1 to 69, set the range to 1 to 69, How many to 5, tick No repeats and sort ascending. Every combination is equally likely, so random numbers don't improve your odds; they only save you choosing. Matching all six of 6 from 49 is a 1 in 13,983,816 chance.

Can I generate random decimal numbers?

The generator works in whole numbers, and a decimal minimum or maximum is rounded inward, so 1.5 to 3.5 draws from 2 and 3. For decimals, draw from a scaled-up range and divide: 10 to 99 divided by 10 gives 1.0 to 9.9 in steps of 0.1, and 100 to 999 divided by 100 gives two decimal places.

What range and how many numbers can I use?

Any whole-number range, including negatives such as -10 to 10, with both ends between -9,007,199,254,740,991 and 9,007,199,254,740,991, the largest whole numbers a browser can store exactly. Both ends are included, and one draw can return up to 10,000 numbers.

Can I put a list in random order?

Yes. Number your items, set the minimum to 1 and the maximum to the number of items, set How many to that same number, turn on No repeats, and keep draw order. The result is a full shuffle: every item appears exactly once, in random order.

Are my numbers or history sent anywhere?

No. Every number is drawn in your browser and nothing is uploaded. Your settings and the last 25 draws are saved in this browser's local storage so they're still there next time; Clear history removes the draws, and clearing site data removes everything.

Advertisement