How the Coin Flip Works
Press Flip 1 and the coin spins through a full 3D turn before settling on heads or tails. The result is not chosen by the animation — it is drawn first, at the moment you press, and the coin simply lands where the draw says. Flip 5 and Flip 10 draw that many independent results in one press and lay them out as a row of small coins, with the big coin landing on the final one.
Underneath, the page keeps a running record: total flips, how many landed heads and how many tails, each side's percentage, the current streak (the run the most recent results are on), and the longest streaks of heads and tails since you last reset. Nothing about the record is stored anywhere — it lives in the page while it is open, and Reset Stats clears it.
Is an Online Coin Flip Fair?
A coin flip is only worth using if it is fair, so this page is explicit about its method. Each result comes from crypto.getRandomValues, the cryptographically secure random number generator built into every modern browser — the same source browsers use for security-sensitive work. The page takes one uniformly distributed random value per flip and maps it to heads or tails, so each side has exactly a 50% chance on every flip.
Two things this deliberately avoids: it does not use Math.random, a weaker non-cryptographic generator that exists for convenience rather than quality; and it applies no corrections — some novelty coin sites quietly nudge results to look "balanced", which is the opposite of fair. Here, if you flip six heads in a row, that is what the draws produced, and the stats panel will show the streak honestly.
Interestingly, a virtual coin can be fairer than a physical one. Research on real coin tossing (by Persi Diaconis and colleagues) found that a flipped coin tends to land on the same side it started from about 51% of the time, because its flight is governed by physics. A generated draw has no flight, no spin and no starting side — just the 50/50.
The Probability of Heads or Tails
For one flip of a fair coin the maths is as simple as probability gets: two equally likely outcomes, so heads is 1/2 (50%) and tails is 1/2 (50%). Because flips are independent, the probability of a specific sequence is found by multiplying: two heads in a row is 1/2 × 1/2 = 1/4, three in a row is 1/8, and so on.
| Run | Probability | As a percentage |
|---|---|---|
| 2 heads in a row | 1 in 4 | 25% |
| 3 heads in a row | 1 in 8 | 12.5% |
| 4 heads in a row | 1 in 16 | 6.25% |
| 5 heads in a row | 1 in 32 | 3.125% |
| 6 heads in a row | 1 in 64 | 1.5625% |
| 7 heads in a row | 1 in 128 | 0.78125% |
| 10 heads in a row | 1 in 1,024 | 0.0977% |
The subtle point: those figures are for a run you specify in advance. In a long session you are effectively making hundreds of overlapping attempts at a run of five, so seeing one somewhere in the session is likely, not remarkable. Any specific five-flip sequence — heads-heads-heads-heads-heads, or heads-tails-heads-tails-tails — has exactly the same 1 in 32 chance. The all-heads run only looks special.
The other half of the picture is the law of large numbers: as the total grows, the heads percentage drifts toward 50%. Not because the coin compensates for an early imbalance — it cannot — but because each new flip dilutes the early ones. After 10 flips a 7–3 split is unremarkable; after 1,000 flips a 70/30 split would be a genuine shock. Use the Flip 10 button a few dozen times and watch it happen.
Streaks and the Gambler's Fallacy
Streaks are where human intuition about randomness goes wrong, in both directions. The gambler's fallacy says that after a run of heads, tails is "due" — as if the coin owed a correction. The opposite error, the hot-hand fallacy, says a coin on a streak will keep streaking. A fair coin does neither: it has no memory, so the next flip is 50/50 in the middle of any streak, however long.
- Streaks are expected. In 100 flips, a run of at least five identical results somewhere is more likely than not. A session with no streaks would be the suspicious outcome.
- A streak carries no information. Heads × 6 tells you six draws came up heads. It says nothing at all about draw seven.
- Percentages settle by dilution, not payback. If you open with 8 heads in 10 flips, expect the percentage to fall toward 50% over the next few hundred flips — while the count gap (heads minus tails) wanders rather than being repaid.
That is exactly why this page tracks streaks openly instead of hiding them: seeing long runs appear in a generator you know is fair is the fastest way to build a feel for what randomness actually looks like — lumpy, not smooth.
A Brief History of the Coin Toss
Tossing a coin to decide something is at least two thousand years old. In ancient Rome the game was called navia aut caput — "ship or head" — after the ship and the head of Janus stamped on early Roman coins, and legend has Julius Caesar settling matters by the toss. The English "heads or tails" follows the same pattern: a head portrait on one face, and the reverse design nicknamed the tail.
The toss survives because it solves a social problem, not a mathematical one: it produces a decision both sides agreed in advance to accept, with no referee to argue with. That is why it still opens football and soccer matches (who kicks off, which end), settles the bat-or-bowl choice in cricket, picks the first server in tennis, and breaks deadlocks everywhere from playgrounds to — famously — tied local elections in some jurisdictions.
Using a Coin Flip to Make a Decision
Used properly, a coin flip is a clean tiebreaker for choices where the options are genuinely close. Three habits keep it fair:
- Name the sides before you flip. "Heads we cook, tails we order in" — said out loud, before the coin moves. Mapping the sides afterwards is just re-arguing.
- Flip once and honour it. Best-of-three is fine if agreed in advance; re-flipping because you disliked the answer turns the ritual into decoration.
- Notice your reaction. A well-known side benefit: if the result lands and you feel a flash of disappointment, the coin has told you what you actually wanted. That is a legitimate use too — the flip as a way to hear your own preference.
What a coin flip cannot do is make a good decision — it knows nothing about the options. For anything with real consequences, it belongs at the very end of the process, choosing between options you have already thought through and found equally acceptable.
Sources & References
- MDN Web Docs — Crypto.getRandomValues(): the cryptographic random value generator this page uses for every flip — developer.mozilla.org — Crypto.getRandomValues
- Khan Academy — Basic probability: equally likely outcomes, independent events and the multiplication rule used for the streak table — khanacademy.org — Probability: the basics
- Wikipedia — Coin flipping: the history of the toss from Roman 'navia aut caput' to modern sport, and the research on physical coin bias — en.wikipedia.org/wiki/Coin_flipping
- Diaconis, P., Holmes, S. & Montgomery, R. (2007) — Dynamical Bias in the Coin Toss, SIAM Review: the roughly 51% same-side bias of a physical coin discussed above — siam.org — SIAM Review
This coin flip is a fair random tiebreaker for everyday choices and curiosity. It is not a gambling tool, and no flip result should be treated as advice on any decision that matters — think those through first, then flip between the options you can accept.