The Random Number Generator picks one or more random numbers between any minimum and maximum you choose. Generate up to 1,000 numbers at once, choose whole numbers or decimals, and turn on unique values so that no number repeats. That makes it suitable for lucky draws, raffle and giveaway winners, roll-number selection, classroom games, sampling survey respondents, board games and choosing who goes first.
How to use the random number generator
- Set the minimum and maximum. Both are inclusive for whole numbers, so 1 to 6 can return 1, 2, 3, 4, 5 or 6.
- Choose how many numbers you need (1–1,000).
- Choose whole numbers or decimals (shown to 4 decimal places).
- Set unique values only to “Yes” if repeats are not allowed, for example when choosing 3 different winners from 250 entries.
- Press Generate. Press it again for a new set.
How it works
The tool uses your browser’s built-in pseudo-random number generator (Math.random()). It produces values that are evenly spread across the range and pass standard statistical tests for everyday randomness. A whole number between min and max is produced as:
For unique picks, the generator draws repeatedly and throws away any number it has already used, which is equivalent to drawing slips from a bowl without putting them back.
crypto.getRandomValues() or a password manager.Popular uses and suggested settings
| Use | Min | Max | How many | Unique? |
|---|---|---|---|---|
| Roll a die | 1 | 6 | 1 | Not needed |
| Roll two dice | 1 | 6 | 2 | No |
| Coin toss (1 = heads, 2 = tails) | 1 | 2 | 1 | Not needed |
| Pick 3 winners from 250 entries | 1 | 250 | 3 | Yes |
| Random roll number in a class of 60 | 1 | 60 | 1 | Not needed |
| Shuffle the order of 10 teams | 1 | 10 | 10 | Yes |
| Housie / tambola numbers | 1 | 90 | 90 | Yes |
| Random 4-digit number | 1000 | 9999 | 1 | Not needed |
Running a fair lucky draw or giveaway
- Number every entry in a spreadsheet (1 to N), and freeze the list before the draw.
- Announce the method: “Winner chosen with a random number generator between 1 and N.”
- Draw live or screen-record the draw so participants can see it was fair.
- Use unique values for multiple prizes and decide in advance which number gets which prize.
- Pick a few reserve winners in the same draw in case a winner is ineligible or doesn’t respond.
Probability basics
With a range of N whole numbers, each number has a 1/N chance on each draw. Some useful facts:
- The chance of rolling a 6 is 1/6 ≈ 16.7%. The chance of rolling at least one 6 in four rolls is 1 − (5/6)4 ≈ 51.8%.
- Past results don’t affect the next draw. After five “tails”, heads is still 50%. Believing otherwise is called the gambler’s fallacy.
- Birthday paradox: draw 23 numbers from 1–365 with repeats allowed, and there is about a 50% chance two will match. Repeats appear sooner than most people expect.
Random sampling for surveys and research
To pick a simple random sample, number every member of the population (for example, 1–1,200 employees), then generate the sample size you need with unique values on. Every person has the same chance of being chosen, which avoids selection bias. For stratified samples, such as equal numbers from each department, run the generator separately for each group.
Frequently asked questions
Is this random number generator truly random?
It uses the browser’s pseudo-random generator, which is statistically random and fine for games, draws and sampling. It is not cryptographically secure, so don’t use it for passwords or security codes.
How do I generate random numbers without repetition?
Set “Unique values only?” to Yes. Each number then appears at most once, like drawing slips from a bowl without replacing them. The range must contain at least as many numbers as you ask for.
Are the minimum and maximum included?
Yes, for whole numbers both ends are included. A range of 1 to 10 can return 1 or 10. For decimals, values range from the minimum up to just below the maximum.
How do I pick a random winner for a giveaway?
Number all valid entries from 1 to N, set the minimum to 1 and the maximum to N, and generate one number, or several unique numbers for multiple prizes. Record the draw for transparency.
Can I generate negative random numbers?
Yes. Use a negative minimum, for example −50 to 50.