Random Number Generator

Pick one random number or up to 1,000 at once from any whole-number range. Choose whether numbers may repeat and whether to sort them, then copy the results with one click. Numbers come from your browser's cryptographically secure random generator.

  • 100% free
  • No sign-up
  • Runs in your browser
  • Updated

From 1 to 1,000. Both ends of the range are included.

How to use the Random Number Generator

  1. 1Enter the minimum and maximum. Both ends of the range can be drawn.
  2. 2Enter how many numbers you need, from 1 to 1,000.
  3. 3Tick Allow duplicates if the same number may appear more than once; leave it unticked for unique numbers.
  4. 4Tick Sort results to list the numbers from smallest to largest.
  5. 5Press Generate for a new set, and Copy to copy the numbers as a comma-separated list.

How the numbers are generated

Many simple generators rely on Math.random, which is fast but predictable and not intended for anything that needs to be fair. This tool uses the Web Crypto API built into every modern browser, the same source used for encryption keys. It draws a random 32-bit value and maps it into your range using rejection sampling, discarding the few values that would make some numbers slightly more likely than others. Every whole number from the minimum to the maximum has exactly the same chance.

The numbers are created on your device and nothing is sent to a server. The same secure source powers our password generator.

Unique numbers versus duplicates

With duplicates allowed, each draw is independent, like rolling a die again and again: the same number can come up twice in a row. Without duplicates, the tool works like drawing numbered balls from a bag without putting them back, so every number in the result is different.

Unique draws have a limit: you cannot pick more numbers than the range contains. From 1 to 10 there are only 10 different whole numbers, so asking for 12 unique ones is impossible and the tool will ask you to widen the range, lower the count or allow duplicates.

Common uses

Choose a winner for a giveaway by numbering the entries and drawing one number. Assign people to groups or a running order by drawing unique numbers from 1 to the number of people. Teachers use it to pick students to answer questions, and game players use it in place of dice: set 1 to 6 for a standard die or 1 to 20 for a d20.

It is also handy for sampling, such as picking 50 random rows from a spreadsheet of 2,000, and for creating test data. Paste a generated list into the average calculator to see how the mean of random numbers settles near the middle of the range as the count grows.

Lottery numbers and the odds

To simulate a 6-from-49 lottery, set the range to 1 to 49, ask for 6 numbers, leave duplicates off and sort the results. There are 13,983,816 possible combinations, so any one ticket has about a 1 in 14 million chance of matching all six. No generator can improve those odds, because every combination is equally likely.

For a sense of scale, picking 5 unique numbers from 1 to 100 gives over 75 million possible sets. Explore other math tools for working with the results.

Frequently asked questions

Are these numbers truly random?

They come from a cryptographically secure pseudo-random generator seeded by your operating system with unpredictable hardware events. For practical purposes, including draws and games, they are unpredictable and evenly distributed.

Can I generate negative numbers?

Yes. Enter a negative minimum, such as −50 to 50. The range can span from −1,000,000,000 to 1,000,000,000.

Can I generate decimal numbers?

The tool produces whole numbers only. For decimals, generate whole numbers in a scaled range and divide: for values from 0.00 to 1.00, generate 0 to 100 and divide each result by 100.

Why do the numbers change when I edit a setting?

A fresh set is drawn whenever the range, count or options change, so the results always match the settings shown. Copy the list before changing anything if you need to keep it.

Is a sorted result less random?

No. Sorting only changes the order in which the numbers are displayed after they have been drawn. Which numbers were chosen is unaffected.

Related tools