GENERATOR

Random Number Generator

Generate one or more random numbers within a range you set.

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

  1. Set a minimum and maximum to define your range.
  2. Choose how many numbers you need, up to 200.
  3. Enable "No duplicates" if each result should be unique.
  4. Click Generate and copy the results.

Common use cases

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 generatedChance of a repeat, range 1–10Chance of a repeat, range 1–100
210.0%1.0%
328.0%3.0%
569.8%9.7%
1099.96%37.2%
20100% (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

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

What does "No duplicates" do?

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.

How random are the generated numbers?

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.

What's the maximum number of results I can generate at once?

Up to 200 numbers per generation, which comfortably covers most raffles, sampling tasks, and quick randomization needs.

Can the random number generator give decimals?

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.

Is every number equally likely in the 1 to 100 range?

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.

What are the odds of getting the same number twice?

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.