A fair random number generator for any range
The random number generator picks numbers between any minimum and maximum you choose — one at a time with a big rolling display, or thousands at once in a list. Use it for raffle tickets, classroom questions, statistics homework, board games, choosing a winner from a numbered spreadsheet or simply settling an argument.
You set the rules: whole numbers or decimals with up to 10 places, duplicates allowed or not, results sorted or left in draw order, and an exclude list for numbers that must never come up. Every number comes from your browser’s cryptographic random source, so each draw is unpredictable and every allowed value has exactly the same chance.
How to use the Random Number Generator
- Tap a quick preset (1–10, 1–100, 1–1000 or Dice 1–6), or type your own Minimum and Maximum. Negative numbers work too.
- Set How many numbers you need. With 1 you get a single big number; with more you get a list plus its count, sum, average, smallest and largest value.
- Choose Whole numbers or Decimals (and how many decimal places), pick a sort order, and optionally list numbers to Exclude, such as “7, 13, 20-25”.
- Leave Allow duplicates unticked for a draw without repeats — like pulling numbered balls from a bag — or tick it for independent picks, like rolling a die again and again.
- Press Generate (or Enter in any box), then Copy the result. Recent results are listed underneath.
Random Number Generator features
Cryptographically secure
Numbers come from crypto.getRandomValues, the generator browsers use for encryption keys, rather than the predictable Math.random.
No modulo bias
Rejection sampling discards the few raw values that would make some numbers slightly more likely, so the distribution is exactly uniform.
Unique numbers on demand
Draw up to 10,000 numbers with no repeats. Ask for more unique numbers than the range holds and you get a clear message instead of a silent repeat.
Decimals and exclusions
Generate values like 3.47 or −0.125 with 1–10 decimal places, and exclude single numbers or whole ranges.
Big roll mode
A single number rolls on screen before it lands — great on a projector or stream. The animation is skipped when your device asks for reduced motion.
Copy and history
Copy results with commas, spaces or new lines between them. The last 15 results stay on your device.
How the numbers are generated (and why it is fair)
Many quick random tools call Math.random(), which is fast but not designed to be unpredictable. This generator asks the browser’s cryptographically secure generator, crypto.getRandomValues, for 32 random bits at a time (53 bits for extremely wide ranges). The browser seeds it from the operating system’s entropy, so nobody — including us — can predict or influence a result.
Turning raw bits into a range needs care. Suppose you want a number from 1 to 100 and take a random byte (0–255) modulo 100. Because 256 is not a multiple of 100, the remainders 0–55 can each be produced three ways but 56–99 only two ways, so the lower numbers would win 50% more often. That flaw is called modulo bias. We avoid it with rejection sampling: any raw value at or above the largest exact multiple of the range size is thrown away and redrawn. Redraws are rare and invisible, and the result is perfectly uniform.
Without duplicates, a partial Fisher–Yates shuffle of the possible values (or, for gigantic ranges, a redraw of any repeat) makes every set of numbers, in every order, equally likely.
With or without duplicates?
The two settings answer different questions. Without duplicates the draw behaves like raffle tickets: once a number is out it cannot appear again, so drawing 10 numbers from 1–10 returns each number exactly once in a random order. With duplicates allowed every pick is independent, like rolling a die — the same number can appear twice in a row, and that is not a sign of a broken generator.
| You want to… | Use these settings |
|---|---|
| Pick a raffle winner from tickets 1–500 | 1 to 500, how many 1 |
| Choose 6 lottery-style numbers | 1 to 49, how many 6, no duplicates, smallest first |
| Simulate 20 dice rolls | 1 to 6, how many 20, allow duplicates |
| Randomise seats for 30 students | 1 to 30, how many 30, no duplicates, draw order |
| Get a random price between 9.99 and 49.99 | Decimals, 2 places, 9.99 to 49.99 |
| Skip unlucky numbers | Exclude “4, 13, 44” |
Tips for using random numbers well
- Announce the range and rules before you draw, and copy or screenshot the result, so a giveaway is transparent.
- Drawing names rather than numbers? The Random Name Picker or Spin the Wheel saves you numbering the list.
- For games with a separate bonus ball, the Lottery Number Generator already knows the right ranges, and the Dice Roller understands notation like 3d6+2.
- Streaks and clusters are normal. Ten picks from 1–10 with duplicates allowed almost always contain a repeat — the chance of ten different numbers is only about 0.04%.
Random Number Generator FAQ
Is this random number generator truly random?
It uses the browser’s cryptographically secure random number generator (crypto.getRandomValues), seeded by your operating system from unpredictable hardware and system events. That is suitable for games, raffles, sampling and classroom use. Regulated gambling and official lotteries must use the certified equipment their rules require.
How do I generate random numbers without repeats?
Leave “Allow duplicates” unticked and set how many numbers you need. Each value in the range can then appear at most once. If you ask for more numbers than the range contains after exclusions, the tool tells you instead of repeating one.
Can I generate random decimal numbers?
Yes. Choose Decimals as the number type and set 1 to 10 decimal places. A range of 0 to 1 with 2 places can return any of the 101 values 0.00, 0.01 … 1.00 with equal probability.
Are the minimum and maximum included?
Yes, both ends are inclusive. A range of 1 to 6 can return 1, 2, 3, 4, 5 or 6, exactly like a die.
How do I exclude certain numbers?
Type them into “Exclude numbers”, separated by commas — for example 7, 13, 20-25. Ranges use a dash and work with negative numbers too (-10--5). Excluded values are removed from the pool before the draw.
Is anything I generate saved or uploaded?
Nothing is uploaded. The last 15 results and your sound preference are stored only in your own browser so they survive a reload; press Clear to remove the history.