Coin Flip Simulator
Toss up to 100 coins with real flight physics and watch heads per round build the binomial distribution.
Each coin gets a random toss speed and spin, and the face it lands on comes out of the physics of its flight. Tap a coin to flip it alone or the table to flip them all, and watch heads per round fill out the binomial curve.
How is Coin Flip Simulator working for you?
About Coin Flip Simulator
- Toss model
- Keller (1986), with precession after Diaconis, Holmes and Montgomery (2007)
- Same-side chance
- About 51% predicted; 50.8% in 350,757 real flips
- Heads in 10 flips
- 5 heads in about 24.6% of rounds
- Longest run of heads
- About log₂ n − 2/3 in n fair flips
Coin Flip Simulator tosses coins the way physics says they fly. Following Joseph Keller's 1986 model, each coin leaves the hand with a random upward speed and spin, turns over about twenty times in the air, and lands on whichever face is up when it comes back down. Nothing in the program picks heads or tails; the outcome comes from the flight. Toss one coin or a hundred at once: a chart of heads per round fills out the binomial distribution, and the running share of heads closes in on the dashed line, the law of large numbers that Jacob Bernoulli proved in Ars Conjectandi in 1713.
Real coins have a small bias. In 2007 Persi Diaconis, Susan Holmes and Richard Montgomery showed that a tossed coin also wobbles (precesses) unless its spin axis lies exactly in its face, and a wobbling coin lands on the side it started on about 51% of the time. In 2023 František Bartoš and colleagues tested the prediction with 350,757 real flips and found 50.8%. Set Starting face to Heads up and raise Wobble to watch the bias appear; start coins at random and it cancels out, just as the experiment found. Biased coin mode skips the physics and lands heads with any probability you set.
Random sequences are also streakier than people expect. In n flips the longest run of heads is usually close to log₂ n, as Mark Schilling explained, so 200 flips typically contain a run of about seven heads. The readout compares the longest run with that prediction, and the Randomness check box tests a sequence you make up. Export heads per round or the last 10,000 flips as CSV, or record a video or GIF of the toss.
How to use Coin Flip Simulator
- Press Play. Every coin on the table is tossed at once; each lands on the face its toss speed and spin give it, and the round's heads are counted.
- Watch the charts. Heads per round fills out the binomial distribution drawn over the bars, and Share of heads shows the running share closing in on the expected share. The dashed lines mark p ± 2√(p(1 − p)/n) after n flips: at any one count of flips, about 95% of runs have a share inside that band (the normal approximation to the binomial).
- Compare runs. After 1,000 rounds each run adds a row to the Runs table: the share of heads and the longest run of heads, with the settings that differ between rows. Reset clears the table.
- Change the experiment. Set Coins per round from 1 to 100 and Speed from one round every two seconds to 1,000 rounds a second; faster settings skip the flight animation.
- Find the same-side bias. In Physics mode, set Starting face to Heads up and Wobble to about 10°: coins land heads about 51% of the time. Switch to Biased coin for any Chance of heads.
- Flip by hand. Tap a coin to flip it on its own, or tap the table to toss them all right away.
- Randomness check. Type a sequence of H and T that you invent in Your made-up flips and see whether it switches faces and runs as long as a real coin would.
- Export. Save a PNG, video or GIF, or download heads per round, the most recent flips or the Runs table as CSV files. Record 30 s from the start tosses the same coins again from the beginning and records the first 30 seconds.
Frequently asked questions
Is a coin flip really 50/50?
Very nearly, if the starting face is random. A tossed coin turns over so many times that tiny differences in speed and spin decide the result, which is why it works as a random choice. Measured more carefully, a coin that wobbles in flight lands on the face it started on slightly more often, about 51% in Diaconis, Holmes and Montgomery's model and 50.8% in Bartoš and colleagues' 350,757 real flips.
What decides which face a tossed coin lands on?
Its flight time and its spin. In Keller's model, a coin thrown upward at speed u stays in the air for 2u/g and turns through its spin rate times that time; it lands on its starting face if it has made a whole number of turns, give or take a quarter turn. Because a typical flip makes around 20 turns, the outcome is extremely sensitive to the toss.
What is the binomial distribution?
It gives the chance of k heads in n independent flips: C(n, k) p^k (1 − p)^(n − k), where p is the chance of heads. With 10 fair coins, 5 heads happens about 24.6% of the time and 10 heads only about once in 1,024 rounds. The chart of heads per round draws this curve over the counted rounds.
What is the law of large numbers?
As the number of flips grows, the share of heads gets closer and closer to the true chance of heads. It doesn't mean heads and tails even out exactly: the difference in their counts tends to grow, roughly like the square root of the number of flips, while the share still settles. Jacob Bernoulli proved the first version in 1713.
How long a streak of heads should I expect?
Longer than most people guess. Mark Schilling showed that the longest run of heads in n fair flips is usually close to log₂ n minus about two thirds: about 6 in 100 flips and about 9 in 1,000. People who invent sequences avoid long runs and switch faces too often, which is how the Randomness check tells them apart.
Can I use this to settle a decision?
Yes. Set Coins per round to 1 and tap the coin. The tosses use a seeded random generator, so the same seed and settings replay the same flips; a new Seed gives fresh ones.
References
- Keller, J. B. (1986). The probability of heads. The American Mathematical Monthly 93(3), 191–197.
- Diaconis, P., Holmes, S., & Montgomery, R. (2007). Dynamical bias in the coin toss. SIAM Review 49(2), 211–235.
- 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:2310.04153.
- Bernoulli, J. (1713). Ars Conjectandi. Basel: Thurneysen.
- Schilling, M. F. (1990). The longest run of heads. The College Mathematics Journal 21(3), 196–207.





