About this tool
Numbers are generated using your browser's built-in random number source. Enable "no duplicates" for draws like raffles or sampling without replacement.
How to use the Random Number Generator
- Set a minimum and maximum to define your range.
- Choose how many numbers you need, up to 200.
- Enable "No duplicates" if each result should be unique.
- Click Generate and copy the results.
Common use cases
- Picking a winner for a raffle or giveaway
- Drawing a random sample from a numbered list without replacement
- Generating test data or random IDs for a spreadsheet
- Settling a decision between a few numbered options
Worked example
Running a raffle with 150 entries? Set minimum to 1, maximum to 150, count to 1, and enable "No duplicates" — click Generate and you get a single fair winner, say ticket #87. For a classroom pick-three exercise, set count to 3 with "No duplicates" checked so the same student's number can't come up twice. Without the duplicates option, count to 5 with a 1–6 range simulates five independent dice rolls, where the same number can (and often will) repeat, just like real dice.
Things to watch out for
"No duplicates" requires enough numbers in your range to satisfy the count you're asking for — requesting 20 unique numbers from a 1–10 range is mathematically impossible, and the tool will tell you so rather than silently returning fewer than requested. Also, this generator uses the browser's general-purpose random function, which is fine for games, raffles, and sampling, but isn't cryptographically secure — for anything security-related (generating a secret token or key), use the Password Generator's crypto-grade randomness instead. One subtlety with small ranges: if you generate a small batch of unique numbers from a small range repeatedly (say, always drawing 3 unique numbers from 1–5), don't expect a perfectly even spread over just a handful of trials — true randomness produces streaks and uneven-looking clusters in small samples, which is expected statistical behavior, not a flaw in the generator.
Need a unique identifier instead of a random draw? See UUID vs. Random Number: Which Generator Do You Actually Need?
The odds for 1 to 100 and 1 to 10
With duplicates allowed, every draw is independent. Each number from 1 to 100 has a 1 in 100 chance on every draw, and each number from 1 to 10 has a 1 in 10 chance, whatever came up before. Repeats turn up sooner than most people expect. The table shows the chance that at least two results match when you generate several numbers without the No duplicates option.
| Numbers generated | Chance of a repeat, range 1–10 | Chance of a repeat, range 1–100 |
|---|---|---|
| 2 | 10.0% | 1.0% |
| 3 | 28.0% | 3.0% |
| 5 | 69.8% | 9.7% |
| 10 | 99.96% | 37.2% |
| 20 | 100% (more draws than numbers) | 87.0% |
Even in a 1–100 range, 10 draws have better than a 1 in 3 chance of containing a repeat. If a repeat would be a problem, such as picking several different winners, turn on No duplicates.
How the draws are made
- With duplicates allowed, each result is the minimum plus a whole number from 0 up to the size of the range minus one, picked from your browser's
Math.random(). - With No duplicates, the tool lists every number in the range, shuffles the whole list with the Fisher–Yates method, and takes the first numbers from the shuffled list. Given an unbiased random source, every order is equally likely, so it behaves like drawing tickets from a hat.
- Whole numbers only. The minimum and maximum are read as whole numbers, so 1.9 is treated as 1.
- Negative numbers work. A range of −10 to 10 contains 21 possible values, including 0.
Because No duplicates builds a list of the entire range, a very large range such as 1 to 100,000,000 can make the page slow or run out of memory in that mode. For a few unique numbers from a huge range, generating with duplicates allowed and checking by eye is quicker.
Picking lottery-style numbers
Set the range and count to match the game and turn on No duplicates. For a pick-6-from-49 game, there are 13,983,816 possible combinations, so any one set of numbers has exactly that 1 in 13,983,816 chance. No set from any generator is more likely to win than another. For a coin toss or dice, see the Coin Flip tool.
Frequently asked questions
It generates each result only once, like drawing raffle tickets without putting them back. If you request more unique numbers than exist in your range, the tool will tell you it isn't possible.
Numbers use your browser's built-in random function, which is suitable for games, raffles, and everyday sampling. For cryptographic or security-sensitive randomness, use the Password Generator instead, which relies on a cryptographically secure source.
Up to 200 numbers per generation, which comfortably covers most raffles, sampling tasks, and quick randomization needs.
No. The minimum and maximum are read as whole numbers, and every result is a whole number within the range. If you need one decimal place, generate from 10 to 100 and divide the result by 10 yourself, which gives values from 1.0 to 10.0 in steps of 0.1.
Yes, as far as the browser random source allows. Each result is the minimum plus a whole number chosen evenly across the size of the range, so 1 and 100 have the same chance as 50. Streaks and clusters in a short run are normal and do not mean the draw is biased.
For two draws from 1 to 100, it is 1 in 100, because the second draw matches the first one percent of the time. The chance of some repeat grows quickly as you draw more: about 9.7% with five draws and 37.2% with ten, with duplicates allowed.