Random Number Generator

Generate one or many random numbers within a range, with optional decimals and no-duplicate results.

🎲 Random values are generated locally in your browser with its cryptographic random number generator.

Generate random numbers online

Set a minimum and maximum value, choose how many numbers you need and optionally add decimal places or require unique results.

How to use the random number generator

  1. Enter the minimum and maximum values.
  2. Choose the quantity and decimal places.
  3. Optionally enable unique results.
  4. Select Generate Numbers.

Common uses

Random numbers are useful for games, classroom activities, testing, sampling, simulations and any task that needs an unpredictable value within a range.

Choose numbers from a finite range

For one six-sided die, enter minimum 1, maximum 6, quantity 1 and 0 decimal places. To select three different labels from that range, change quantity to 3 and enable No duplicate results. The chosen range includes both endpoints when they fit the decimal precision.

Why a unique request can fail

Only six whole numbers exist from 1 through 6. Asking for seven unique results at 0 decimal places cannot succeed. Reduce the quantity, widen the range or allow duplicates. From 1.0 to 1.2 at one decimal place, only 1.0, 1.1 and 1.2 are available.

The tool supports up to 100 results and 0 to 8 decimal places. It provides no shared draw record or independent audit trail. Save values yourself for repeatable tests. For identifiers, use the UUID Generator.

How the numbers are generated

Every number comes from your browser's cryptographic random number generator, crypto.getRandomValues(), the same source used for passwords and encryption keys. If your browser can't provide it, the tool shows an error instead of quietly using a weaker method.

The tool also avoids a common bias. Many simple generators take a random number and use the remainder after dividing by the size of the range, which makes some results slightly more likely than others. This tool draws just enough random bits for the range and throws away any value that falls outside it, then draws again. For 1 to 6 it draws 3 bits, a number from 0 to 7; if it gets 6 or 7, it discards them and tries again, so each face has exactly the same chance.

  • Both ends are included. 1 to 6 can return 1 and 6.
  • Decimals are equally likely too. From 1.0 to 1.2 at one decimal place there are three possible values, and each has a 1 in 3 chance.
  • No duplicates picks from the values that haven't been drawn yet, like taking numbered balls out of a bag without putting them back.

Why repeats appear sooner than you'd expect

With duplicates allowed, repeats are common. Drawing 10 numbers from 1 to 100 gives at least one repeat 37.2% of the time, and rolling a die 6 times gives at least one repeated face 98.5% of the time. That's normal randomness, not a fault. Turn on No duplicate results when every result must be different, such as raffle winners or a random order of people.

DrawChance
A specific number in one draw from 1 to 1001 in 100 (1%)
At least one repeat in 10 draws from 1 to 10037.2%
At least one repeated face in 6 dice rolls98.5%
A given entry among 3 winners drawn from 4123 in 412 (0.73%)

Sources

Frequently Asked Questions

Can I generate more than one random number?

Yes. You can generate up to 100 values at a time.

Can I generate decimal numbers?

Yes. Choose between 0 and 8 decimal places.

Can I avoid duplicate numbers?

Yes. Enable the no-duplicates option. The requested quantity must fit the values available at your selected decimal precision.

Are the numbers generated on my device?

Yes. The tool runs in your browser and uses its cryptographic random number generator. If that isn’t available, it shows an error rather than using a weaker method.

Running a fair giveaway draw

  1. Remove invalid entries, sort the list neutrally and number it from 1 to N. Save a copy.
  2. Set Minimum to 1 and Maximum to N, decimal places to 0, and turn on No duplicate results.
  3. Draw the winners plus a few backups in one go, and record the screen while you do it.
  4. Publish the winning numbers with the numbered list (usernames only).

Generate once; redrawing until you like the result isn't fair. Example: 437 comments, minus 19 duplicates and 6 late entries, leaves 412 valid entries to draw from. The full method is in How to Pick a Fair Random Winner.

Related guides

More free tools