Skip to main content
CalcChef

Random Number Generator

Random number generator: draw 1 to 10,000 numbers between a minimum and maximum you set, as whole numbers or decimals, with or without repeats, sorted or not. How it works

Use the Random Number Generator

0 gives whole numbers; up to 10.

Will generate 1 whole number from 1 to 100, both included.

Random number
Press Generate

About the Random Number Generator

For one number from 1 to 100, leave the settings as they are and press Generate: every value from 1 to 100 is equally likely, and both ends are included. Change Min, Max, Quantity and Decimal places for other draws, such as 6 different numbers from 1 to 49. This random number generator draws on the browser’s cryptographic generator, crypto.getRandomValues, and discards out-of-range draws so no value is favored.

Common draws and their settings

UseMinMaxQuantityDecimal placesAllow duplicatesSort resultsSummary shown above the Generate button
One number from 1 to 100 (the default)110010OnOffWill generate 1 whole number from 1 to 100, both included.
Roll one die1610OnOffWill generate 1 whole number from 1 to 6, both included.
Roll two dice1620OnOffWill generate 2 whole numbers from 1 to 6, both included, repeats allowed.
Flip a coin (0 or 1)0110OnOffWill generate 1 whole number from 0 to 1, both included.
Lottery pick, 6 from 4914960OffOnWill generate 6 whole numbers from 1 to 49, both included, no repeats, sorted from lowest to highest.
Three winners from 250 tickets125030OffOffWill generate 3 whole numbers from 1 to 250, both included, no repeats.
Shuffle the numbers 1 to 10110100OffOffWill generate 10 whole numbers from 1 to 10, both included, no repeats.
A percentage with two decimals010012OnOffWill generate 1 number with 2 decimal places from 0.00 to 100.00, both included.
Five numbers from -10 to 10, sorted-101050OnOnWill generate 5 whole numbers from -10 to 10, both included, repeats allowed, sorted from lowest to highest.

The last column is the line the generator shows for those settings before anything is drawn.

How to use this tool

  1. Enter Min and Max. Both are part of the range.
  2. Set Quantity (1 to 10,000) and Decimal places (0 for whole numbers, up to 10).
  3. Untick Allow duplicates to get each number at most once. Tick Sort results to list them from lowest to highest. Tick Pad with leading zeros to write whole numbers to the width of Max, so 0 to 9999 gives 0042.
  4. Check the summary line, press Generate, and use Copy Results to copy the numbers separated by commas. Share link copies a link with the settings only; whoever opens it gets a new draw.

Frequently asked questions

Is this a true random number generator?
No. The numbers come from crypto.getRandomValues, which MDN describes as giving cryptographically strong random values from a pseudo-random number generator seeded with enough entropy. It is not a hardware or physical source of randomness.
How do I generate random numbers without repeats?
Untick Allow duplicates. The numbers are then drawn without replacement, like tickets from a hat. The quantity cannot be larger than the count of values in the range: asking for 7 different numbers from 1 to 6 gives an error message and no numbers.
How do I pick lottery numbers, such as 6 from 49?
Min 1, Max 49, Quantity 6, Allow duplicates off, Sort results on. The summary line reads "Will generate 6 whole numbers from 1 to 49, both included, no repeats, sorted from lowest to highest." A random pick has the same chance of winning as any other six numbers.
Are the minimum and the maximum included?
Yes. From 1 to 6 means 1, 2, 3, 4, 5 or 6, each with a 1 in 6 chance.
Can it generate random decimals?
Yes. Set Decimal places from 1 to 10. With 2 places and a range of 0 to 100, the result is one of the 10,001 values from 0.00 to 100.00. Min and Max may have as many decimals as the Decimal places setting, and no more.
Can I use it for a giveaway or a prize draw?
For an informal draw, yes: number the entries, set Max to the number of entries and press Generate. Nothing about the draw is recorded, so it cannot show anyone afterward that the result was not rerun. Share link shows others the range you used, not your result: opening it draws new numbers. A draw with legal requirements needs a process that meets them.

Related Tools

View all tools