How to use the Random Number Generator
- Choose whether repeats are allowed.
- Set the minimum and maximum, both inclusive.
- Set how many numbers you want.
- Press generate — each press produces a fresh independent draw.
How the calculation works
Numbers come from the browser's pseudo-random generator, uniformly distributed across the inclusive range. Each value is scaled and floored, so every integer from minimum to maximum has an equal chance. The generator is deterministic in principle but seeded unpredictably, which is fine for draws, sampling and games.
The repeats setting changes the underlying model. Allowing repeats is sampling with replacement — each pick is independent, and duplicates are expected. Because of the birthday paradox, duplicates appear far sooner than intuition suggests: drawing just 23 numbers from 1–365 gives a better than even chance of a collision. Unique mode is sampling without replacement, which is what a raffle or a lottery draw does, and it caps the count at the size of the range.
For anything security-related — passwords, tokens, keys — a general-purpose pseudo-random generator is not appropriate. Use a cryptographically secure source instead, since predictable output undermines the entire point.
value = floor(random() × (max − min + 1)) + minSource: Uniform discrete sampling; birthday-paradox collision probability.
Worked example
Drawing five prize winners from 200 numbered entries.
- Set unique-only mode so nobody wins twice.
- Minimum 1, maximum 200, count 5.
- Generate once and record the result.
Five distinct entry numbers, each with an equal 2.5% chance of being drawn.
Frequently asked questions
Are the numbers truly random?+
They are pseudo-random — statistically uniform and unpredictable in practice, but generated by an algorithm.
Can I use this for passwords?+
No. Use a cryptographically secure generator for anything security-sensitive.
Why did I get duplicates?+
Repeats mode samples with replacement. Switch to unique mode to prevent them.
Are the endpoints included?+
Yes, both the minimum and maximum can be drawn.
Last reviewed September 1, 2026. We review this page whenever the underlying formula, tax year, published rate or standard changes.