How to use the random number generator
- Enter the minimum and maximum values. Both are included in the possible results.
- Choose how many numbers you want (up to 1,000 at a time).
- Tick No duplicates if each number may appear only once — ideal for raffles and lotteries.
- Press Generate. Every press gives a fresh, independent result.
How random are the numbers?
This generator uses your browser's cryptographically secure random number generator (the Web Crypto API) rather than the basic Math.random() function. It also uses rejection sampling, which means every number in your range has exactly the same chance of being picked — there is no bias toward low or high values. Numbers are generated on your device and are never sent anywhere.
Popular uses
- Giveaways and raffles: number your entries, then pick a winner between 1 and the number of entries.
- Lottery numbers: for example, 6 unique numbers from 1 to 49.
- Games: roll a die (1–6), flip a coin (1–2) or pick a random player.
- Classrooms: call on a random student or assign groups fairly.
- Statistics and research: select a random sample from a numbered list.
Quick presets
| To simulate | Min | Max | Count | No duplicates |
|---|---|---|---|---|
| Coin flip (1 = heads, 2 = tails) | 1 | 2 | 1 | — |
| Six-sided die | 1 | 6 | 1 | — |
| Two dice | 1 | 6 | 2 | No |
| Lottery 6/49 | 1 | 49 | 6 | Yes |
| Random percentage | 0 | 100 | 1 | — |
Probability basics
With a range of N numbers, each number has a 1 in N chance of being picked on any single draw. Each draw is independent when duplicates are allowed: getting 7 on one draw doesn't make 7 more or less likely next time. When duplicates are not allowed, each picked number is removed from the pool, just like drawing balls from a lottery machine.
Frequently asked questions
Is this random number generator truly random?
It uses the browser's cryptographically secure random number generator, which is designed to be unpredictable and is suitable for fair draws and giveaways. Every number in the range is equally likely.
Are the minimum and maximum included?
Yes. Both the minimum and maximum values can be generated. For example, a range of 1 to 10 can produce any whole number from 1 through 10.
How do I generate numbers without repeats?
Tick "No duplicates." Each number will then appear at most once, which is how lottery draws and raffles work. The count cannot exceed the number of values in the range.
Can I use this to pick a giveaway winner?
Yes. Number your entries, set the minimum to 1 and the maximum to the number of entries, and press Generate. For transparency, consider recording your screen while you draw.
Can it generate negative numbers?
Yes. Enter a negative minimum, such as −50, and any maximum. The generator works with any whole numbers.
Results are rounded for display. For academic or professional work, double-check critical calculations and follow the rounding rules your teacher, school or organization requires.
Last updated: