About the random number generator
This random number generator draws whole numbers or decimals from any range you choose. You can generate a single number or up to 1,000, allow or forbid repeats, sort the output, and choose how many decimal places to use.
It is handy for raffles, games, sampling and anything where you want an unbiased pick rather than a human guess.
Who should use the random number generator
- Teachers, game masters and organisers running draws.
- Developers and analysts who need a quick set of sample values.
- Anyone making a fair choice between options.
How to use the random number generator: what each input means
- Lowest and highest values
- The inclusive range. The highest value must be at least the lowest.
- How many numbers
- Between 1 and 1,000.
- Type
- Whole numbers or decimals, with a chosen number of places.
- Repeats
- Allow the same number more than once, or draw without repeats.
- Order
- Keep the order generated, or sort low to high or high to low.
How the random number generator works: method and formula
The tool uses your browser's cryptographically secure random generator (Web Crypto) and avoids modulo bias by rejecting values that would make some numbers more likely than others, so every allowed value is equally likely.
Without repeats, the numbers are drawn from the set of possible values without replacement, so you cannot ask for more numbers than the range contains.
- Range size (whole numbers)
- count = highest − lowest + 1
How to read your random number generator result
Each new press generates a fresh set. Results are not saved or reproducible, so copy the numbers you want to keep. Random does not mean evenly spread: short sequences often contain streaks or clusters.
When drawing without repeats, the maximum quantity equals the number of possible values in the range.
Random Number Generator worked example
Five whole numbers between 1 and 100 with no repeats, sorted low to high.
- The range contains 100 possible values.
- Five different numbers are drawn from them without replacement, then sorted.
The output is different each time, for example five numbers such as 7, 23, 41, 68 and 92. Any run is equally likely.
Practical uses of the random number generator
- Picking raffle winners or team groupings.
- Generating sample data for testing.
- Choosing a random number for a game or classroom activity.
Assumptions and limitations of this calculator
- Numbers are generated in your browser. For regulated draws or lotteries, use a certified process.
- Decimals are limited to 12 places and up to 1,000 numbers per draw.
- Not suitable for generating passwords or security keys; use a password manager for those.
