What people actually use random numbers for

Six categories cover almost every real request, and they need different kinds of randomness.

Random numbers Published October 20, 2026 2 min read

The six categories

UseTypical rangeWith or without repeats
Fair draw / raffle1 to entry countWithout
Sampling for review1 to record countWithout
Game mechanicsDice, d20, cardsDepends on the dice
Test dataAny range or lengthEither, usually with
Task or seat allocation1 to person countWithout
Decisions and tie-breaks1 to option countN/A

Without replacement is the one people get wrong

Drawing winners one at a time and re-rolling on a duplicate is the manual approach, and it has two problems: it wastes attempts, and it makes the process look arbitrary even when it is fair. Sampling without replacement — a partial shuffle — is both correct and easier to explain.

The distinction also changes the maths. With replacement, each draw has the same probability. Without, the pool shrinks, so probabilities shift after every pick.

Where randomness should not be used

Anything that needs to be reproducible: test fixtures that must match across runs, A/B assignment that must be stable for a user, or a deterministic simulation. In those cases you want a seeded generator, not a random one — the same seed reproduces the same sequence.

And anything security-relevant should use a cryptographic source, not a convenience page. A random number for a raffle and a random number for a token look identical but have opposite requirements.

Frequently asked questions

What is the difference between a draw and a pick?

A draw usually implies order and no repeats; a pick implies a single independent choice. For multiple winners, you want the draw behaviour.

Can I use a random number generator for a giveaway?

For a casual one, yes. For anything with legal weight, document the method and the entry list before drawing, and keep the ordered result.

Should test data be random or seeded?

Seeded, if the tests depend on it. Random values that change every run make failures hard to reproduce.

Tools that go with this guide

More guides