Random Number Generator

Pick a random number between any two values, or generate a whole list of unique numbers for draws, games, sampling and testing. Results use your browser’s cryptographic random generator.

100% freeNo sign-upRuns in your browserWorks on mobile
?
Set a range and press Generate

How to use the Random Number Generator

  1. Enter the lowest and highest number you want, or tap a preset such as 1–100 or 6 from 49.
  2. Choose how many numbers to generate and whether you want whole numbers or decimals.
  3. Tick No repeats for draws where each number can come up only once, and pick a sort order if you like.
  4. Press Generate. Copy the result or download a list as a text file.

Features

  • Any range, including negative numbers and decimals up to 10 places
  • Up to 10,000 numbers at once, with or without repeats
  • Cryptographically secure and free of modulo bias
  • Sort ascending or descending, and choose the separator
  • Quick presets for dice and lottery-style draws
  • Sum, average, lowest and highest shown for lists

What makes a random number fair

A random number generator is fair when every value in the range has exactly the same chance of being picked, and when earlier results tell you nothing about the next one. Many simple generators fall short on both counts. They use Math.random(), a fast pseudo-random function designed for animations and games rather than draws, and then squeeze its output into a range in a way that slightly favors some numbers.

This tool uses crypto.getRandomValues, the cryptographically secure generator your browser provides for security work such as creating encryption keys. It then maps random bits to your range with rejection sampling: if a raw value falls in the small leftover region that would make some results more likely than others, it is discarded and a new one is drawn. The result is a perfectly even distribution, whether the range is 1 to 6 or 1 to a trillion.

Repeats or no repeats?

With repeats allowed, every number is drawn independently, like rolling a die several times: the same value can come up twice. With No repeats ticked, the tool behaves like drawing numbered balls from a bag without putting them back, which is what you want for raffles, picking winners or choosing a random sample of rows from a spreadsheet. You cannot ask for more unique numbers than the range contains; 1 to 10 has only ten distinct values, and the tool will tell you if your request is impossible.

How the range is counted

Both ends are included. A range of 1 to 10 can produce 1 and 10. For decimals, the number of possible values depends on the precision: 0 to 1 with two decimal places gives 101 possibilities (0.00, 0.01 … 1.00), each equally likely.

Useful odds to know

DrawPossible outcomesChance of one exact result
One number from 1–10101 in 10
One number from 1–1001001 in 100
Two dice (ordered)361 in 36
6 unique from 49 (any order)13,983,8161 in 13,983,816
5 unique from 69 (any order)11,238,5131 in 11,238,513

The lottery rows use the combination formula C(n, k) = n! / (k! × (n − k)!), which counts the ways to choose k numbers from n when order does not matter.

Ideas for using it

  • Pick a giveaway winner by numbering entries and drawing one number.
  • Choose a random sample of survey responses or rows to audit.
  • Assign people to teams or seats with a no-repeat list.
  • Create test data for spreadsheets and software.

For a more visual draw, try the Spin the Wheel tool, or roll real dice notation with the Dice Roller. Lottery presets are for fun only: no generator can predict or improve your odds in a real lottery.

Frequently asked questions

Are these numbers truly random?

They come from your browser’s cryptographically secure random generator, which is seeded by unpredictable data from your operating system. That is the same source used for encryption keys and is suitable for draws and games.

Are the minimum and maximum included?

Yes. Both ends of the range can be picked. A range of 1 to 6 behaves exactly like a six-sided die.

How do I generate numbers without duplicates?

Tick “No repeats”. Each value can then appear at most once, like drawing tickets from a hat. The number you ask for must not be larger than the count of values in the range.

Can I generate random decimals?

Yes. Choose Decimals and set 1 to 10 decimal places. Every value at that precision within your range is equally likely.

Can this help me win the lottery?

No. Every combination in a fair lottery has the same chance, and no tool can predict the draw. The presets simply save you choosing numbers yourself.

More generators

Other free tools you might need next.

View all 11