The Coin Flip Simulator flips a fair virtual coin as many times as you like and tracks the running heads-versus-tails split in real time. Use it to settle a two-way decision, demonstrate probability to a student, or simply satisfy curiosity about how quickly a 50/50 outcome converges.
When to use this instead of a physical coin
A real coin is fine for a single flip, but physical coins are inconvenient for classroom demonstrations, remote group decisions, or running hundreds of trials to observe probability behaviour. This simulator lets you flip 1, 10, or 100 times per click and builds a running tally so you can see the cumulative split at every stage — something a physical coin simply cannot show.
Fair randomness — how each result is generated
Each flip calls your browser’s crypto.getRandomValues API where available. This is the same cryptographically secure random source used for encryption key generation, producing a genuinely unbiased 50% heads / 50% tails outcome. The simulator falls back to Math.random only on very old browsers where the secure API is absent. Either way, every flip is independent — the outcome of flip 99 has zero influence on flip 100.
The law of large numbers in practice
A single flip is completely unpredictable. Two or three flips can look wildly lopsided. But as the count grows the running percentage reliably drifts toward 50/50. This is the law of large numbers: individual outcomes are random, but the aggregate proportion converges to the true probability over many trials.
Try it yourself: click Flip ×100 once and note the split — it might read 53% heads. Click it nine more times (1,000 flips total) and the split will almost certainly sit within 2–3 percentage points of 50%. The larger the sample, the tighter the band around the true probability.
Streaks are normal
One common misconception is that a run of five heads in a row means tails is “due.” It is not. Each flip is 50/50 regardless of history. The probability of exactly five heads in a row is 1 in 32 — uncommon but far from rare. Over 1,000 flips you should expect several such runs to appear naturally. The simulator’s running tally makes streaks visible without inflating their significance.
Reset and repeat
Hit the reset button to clear the tally and start a fresh experiment. Running several independent batches side by side in your head is a good way to appreciate how much variability exists at small sample sizes versus large ones.
Everything runs locally in your browser, so no flip results are ever sent to a server or stored anywhere.