How the randomness is generated
This generator uses the browser's crypto.getRandomValues API, which draws from the operating system's cryptographically secure entropy pool — the same source used for encryption keys. It is a substantially stronger source than Math.random(), whose output is predictable to anyone who observes enough of it.
Mapping a random 32-bit integer into a smaller range naively introduces modulo bias: if the range does not divide evenly, some values become slightly more likely. This calculator uses rejection sampling — discarding and re-drawing values that fall in the uneven tail — so every number in your range is exactly equally likely.
With or without duplicates
- Without duplicates models drawing from a hat: lottery numbers, raffle winners, random sampling without replacement. Each number can appear only once, so you cannot draw more numbers than the range contains.
- With duplicates models rolling a die repeatedly: each draw is independent and previous results have no influence. Repeats are not a malfunction — in 20 draws from 1–100, at least one repeat happens more often than not.
That last point is the birthday problem in disguise. With just 23 people, the chance that two share a birthday is above 50%. Human intuition badly underestimates how often coincidences occur in random data, which is why genuinely random sequences often look "wrong".
Why random sequences look wrong
People are reliably bad at recognising randomness, and the mistake runs in a specific direction: genuine randomness is far clumpier than we expect.
- Clusters are normal. In 100 coin flips, a run of six or seven of the same result is more likely than not. Its absence would be the suspicious thing.
- The gambler’s fallacy. After five reds, black is not “due”. Independent draws have no memory whatsoever.
- The birthday problem. In a room of 23 people, the chance two share a birthday is above 50%. At 70 people it is above 99.9%.
- Humans cannot fake it. Asked to invent a random sequence, people alternate too often and avoid repeats — which is exactly how invented data gets detected in fraud investigations.
Music streaming services learned this the hard way: genuinely shuffled playlists generated complaints about repetition, so several now use a deliberately less random algorithm that spreads artists out. It feels more random precisely because it is not.
What it is and is not suitable for
Good for: raffles and giveaways, picking teams, random sampling for surveys and quality checks, choosing lottery numbers, generating test data, deciding who goes first, and settling arguments.
Not suitable for: generating passwords or cryptographic keys (use a dedicated password manager), or anything requiring auditable, verifiable randomness for regulated gambling — that needs a certified RNG with published seeds and independent verification.
Everything runs locally in your browser. No numbers are sent to a server, logged or stored, and reloading the page produces an entirely fresh draw.