Skip to main content

Home  ›  Math  ›  Random Number Generator
Free & Instant

Random Number Generator

Pick one random number or a whole set. Choose your range, decide how many numbers you need, and every value in the range has an equal chance of coming up.

Random Number Generator

Set your range, choose how many numbers you need, and generate.

Your Random Number

—

Both the minimum and the maximum can come up. Numbers are generated in your browser and are not sent to our server.

What is a random number generator?

A random number generator (RNG) picks a number from a range you choose, and every number in that range has the same chance of coming up. It is a quick way to make a fair pick when you do not want to choose yourself, or when other people need to trust that you did not.

How to use this random number generator

  1. Enter the lowest number in Minimum Value and the highest in Maximum Value.
  2. Choose how many numbers you need and how many decimal places, if any.
  3. Untick Allow duplicates if every number must be different, then press Generate Random Number.

Both ends of your range can come up, so 1 to 10 can return 1 or 10. Negative values work too, for example -50 to 50. Use the copy button to paste your numbers wherever you need them. If the minimum is higher than the maximum, you will see a message asking you to fix the range.

What people use a random number for

  • Giveaways and raffles: Number your entries from 1 to the total, then untick Allow duplicates and ask for as many winners as you need. For 3 winners from 250 entries, use 1 to 250, a count of 3, and no duplicates.
  • Games and turn order: Decide who goes first, or roll a custom die such as 1 to 20.
  • Classroom and team picks: Number the names on a list and let the generator choose, so nobody feels singled out.
  • Quick decisions: Give each option a number and pick one.
  • Spot checks and sampling: Choose a few numbered rows or records to review when you cannot check them all.
  • Decimals: Create test values or sample data, for example 0 to 1 with 2 decimal places.

If you run a public giveaway, share your range and keep a screenshot of the result so entrants can see the draw was fair.

How the numbers are picked

Your browser supplies random bits through the Web Crypto API. The tool turns those bits into a whole number inside your range. To keep things fair, it discards any value that would favour the lower numbers (a standard method called rejection sampling), so each number has the same chance. Decimals are made by working in steps of 0.1, 0.01 and so on, then dividing back. If a browser does not support Web Crypto, the tool falls back to the standard Math.random() function.

Result = (Min × 10d + k) ÷ 10d k = a whole number chosen at random from 0 to (Max − Min) × 10d

Here d is the number of decimal places. For 1 to 10 with no decimals (d = 0), k is a whole number from 0 to 9, and adding 1 gives a result from 1 to 10. Earlier results never affect the next one, so when duplicates are allowed the same number can appear twice in a row. That is normal for a fair generator, not a bug.

Pseudo-random vs. truly random

A computer cannot produce perfect randomness on its own. Web Crypto draws on your device's secure random source, which is unpredictable and far stronger than a basic generator, and more than good enough for draws, games and everyday picks. Methods that measure physical noise are called truly random, but for everyday use the difference does not matter. This tool is for picking numbers, though, not for creating passwords or security keys. For that, use our Password Generator.

Frequently asked questions

Is this random number generator truly random?+
It uses your browser's secure random source (Web Crypto), which is unpredictable and fair for games, giveaways and everyday picks. Strictly speaking it is pseudo-random, because it comes from an algorithm seeded by your device. For passwords or security keys, use a dedicated password generator instead.
Can I generate negative numbers?+
Yes. Set the minimum to a negative number and negative results become possible. A range such as -50 to 50 works as you would expect.
Are the minimum and maximum values included?+
Yes. The generator is inclusive on both ends. If you set 1 to 10, both 1 and 10 can be the result.
Can I get several numbers at once without repeats?+
Yes. Set How Many Numbers and untick Allow duplicates. Every number will then be different. If your range has fewer possible values than the count you asked for, the tool tells you so you can widen the range.
Can I generate decimal numbers?+
Yes. Choose 1 to 4 decimal places. Values are picked in equal steps, such as 0.1 or 0.01. If your minimum or maximum has more decimals than you selected, the tool rounds inward so every result stays inside your range.
Can the same number come up twice in a row?+
Yes, when duplicates are allowed. Each number is chosen independently, so repeats can happen, especially in small ranges. Untick Allow duplicates when you need every number to be different.
Can I use it to pick a giveaway winner?+
Yes. Number your entries from 1 to the total, generate a number, and the matching entry wins. For several winners, untick Allow duplicates and raise the count. Share your range publicly and keep a screenshot of the result. If your giveaway is regulated where you live, check the local rules first.
Are there any limits?+
Minimum and maximum values must be between -1,000,000,000 and 1,000,000,000, and you can generate up to 100 numbers at a time.