How to use the random number generator
- Enter the Minimum and Maximum. Both are included in the draw.
- Set How many numbers you want, from 1 to 1,000.
- Tick No repeats if each number may appear only once, and Sort ascending if you want the list in order. Set Decimal places above 0 for numbers such as 0.37 or 4.125.
- Press Generate. The first number is shown large, the full list appears underneath, and you can copy it.
What it does and when to use it
This is the digital version of drawing numbered tickets from a hat. Use it to choose a raffle ticket, pick a random page or question number, assign seats, roll a die with an unusual number of sides, or create test data for a spreadsheet. With No repeats ticked it behaves like a lottery machine: each number can come out only once.
For other kinds of draws there are dedicated tools. The lottery number generator knows common game formats, the dice roller reads notation such as 2d6+3, and the spinner wheel picks from names instead of numbers.
How it works
The tool asks the browser for random 32-bit values with crypto.getRandomValues. That source is designed to be unpredictable, unlike Math.random, which is a fast formula that someone could in principle predict after seeing enough output.
Turning a 32-bit value into a number between, say, 1 and 6 needs care. Taking the remainder after dividing by 6 would make some numbers very slightly more common, because 2³² does not split evenly into 6 parts. This is called modulo bias. The tool avoids it with rejection sampling: any raw value that falls in the uneven leftover band is thrown away and a new one is drawn. Every number in your range ends up with exactly the same chance.
With No repeats, the tool keeps drawing and skips any number it has already produced until it has the amount you asked for. Sort ascending only changes the order of the list, not which numbers were drawn.
Worked examples
These outputs come from the tool’s own function.
Shuffling a die’s faces. Minimum 1, maximum 6, how many 6, with No repeats and Sort ascending both ticked. Every face must appear once, so the sorted list is always 1, 2, 3, 4, 5, 6. Untick Sort ascending and you get the same six numbers in a random order, which is a quick way to shuffle six items.
Decimal limits, whole numbers. Minimum 1.5, maximum 9.7, Decimal places 0. The tool rounds the minimum up and the maximum down and reports Range: 2 to 9 (inclusive), then draws one whole number from that range.
Decimal places. Minimum 1.5, maximum 2, Decimal places 1, how many 6, No repeats and Sort ascending ticked. There are exactly six values on the 0.1 grid, so the list is always 1.5, 1.6, 1.7, 1.8, 1.9, 2.0.
Limits and tips
- Decimals sit on a grid. With 2 decimal places the tool picks among 0.01 steps; it does not produce values like 0.123 unless you ask for 3 places. For random dates, letters or names, use the matching generator instead.
- Repeats surprise people. This is the birthday problem: in a group of independent draws, a shared value turns up much sooner than intuition suggests. That is correct behaviour, not a fault.
- Ranges with no whole number (such as 2.2 to 2.8) return a message instead of a result.
- Keep the first result for anything other people care about. Drawing again until you like the answer makes any generator unfair.
- Nothing you enter is sent anywhere; the numbers are made on your device.
Frequently asked questions
Are the minimum and maximum included?
Why do I get the same number twice?
Is this random enough for a giveaway or raffle?
Can it make decimal numbers?
What is the most numbers I can draw?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.