🪙 Coin Flip
Flip a virtual coin for a fair heads-or-tails answer, or flip up to 1,000 at once and see the counts, percentages and longest streak.
Session total
No flips yet.
What Coin Flip Does
This coin flip gives you an instant, fair heads-or-tails answer — or flips up to 1,000 coins at once and reports how many landed each way, the percentage of heads and the longest streak. A running session total shows how the split settles toward 50/50 as the number of flips grows.
Each flip takes a single random bit from your browser’s cryptographically secure generator, so heads and tails are exactly equally likely and no flip is influenced by the one before it. That makes it fairer than a real coin. Physicists Persi Diaconis, Susan Holmes and Richard Montgomery showed in 2007 that a hand-flipped coin tends to land on the side that started face up about 51% of the time, and a 2023 experiment that recorded 350,757 real flips measured 50.8%.
How to Use Coin Flip
- Choose how many coins to flip at once (1 to 1,000)
- Press Flip — or flip again as many times as you like
- Read the result: one coin shows Heads or Tails, many coins show counts and the longest streak
- Check the session total bar to see heads and tails even out over many flips
Formula Used by Coin Flip
Chance of the same result k times in a row
P = (½)ᵏ
Worked example
Five heads in a row, on the next five flips.
- (½)⁵ = 1 ÷ 32
Result: 3.125%, or 1 in 32 — for those specific five flips.
Chance of exactly h heads in n flips (binomial)
P = C(n, h) ÷ 2ⁿ
- C(n, h)
- Number of ways to choose which h of the n flips are heads
Worked example
Exactly 50 heads in 100 flips.
- C(100, 50) ≈ 1.009 × 10²⁹
- 2¹⁰⁰ ≈ 1.268 × 10³⁰
- Divide
Result: About 7.96% — so an exact 50/50 split is the single most likely outcome, yet it still fails to happen more than 92% of the time.
Chance of a Streak Somewhere in a Sequence
Probability that a run of at least this many identical results (heads or tails) appears somewhere in the sequence. Calculated exactly.
| Flips | 4 in a row | 5 in a row | 6 in a row | 7 in a row | 8 in a row |
|---|---|---|---|---|---|
| 10 | 46.5% | 21.7% | 9.4% | 3.9% | 1.6% |
| 20 | 76.8% | 45.8% | 23.7% | 11.5% | 5.4% |
| 50 | 98.1% | 82.1% | 54.4% | 30.9% | 16.2% |
| 100 | >99.9% | 97.2% | 80.7% | 54.2% | 31.5% |
How Close to 50/50 Should 100 Flips Be?
| Heads in 100 flips | Probability |
|---|---|
| Exactly 50 | 7.96% |
| 45 to 55 | 72.9% |
| 40 to 60 | 96.5% |
How to Read Your Result
A long streak is not a sign of a broken coin
In 100 fair flips there is a better-than-even chance of seeing seven heads or seven tails in a row somewhere. People asked to write down a “random” sequence rarely include runs that long, which is why real randomness can feel suspicious.
Settling a decision
For a two-way choice one coin is enough. For a fair tiebreak between two people who distrust single flips, set three or five coins and let the majority win — an odd number guarantees there is no tie.
Limitations & Accuracy Notes
- It simulates an ideal coin; it does not model the same-side bias of real hand flips described above.
- Session totals are kept only while the page is open and are not saved.
- Up to 1,000 coins per flip.
Frequently Asked Questions
Is this coin flip really 50/50?
What are the odds of getting heads 5 times in a row?
Does the last flip affect the next one?
Why didn’t 100 flips give exactly 50 heads?
How do I do a best-of-three coin toss?
Can I flip many coins at once?
References & Further Reading
- Diaconis, Holmes & Montgomery — “Dynamical Bias in the Coin Toss”, SIAM Review 49(2), 2007 — Physics model predicting about 51% same-side landings
- Bartoš et al. — “Fair Coins Tend to Land on the Same Side They Started: Evidence from 350,757 Flips” — Measured same-side probability of 0.508
- MDN Web Docs — Crypto.getRandomValues()