"Random" means different things depending on what's at stake â picking who presents first in class and generating a number for a security key both need randomness, but not the same quality of it.
Two Different Kinds of "Random"
When Basic Randomness Is Enough
- Classroom name picking or assigning presentation order
- Deciding who goes first in a game
- Casual office giveaways and team activities
When True Randomness Matters
- Generating a security-sensitive value like a password or token
- Anything where predictability would be a real security risk
Fair Selection From a List Is a Different Problem
Picking a winner from a list of entries isn't just about number randomness â it's about making sure every entry has an equal chance and none are accidentally duplicated or skipped. A dedicated random picker tracks the full list and removes picked entries when selecting multiple winners, which a bare random number generator doesn't handle.
For Official Contests, Check Local Rules
Casual giveaways are well served by JavaScript's random selection. A legally regulated sweepstakes with significant prizes may have specific jurisdictional requirements for how winners are selected and documented â worth checking before relying on any casual tool for something with real legal or financial stakes.
Examples in Numbers
- Choosing one name from five: each name has a 1 in 5, or 20%, chance. A fair picker does not remember who won last time, so the same name can win twice in a row, and that is normal.
- "Random" does not mean "even". If you flip a fair coin 10 times, the chance of exactly 5 heads and 5 tails is 252 ÷ 1,024, about 24.6%. Most of the time you will see a split like 6 and 4 or 7 and 3.
- Lottery odds: choosing 6 numbers from 49 gives 13,983,816 possible combinations, so any one ticket has a chance of 1 in about 14 million.
A Subtle Bug: Modulo Bias
A common mistake when making a random digit from 0 to 9 is to take a random byte (0 to 255) and use the remainder after dividing by 10. There are 256 values, which is 25 full groups of 10 plus 6 left over, so the digits 0 to 5 each occur 26 times out of 256 (about 10.16%) while 6 to 9 occur 25 times (about 9.77%). The difference is small, but for security keys, codes and fair draws it is a real flaw, and good tools avoid it by rejecting the values that fall in the incomplete group.
Fair Draws
For a giveaway, write the rules first, include every valid entry once, draw with a tool you can show, and record the result. Some regions regulate prize draws, so check local requirements before you run one. For security uses such as passwords, use a generator built on a cryptographic source, like our password generator.
