Coin Dynamics

Bernoulli trials at scale, from a single flip to one million.

Flip a virtual coin up to large sample sizes and observe how short-term streaks gradually converge toward the long-run 50/50 probability, a live demonstration of the law of large numbers.

Options
Coin landing on edge(probability 0.012%, or 1 in ~8,333 flips). Documented in real physics research.
?
Mass Simulation

Runs entirely in your browser, no server involved. Up to 1,000,000 flips processed in real time.

Statistics
0 rolls this session

No flips this session.

Frequently Asked Questions

Is a coin flip truly 50/50? ▾

A perfectly fair coin flip is 50/50. However, research shows physical coins have a slight bias toward the side facing up when tossed, due to the dynamics of the flip. The effect is small (~51% vs 49%) and only detectable over thousands of flips.

What does the chi-square test show? ▾

The chi-square test measures whether the observed distribution of heads and tails differs significantly from the expected 50/50. A p-value above 0.05 means the results are consistent with a fair coin. A p-value below 0.05 suggests the distribution is unusually skewed.

Can you get 10 heads in a row with a fair coin? ▾

Yes. The probability of 10 consecutive heads is (0.5)^10 = 1/1024 ≈ 0.098%. Rare, but not remarkable. Over 10,000 flips you would expect this to happen roughly 10 times. Streaks feel meaningful but are a normal feature of random sequences.

What is the Law of Large Numbers? ▾

The Law of Large Numbers states that as the number of trials increases, the observed frequency converges toward the theoretical probability. Flip 10 coins and you might see 7 heads. Flip 1,000,000 and the proportion will be very close to 50%. Use the 1M flip option to see this in action.

Related Reading

More Tools

Learning guide

The mathematics of coin flips

The simplest random experiment, and still full of surprises: streaks, the law of large numbers, and recent research showing real coins are not quite 50/50.

1. The Bernoulli trial

A coin flip is the textbook example of a Bernoulli trial: one experiment with two outcomes. For an ideal coin, heads and tails each have probability 1/2, and each flip is independent of the others. Count the heads in n flips and you get a binomial distribution with mean n/2 and standard deviation √n / 2.

2. What 100 flips really look like

With 100 flips the expected number of heads is 50 and the standard deviation is 5. About 96% of the time the count lands between 40 and 60. Getting exactly 50 happens only about 8% of the time, so a perfectly even result is actually unusual.

Streaks are where intuition fails most. In 100 fair flips, the chance of seeing a run of at least 6 identical results in a row is about 81%, and a run of at least 7 shows up about 54% of the time. When people write down a "random" sequence by hand, they switch sides too often and avoid long runs. Teachers use this to tell real coin sequences from invented ones.

3. The law of large numbers, correctly stated

The proportion of heads converges to 50% as you flip more. The difference between the number of heads and tails does not shrink, it grows. After 10,000 flips the average gap between heads and tails is about 80. The share of heads gets closer to one half because that gap grows more slowly than the number of flips.

Flips      Typical |heads − tails|    Typical share of heads
100        about 8                    50% ± 5%
10,000     about 80                   50% ± 0.5%
1,000,000  about 800                  50% ± 0.05%

4. The hot hand and the gambler's fallacy

After five heads in a row, many people feel tails is "due" (the gambler's fallacy), while others feel heads is "on a roll" (the hot hand). For an independent coin both feelings are wrong. Gilovich, Vallone and Tversky (1985) argued that streaks in basketball shooting look just like coin-flip streaks. In 2018, Miller and Sanjurjo found a subtle bias in how such streaks had been measured: even for a fair coin, the share of heads right after a run of heads in a short sequence is expected to be below 50%. This is a great example of how careful probability reasoning can overturn a famous result.

5. Are real coins fair?

Physics says not quite. Diaconis, Holmes and Montgomery (2007) modeled the flip as a spinning, wobbling disk and predicted that a coin lands on the side it started on about 51% of the time. In 2023, a team led by František Bartoš tested this with 350,757 real flips and measured a same-side rate of 50.8%. The bias is too small to matter for deciding who kicks off a football match, but it shows that "random" physical processes can be studied and measured. The simulator on this page uses a computer random number generator, so it behaves like a perfectly fair coin.

Try it yourself
Before running the simulator, write down your own sequence of 100 "random" heads and tails. Count your longest streak. Then flip 100 times in the simulator and compare. Most people's invented sequences have a longest streak of 4 or 5, while real sequences usually reach 6 or more.

References and further reading

Peer-reviewed research behind this page. Links open the official publisher page; free PDFs are marked. Browse every source in our Research Library.

  1. Diaconis, P., Holmes, S. and Montgomery, R. (2007). Dynamical Bias in the Coin Toss. SIAM Review, 49(2), 211 to 235.

    A Stanford mathematician and magician analyzes the physics of a flipped coin and predicts a slight bias toward the side that started facing up.

    Read the paper ↗DOI: 10.1137/S0036144504446436
  2. Bartoš, F., Sarafoglou, A., Godmann, H. R. et al. (2023). Fair Coins Tend to Land on the Same Side They Started: Evidence from 350,757 Flips. arXiv preprint 2310.04153.

    A team of researchers flipped coins 350,757 times and confirmed the Diaconis prediction: about 50.8% of flips land on the starting side.

    Read the paper ↗Download free PDF ↓DOI: 10.48550/arXiv.2310.04153
  3. Gilovich, T., Vallone, R. and Tversky, A. (1985). The Hot Hand in Basketball: On the Misperception of Random Sequences. Cognitive Psychology, 17(3), 295 to 314.

    The classic study arguing that basketball "hot streaks" are what random sequences naturally look like.

    Read the paper ↗DOI: 10.1016/0010-0285(85)90010-6
  4. Miller, J. B. and Sanjurjo, A. (2018). Surprised by the Hot Hand Fallacy? A Truth in the Law of Small Numbers. Econometrica, 86(6), 2019 to 2047.

    A surprising twist: the 1985 hot hand study contained a subtle sampling bias. Once corrected, a small hot hand effect appears.

    Read the paper ↗DOI: 10.3982/ECTA14943