Skip to the calculator
Rule Calculator

Coin flip

Flip one, ten or a hundred. Alongside the tally you get the two things a run of flips actually raises: whether the split is far enough from even to mean anything, and how ordinary your longest streak is.

By Alex Seote, Built and maintains Rule Calculator

Probabilities computed exactly, not simulated · How we check

Streaks are the normal case

People asked to write down a “random” sequence of coin flips produce far fewer long runs than a real coin does — the invented sequences alternate too much, and a statistician can spot them at a glance. The intuition that a run of six means something is the same instinct, and it is wrong for the same reason: in two hundred flips there are nearly two hundred places a run could start.

The run figure above is computed exactly rather than simulated — a state machine over “no run yet, with a tail of k matching flips” — so it is the true probability rather than an estimate from a sample of trials.

Questions people actually ask

I got six heads in a row. Is the coin rigged?
Almost certainly not. A streak of six somewhere in two hundred flips happens more often than it does not — over 80% of the time. Runs are what randomness looks like; a sequence that alternated politely would be the suspicious one. The page prints the exact probability of a streak as long as yours, and it is usually unremarkable.
How many flips does it take to tell a coin is biased?
More than people think. To detect a coin that lands heads 55% of the time with reasonable confidence takes around a thousand flips; a 51% bias takes tens of thousands. That is why a hundred flips coming out 60–40 is not evidence of anything — the page gives it a probability of about 5.7% under a fair coin, which is the sort of thing that happens.
Is a real coin flip fair?
Close, but not exactly. Careful work on physical coins has found a small bias toward the side that started facing up, on the order of 51 to 49, because a flipped coin precesses rather than turning cleanly. It is far too small to matter for settling an argument and far too small to see in any number of flips you will do by hand.
What does the fairness probability mean?
It is the chance a genuinely fair coin would give a split at least as lopsided as yours, counting both directions. A large value means your result is ordinary; a very small one means it would be unusual for a fair coin. It is not the probability that the coin is fair — no amount of flipping produces that number, and reading it that way is the classic misreading of a p-value.
Are these flips actually random?
They come from crypto.getRandomValues, your browser’s cryptographic generator, drawn through a rejection sampler so that heads and tails are exactly equally likely. The usual shortcut — a floating-point random number cut in half — is fine for a coin and quietly biased for a six-sided die, so the same careful path is used for both.

Related