Random Number Generator

Pick one or many random numbers between any minimum and maximum, with optional decimals, no duplicates and sorted output. The numbers come from your browser's secure random source, and it is free and instant.

Random Number GeneratorPrivate · runs on your device
Your number will appear here

How to use the random number generator

Set the range, press the button and read the result.

  1. Enter a Minimum and a Maximum. They start at 1 and 100, and both ends can be drawn. If you enter them the wrong way round, the tool swaps them.
  2. Set How many, from 1 to 1,000.
  3. Use Decimal places for fractional values, from 0 for whole numbers up to 10.
  4. Tick No duplicates for draws where a number may appear only once, and Sort results to list them from lowest to highest.
  5. Click Generate number. Up to 12 numbers are shown one per line, and longer lists are shown as one comma separated line.

Minimum and maximum may be anywhere from -1,000,000,000 to 1,000,000,000.

Two quick examples. Minimum 0, Maximum 1, Decimal places 2 and How many 5 gives five values such as 0.37, 0.82 and 0.04, each between 0 and 1. If you type a fractional limit with Decimal places at 0, such as 2.5 to 7.5, the tool rounds the minimum up and the maximum down, so only the whole numbers 3 to 7 can appear. Negative ranges work too, which suits temperature or score sample data.

How the numbers are drawn

Whole numbers come from crypto.getRandomValues using rejection sampling, which discards any raw value that would favour one end of the range, so every integer has exactly the same chance. With 1 and 100, each number has a 1 in 100 chance on each draw. Decimals are made by taking a random fraction of the range and rounding to your chosen places, and trailing zeros are dropped, so 3.50 appears as 3.5.

Duplicates are allowed unless you tick No duplicates, and repeats are more common than people expect. In a list of 23 numbers from 1 to 365, the chance of at least one repeat is about 50 per cent. For a lottery-style draw of six numbers from 1 to 49, set the range, set How many to 6 and tick both No duplicates and Sort results. There are 13,983,816 possible combinations, and each is equally likely. To roll two dice, use 1 to 6 with a count of 2 and duplicates allowed.

If the range holds fewer whole numbers than you ask for with No duplicates on, the tool reports that the range has fewer than that many unique numbers. With decimals, make sure the range holds enough distinct values at your chosen places, because the tool cannot warn you in that case.

There is no seed, so running the same settings twice almost never repeats a result. If you need a repeatable list for a test, generate it once and save it. Lists longer than 12 numbers come out on one comma separated line, which is ready to paste into a spreadsheet cell or a code array, while shorter lists are easier to read one per line.

Fair draws and what this tool is not for

Because every draw is independent and unseeded, you cannot reproduce a previous result, and no history is kept. For a giveaway, number the entries, draw with No duplicates, and note down the result before you close the page, ideally while the participants watch. For choosing between named options, the random choice picker is simpler.

  • Teaching: create practice problems or sample data, then use the average calculator to check the mean and spread.
  • Sorting: drop any list into the number sorter for a different order or to remove repeats.
  • Games: roll dice of any size or choose a starting player.
  • Testing: fill forms and spreadsheets with sample quantities and prices.

Some ready-made recipes: a coin flip is 1 to 2 with one number; a percentage roll is 1 to 100; a raffle among 250 tickets is 1 to 250 with the number of prizes as How many and No duplicates ticked; and a PIN-style sample of four digits is 0 to 9 with a count of 4 and duplicates allowed. Never use it to create a real PIN or password.

It is a general-purpose generator, not a licensed lottery or gambling system, and numbers for security purposes such as keys should come from the password generator. For letters instead of numbers, there is the random letter generator. Nothing you set is uploaded.

Quick answers

Frequently asked questions

The questions people ask most, answered in plain words.

How do I pick a random number between 1 and 100?

Leave Minimum at 1 and Maximum at 100, keep How many at 1 and click Generate number. Both limits can be drawn, so 1 and 100 are possible results. Raise How many if you want several numbers from the same range in one go.

Can I generate random numbers without duplicates?

Yes. Tick No duplicates and every number in the result will be different, like drawing balls from a bag without putting them back. For whole numbers, How many cannot be larger than the number of integers in your range, or the tool reports an error.

Is this random number generator truly random?

It uses the browser's secure generator, crypto.getRandomValues, which is seeded by the operating system. Results are unpredictable and evenly spread, far better than a simple timer-based function. Like all software generators, it is technically pseudo-random, but that is more than enough for draws and games.

Can it generate decimal numbers?

Yes. Set Decimal places to a value from 1 to 10 and the tool returns values such as 3.72 or 0.5 within your range. Trailing zeros are dropped, so 3.50 is shown as 3.5. Keep it at 0 for whole numbers.

Is it fair to use for a giveaway?

Yes, in the sense that every number has an equal chance on each draw and earlier results have no effect. Number the entries, tick No duplicates when drawing several winners, and record the result straight away, because the page does not keep a history of draws.