Coin Flip
simulator.
Flip one fair coin to settle a choice, or thousands to watch chance at work.
The coin has no memory: the next flip is tails again half the time, whatever came before.
How likely each count of heads is
Bars show the chance, in percent, of each number of heads in 1 fair flip. Your result was tails. Counts from 0 to 1 are normal at the 5% level.
What counts as normal
What counts as normal
| Flips | Normal heads | Typical longest run |
|---|---|---|
| 10 | 2 to 8 | about 3.5 |
| 100 | 40 to 60 | about 7.0 |
| 1,000 | 469 to 531 | about 10.3 |
| 10,000 | 4,902 to 5,098 | about 13.6 |
| 100,000 | 49,690 to 50,310 | about 16.9 |
A heads count is normal when a fair coin lands at least that far from an even split 5% of the time or more (an exact two-sided binomial test). The typical longest run follows Schilling's approximation for runs of either face.
Chance of a streak in 100 flips
Chance of a streak in 100 flips
| Run of at least | Either face | Heads only |
|---|---|---|
| 3 in a row | over 99.9% | over 99.9% |
| 4 in a row | over 99.9% | 97.3% |
| 5 in a row | 97.2% | 81% |
| 6 in a row | 80.7% | 54.6% |
| 7 in a row | 54.2% | 31.8% |
| 8 in a row | 31.5% | 17% |
The chance that a run of at least that many shows up somewhere in the batch, worked out exactly. The chance that the next few flips all match is a different question: 1 in 2 for each extra flip.
This visit
Batches this visit
| Longest run | |||
|---|---|---|---|
| 1 | 1 | 0 (0%)Longest run Tails | Tails |
1 batch and 1 flip this visit, kept in this tab only. Session total: 0 heads (0%).
Keyboard shortcuts
- F flips again with the same count.
- C copies the result.
- Both work when no box has focus. On the Flip again button, Enter or Space also flips.
How it's worked out
Each flip takes 32 random bits from your browser's secure generator, crypto.getRandomValues, and turns them into heads or tails. The bits are even in number, so both faces get exactly half of the possible values, and no flip depends on the one before. A replay number swaps that source for a fixed starting value, so the same number and count give the same flips on any device. That is how the examples below open in the tool.
The count of heads in a batch follows the binomial distribution. For n flips of a fair coin, the chance of exactly k heads is the number of ways to place k heads among n flips, divided by every possible sequence.
To call a result unusual, the tool runs an exact two-sided test. It adds up the chance of every count at least as far from an even split as yours, in either direction. If that total is under 5%, the split is unusual for a fair coin. Above 1,000 flips the counts get too big for ordinary arithmetic, so they are worked out with logarithms.
Streak chances use a recursion: flip by flip, the tool tracks how long the current run is and adds up the chance that no run ever reaches the length you ask about. It covers runs of either face, or of heads only, and gives exact figures, not a simulation.
Worked examples
A statistics class gets 60 heads in 100 flips
Replay number 374 gives 60 heads and 40 tails, with a longest run of 7 heads in a row. A student asks if the coin is biased.
A fair coin lands at least this far from 50 in either direction 5.69% of the time. That is just over the 5% line, so the split is ordinary. One more head would change the verdict: 61 heads has a two-sided chance of 3.52%. For 100 flips, every count from 40 to 60 counts as normal.
A streak of 13 heads in 1,000 flips
Replay number 2 gives 495 heads, well inside the normal range of 469 to 531. Somewhere in the sequence sits a run of 13 heads in a row.
That looks suspicious, but the typical longest run for 1,000 flips is about 10.3, and a run of 13 or more of either face turns up in 11.4% of batches this size. A long streak is a normal part of a long random sequence. It says nothing about the next flip, which is still heads half the time.
Ten thousand flips and the law of large numbers
Replay number 5 gives 5,043 heads, 50.43% of the flips. The share is much closer to 50% than the class's 60%, yet heads lead tails by 86, more than the class's lead of 20.
Both facts hold at once. The share settles toward one half as flips pile up, while the gap between the counts tends to grow, roughly with the square root of the number of flips. Here the two-sided chance is 39.5%, and anything from 4,902 to 5,098 heads is normal for 10,000 flips.
Reading your result
The most likely count is still rare. Exactly 5 heads in 10 flips happens only 24.6% of the time, even though no other count is more likely. So a batch that misses an even split is the usual case, not a sign of a bad coin.
Normal is a range that widens. At the 5% level, 100 flips can give 40 to 60 heads, 1,000 flips 469 to 531, and 10,000 flips 4,902 to 5,098. The range grows in heads but shrinks as a share of the flips.
Unusual does not mean unfair. A fair coin gets flagged about 1 batch in 20, simply because the cut-off is 5%. A real bias shows up as the same lopsided result again and again over many batches, not as one odd one.
Streaks are longer than people guess. In 100 flips, a run of at least 6 of the same face shows up 80.7% of the time, and 7 or more 54.2%. Even 10 in a row turns up in 8.67% of batches. Mark Schilling describes a class test where students who invent 200 flips almost always write runs that are too short, while real tosses of 200 have a longest run of about 8.
Common mistakes
- Expecting tails after a run of heads. The coin has no memory. After five heads, the next flip is still heads half the time. The chance that five chosen flips all land heads is 3.13%, but that is fixed before the first one, not after.
- Mixing up "five in a row" with "a run of five somewhere". Five chosen flips all heads is 1 in 32. A run of five of one face somewhere in 100 flips happens 97.2% of the time. The streak table gives the second figure.
- Reading the 5% line as proof. A count just past the line, like 61 heads in 100, is a reason to flip more, not a verdict on the coin.
- Flipping until you like the answer. If you redo a flip for a choice until it says what you hoped, the coin did not decide. Agree what heads and tails mean before you flip, and accept the first one.
Questions people ask
Sources
- Bartoš, F., et al. Fair coins tend to land on the same side they started: evidence from 350,757 flips (arXiv:2310.04153)
- Schilling, M. F. (1990). The longest run of heads. The College Mathematics Journal, 21(3), 196 to 207
- Real Statistics Using Excel, Runs
- NIST/SEMATECH e-Handbook of Statistical Methods, Binomial Distribution
- W3C, Web Cryptography API, getRandomValues