Toolstia / Random number generator

Generate random numbers

Picking a number by hand is surprisingly non-random: people avoid repeats, favor the middle and shy away from the ends of a range. This generator draws numbers from your browser's cryptographic random source instead, so every value in your range is equally likely and earlier results do not influence later ones.

Set the smallest and largest number, how many you want and how many decimal places, then choose whether repeats are allowed. It handles negative ranges, produces up to 1,000 numbers per press, and lets you copy the whole list with one click. Typical uses include raffles by ticket number, assigning students to order, picking a lottery-style set, sampling rows from a spreadsheet, and creating test data. It generates numbers only; it does not store history or seed repeatable sequences.

How it works

  1. Enter the smallest and largest number.
  2. Choose how many, and whether repeats are allowed.
  3. Press Generate and copy the list.

Fair and unbiased

Every number in the range has exactly the same chance. The tool avoids the small bias that simple "multiply and round" methods have.

No repeats

With "No repeats" each number appears at most once, like drawing numbered balls. You cannot ask for more numbers than exist in the range, and the tool tells you so.

Decimals

Choose up to 6 decimal places. Numbers are picked from an evenly spaced grid, so 0 to 1 with 2 decimals gives 101 possible values from 0.00 to 1.00.

Not for security keys

The source is strong enough for games and draws. For passwords use the password generator, which is built for that.

Drawing without repeats, like numbered balls

With No repeats ticked, each press behaves like pulling balls from a bag without replacement. Ask for 3 numbers from 1 to 6 and you might get 2, 5 and 6, but never 4, 4 and 1. If you ask for more numbers than the range holds, such as 5 unique numbers from 1 to 3, the tool stops and tells you only 3 exist instead of looping forever.

For a lottery-style draw of 6 numbers from 1 to 49, there are 13,983,816 possible combinations, and each is equally likely. The tool does not sort the list for you, so the order shown is the order drawn.

What the decimal places setting really does

Decimals do not produce arbitrary floating-point values. The range is turned into a grid of evenly spaced steps, and one step is picked at random. Zero to 1 with 2 decimals gives the 101 values 0.00, 0.01 and so on to 1.00, each with the same chance, and the output keeps trailing zeros so 0.50 is shown as 0.50 rather than 0.5.

The cap is 6 decimal places. Very large ranges with many decimals are refused when the number of possible values would exceed about 4.29 billion (2 to the 32nd power), which is the size of the random value the browser supplies in one draw.

Why a plain multiply and round is not good enough

A common shortcut is to take a value between 0 and 1, multiply by the range size and round or truncate it. For ranges that do not divide evenly into the underlying random values, that slightly favors some numbers. This tool discards draws that would land in the uneven remainder and tries again, which keeps all values exactly equally likely.

Input limits and what happens at the edges

The input boxes accept digits, a minus sign and a decimal point, and cut entries off at 12 characters. The smallest number may equal the largest, in which case you simply get that number. If the smallest is greater than the largest, you get a message rather than a swapped range. The count must be at least 1 and no more than 1,000.

Fair for games, wrong for secrets

The random source is strong enough for raffles, games and classroom picks. For anything that protects an account, such as a PIN, a recovery code or a key, use the password generator, which is built for that purpose and shows how strong the result is. Also note that this tool cannot prove fairness to others: if a draw has to be witnessed, such as a public giveaway, show your screen while you press Generate.

Questions

Can I generate negative numbers?

Yes. Use a negative smallest number such as -50.

What is the most I can generate?

Up to 1,000 numbers at a time.

Can I use it for a raffle?

Yes, but for names use the Spin the wheel tool.

Is anything uploaded?

No. Everything stays in your browser and is never sent anywhere.

Can the same number appear twice in one list?

Yes, unless you tick No repeats. With repeats allowed, each number is drawn independently, so duplicates are normal, especially in small ranges.

How do I roll a six-sided die with this?

Set the smallest number to 1, the largest to 6 and the count to 1. For several dice at once, set the count higher and leave repeats allowed. The dice roller tool is a closer fit if you want dice graphics.

Can I draw random numbers that include 0?

Yes. Set the smallest number to 0, or to any negative value. Both ends of the range are included.

Why does the tool refuse my range?

Usually because the smallest number is bigger than the largest, a field is empty or not a number, you asked for more than 1,000 numbers, or you asked for more unique numbers than the range holds.

Will pressing Generate again give the same list?

Not unless by chance. Each press makes a fresh draw. There is no seed option, so a list cannot be reproduced later, which means you should copy any list you need to keep.