Random Number Generator
Pick random numbers between any two values — one or many, with or without repeats.
How it works
Numbers come from your browser’s cryptographically secure generator (crypto.getRandomValues), with a correction that keeps every value in the range equally likely. Turn on No repeats to draw without replacement, which is what you need for raffles, lottery-style picks and assigning unique numbers.
Handy ranges
Set 1–6 for a die, 1–10 or 1–100 for a quick pick, 1–45 with six numbers and no repeats for a lottery-style draw, or 0–1 for a coin flip.
FAQ
Are the numbers truly random?
They are cryptographically strong and unbiased, which is far better than the generators most programming languages use by default.
Is the end value included?
Yes. Both the From and To values can be drawn.
Why can’t I pick more numbers than the range holds?
With No repeats on, a range of 1–10 has only ten distinct values, so you can draw at most ten.
Using the generator
- Type the lowest and highest value in From and To. Both ends can be drawn. If you enter them the wrong way round, the tool swaps them for you.
- Set How many numbers you want, from 1 to 1000.
- Tick No repeats when every result must be different, Decimals (with 1 to 6 places) for fractional values, and Sort to list the results from smallest to largest.
- Press Generate. Copy puts the numbers on your clipboard as a comma-separated list.
How the numbers are chosen
Each draw starts with a 32-bit random value from the browser's crypto.getRandomValues. Turning that into a number in your range is the delicate part. A common shortcut is to take the remainder after dividing, but that slightly favours small results whenever the range does not divide evenly into 232 (4,294,967,296). For a range of 100 values, the total divides with a remainder of 96, so the first 96 outcomes would be a hair more likely than the last four. This tool avoids that: it throws away any raw value above the largest exact multiple of the range size and draws again. The discarded share is tiny, and in return every number in the range has precisely the same chance.
Drawing without repeats
With No repeats on and a range of up to 100,000 values, the tool lays out the whole list and performs a partial shuffle: for each position it swaps in a randomly chosen item from what remains. That is the standard way to deal cards, and it never needs to retry. For larger ranges it simply redraws any value it has already seen, which is fast because collisions are rare when the range is big compared with the count. If you ask for more numbers than the range can supply, for example 12 unique values between 1 and 10, the tool tells you how many distinct values exist rather than looping forever.
Decimals
For decimals the range is converted to whole steps. With two places, 0 to 1 becomes the 101 values 0.00, 0.01, up to 1.00, each equally likely, and the result is shown with exactly two digits, so 0.5 appears as 0.50. If you leave Decimals off, any fractions typed in From or To are rounded down before drawing. Negative ranges such as -50 to 50 work normally.
Examples
- A die: From 1, To 6, How many 1. For two dice, set How many to 2 and leave repeats allowed, since both dice can show the same face.
- Lottery-style pick: From 1, To 45, How many 6, No repeats, Sort. A particular set of six numbers has a 1 in 8,145,060 chance, which is the number of ways to choose 6 from 45. Every set is exactly as likely as any other, including 1-2-3-4-5-6.
- Coin toss: From 0, To 1, and decide in advance that 0 is heads.
- Test data: From 0, To 1, Decimals on with 3 places, How many 50 for a quick list of sample values.
Common uses
- Raffles and giveaways: number the entries, then draw winners without repeats so nobody wins twice.
- Classroom and games: choose who goes next, roll custom dice, or set a random starting order.
- Sampling: pick row numbers to audit from a spreadsheet of a known size.
- Decisions: when options are numbered, let a number choose for you.
Tips and limits
- Random does not mean evenly spread. In ten draws from 1 to 10 you will often see repeats and gaps; that is normal, not a fault.
- Each press of Generate is independent. Pressing it again does not make a number that has not appeared yet "due".
- Results are not saved. Copy them before generating again, because the display is replaced.
- Whole-number ranges should stay within a few billion values. Extremely large bounds are beyond what the generator is built for.
- For regulated drawings, such as a public lottery, follow the rules of the organiser; a web tool leaves no auditable record of the draw.
More questions
Is Sort changing which numbers are drawn?
No. The numbers are chosen first and only then arranged in ascending order, so sorting affects display but not the draw itself.
Why do I sometimes see the same number twice in a row?
Without No repeats, each value is drawn independently, so repeats happen at exactly the rate chance predicts. In a range of 10, any two consecutive draws match one time in ten.
Can I reproduce an earlier result with a seed?
No. The generator is deliberately unseeded, so the same settings give different results each time. That is what makes it suitable for fair draws, but it is not suitable for repeatable simulations.