Coins, dice, and random number generators all feel like they should be simple — but the actual physics and math behind "random" is more interesting than it first appears.
Is a Coin Flip Really 50/50?
Close, but not exactly. Physical studies of coin flips have measured a slight bias toward the side that started facing up before the flip, caused by how the coin tumbles through the air rather than landing on a perfectly even random rotation. The effect is small — closer to 51/49 than a meaningful skew — and irrelevant for everyday use, but it's a real, measurable deviation from a perfect 50/50 under careful analysis.
How Computers Generate Randomness
A computer has nothing physical to flip or roll, so most everyday randomness comes from a pseudorandom number generator: a mathematical formula that produces a long sequence of numbers that statistically behaves like randomness, starting from an initial "seed" value. Given the same seed, a pseudorandom generator always produces the exact same sequence — which is precisely why it's called "pseudo," not truly random, even though it passes most statistical randomness tests.
Regular vs. Cryptographically Secure
A standard pseudorandom generator is fast and adequate for non-security uses, but its output can potentially be predicted by someone who knows the algorithm and enough previous outputs. A cryptographically secure random number generator is specifically designed to resist exactly that kind of prediction, typically by drawing from real-world physical noise the operating system collects (timing jitter, hardware sensors) rather than a pure mathematical formula. This is the right kind of randomness for anything security-related, like generating a password or encryption key.
Dice Probability
A standard six-sided die gives each face a 1-in-6 chance, roughly 16.7%. A twenty-sided die spreads that same total probability across 20 faces instead, giving each one only a 1-in-20 chance, 5%. More sides means a flatter, wider spread of probability — which is exactly why tabletop games use different dice for different purposes: a d20 makes individual high or low rolls swingier and rarer than a d6 would.
Trying These Right Now
Generate random names with our free Random Name Generator, random numbers with the Random Number Generator, flip a virtual coin with Coin Flip, or roll virtual dice with the Dice Roller — all using your browser's cryptographically secure random source.
FAQ
Is a real coin flip actually exactly 50/50? Not perfectly. Physical studies of coin flips have found a very slight bias toward the side that started facing up, due to how the coin tumbles through the air — typically only about a 51% chance versus 49%, not a meaningful difference for practical purposes, but a real, measurable one under careful physical analysis.
How does a computer generate a random number without anything physical to flip or roll? Most everyday randomness on a computer comes from a pseudorandom number generator — a mathematical formula that produces a long sequence of numbers that looks statistically random, starting from an initial "seed" value. For purposes needing genuine unpredictability, like security, modern systems instead draw from real-world physical noise (timing jitter, hardware sensors) collected by the operating system.
What's the difference between a regular random number generator and a cryptographically secure one? A standard pseudorandom generator is fast and fine for games, simulations, or shuffling a playlist, but its output can sometimes be predicted if an attacker knows the algorithm and enough prior outputs. A cryptographically secure generator is specifically designed so its output can't be predicted even with that knowledge, making it the right choice for anything security-related, like generating a password or an encryption key.
Why do dice probabilities change so much between a d6 and a d20? A standard six-sided die (d6) gives each outcome a 1-in-6 chance, roughly 16.7%. A twenty-sided die (d20) spreads that same total probability across 20 outcomes, giving each one only a 1-in-20 chance, 5%. More sides means a flatter, wider probability spread — useful in tabletop games specifically because it makes individual high or low rolls swingier and rarer.