A random number generator produces unpredictable numbers within a range you set — the digital equivalent of rolling a die or drawing from a hat, without bias. Prize draws, games, picking a winner, sampling, or just making a decision: whenever you need a fair random pick, this does it instantly.
Set the minimum, maximum and how many numbers you want, and the tool generates them at once.
Random Number Generator: step-by-step worked example
- Minimum
- 1
- Maximum
- 100
- How many?
- 5
- 1
How many numbers in the range
Span = Max − Min + 1
100 − 1 + 1 = 100
- 2
Probability of each number
P = 1 ÷ Span (each draw independent)
1 ÷ 100 = 1%
- 3
First number
Number = Min + ⌊r × Span⌋, r = PRNG(seed) ∈ [0, 1)
1 + ⌊0.0355 × 100⌋ = 4
- 4
All numbers drawn
Same formula, repeated with the next r values from the seed
= 4, 22, 18, 47, 34
- Draw 14
- Draw 222
- Draw 318
- Draw 447
- Draw 534
Good to know: Draws are independent, so repeats are possible (sampling with replacement). For a raffle needing unique numbers, discard repeats and draw again.
Random Number Generator — how it works
How it works
You choose the range (minimum and maximum, inclusive) and how many numbers to generate (up to 20). Each number is drawn independently and uniformly — every value in the range is equally likely, and results can repeat unless you need them unique.
Inclusive range
Both endpoints are included: a range of 1 to 6 can produce any of 1, 2, 3, 4, 5 or 6 — exactly like a die. A range of 1 to 100 covers all hundred values.
Where it's used
- Draws and giveaways: picking a winner from numbered entries.
- Games: dice, lottery-style picks, board-game moves.
- Sampling: selecting random rows, participants or test cases.
- Decisions: breaking a tie or choosing at random when options are equal.
- Teaching: demonstrating probability and randomness.
Fair and unbiased
Unlike a person "picking a number in their head" — who tends to favour certain numbers — a generator gives a genuinely uniform distribution. For a truly unbiased draw, generate the number rather than choosing it.
A note on true vs pseudo-random
Software generators are technically pseudo-random: they produce sequences that are statistically random and more than adequate for draws, games and everyday use. For high-security applications (cryptographic keys), dedicated cryptographic generators are used instead.
Worked example
To simulate a die roll, set the range 1 to 6 and generate one number — you'll get any value from 1 to 6 with equal likelihood, including both endpoints. To draw three winners from 200 numbered entries, set the range 1 to 200 and generate 3 numbers at once. Because each draw is independent and uniform, no entry is favoured — which is exactly why generating the pick is fairer than choosing one "at random" in your head, where people unconsciously prefer certain numbers.
Frequently asked questions
How does a random number generator work?+
You set a range (minimum and maximum) and how many numbers to generate; each is drawn independently and uniformly, so every value in the range is equally likely. Up to 20 at once.
Are the endpoints of the range included?+
Yes — the range is inclusive. A range of 1 to 6 can produce any of 1, 2, 3, 4, 5 or 6, exactly like a die.
Can the generated numbers repeat?+
When generating several numbers, values can repeat since each draw is independent — like rolling the same number twice. Each number is chosen fresh from the full range.
Is a generated number fairer than picking one myself?+
Yes — people unconsciously favour certain numbers, while a generator gives a genuinely uniform distribution. For a fair draw, generate the number rather than choosing it.
Can I use this for a prize draw?+
Yes — number your entries, set the range from 1 to the total, and generate as many winners as you need. It gives an unbiased, repeatable selection.
Is it truly random?+
Software generators are pseudo-random — statistically random and more than adequate for draws, games and everyday use. High-security uses (encryption keys) require dedicated cryptographic generators.
About this page
- Publisher:
- Kalkoro — Teknolojig Bilişim Teknolojileri A.Ş., İstanbul
- Written by:
- Ahmet Tur — Editor (Math, date & time, unit conversion, physics & chemistry, everyday tools)
- Reviewed by:
- Kübra Yıldız — Editor
Parameters come from official sources; the last update date is shown at the bottom of the page.
Spotted a wrong result? Use the "Report a bug" button at the top of the page; every report is reviewed.
How we calculate and our accuracy policy →
Results are for information only. For official matters the relevant authority's calculation prevails.
Last updated: