99tools

Coin Flip

runs in your browser

Flip a coin, or a hundred at once, with a running tally, the longest streak and an honest note on how ordinary the split is.

about this tool

Heads or tails, once or a hundred times

One coin answers the question you came with. A hundred at once answers a different one, which is what a fair coin actually looks like, and the answer surprises most people.

Every throw adds to a running tally with the split, the longest run of each side, and a note about how ordinary the result is. Nothing is stored between visits, so the tally starts empty each time you arrive.

Runs are the part that fools everyone

In a hundred flips of a fair coin, a run of six or seven of the same side is likely rather than remarkable. People reading a sequence expect heads and tails to alternate far more than they really do, which is why a genuine random run looks rigged and a human-invented one looks too tidy.

That is why the longest run of each side is shown rather than tucked away. It is the number most likely to make someone think the coin is broken, and seeing it next to the split is the quickest way to see that it is not.

The note under the tally

After twenty flips a sentence appears saying how far the split is from even. It is the ordinary z score: a fair coin's count of heads has mean n/2 and standard deviation √n/2, and the sentence is chosen from how many standard deviations out the result sits.

Below twenty flips there is no sentence, because the normal shape the arithmetic relies on does not fit that few, and a confident sentence would be worse than saying nothing.

None of the sentences ever calls the coin biased, because it is not. A split two standard deviations out happens about one run in twenty, and three out about one in three hundred. Both are things fair coins do.

What it cannot do

It cannot settle a dispute with someone who does not trust you. A web page cannot prove it did not decide the answer before showing it, and no amount of animation changes that. For choosing who goes first among friends it is fine, which is what a coin is usually for.

The flip is not recorded anywhere. Copy the sequence if it matters.

A coin is a picker with two names in it. For a longer list, the random picker does the same draw without the toss.

questions

Is the coin actually fair?
Each flip is an even draw from the browser’s cryptographic random source, so heads and tails are equally likely every time. The tally shows the split as it builds, which is usually less even than people expect.
I got seven heads in a row. Is something wrong?
No. In a hundred flips a run of seven is likely rather than surprising. Runs are the thing people most often mistake for bias, which is why the longest run of each side is shown rather than hidden.
Does a coin owe me tails after a run of heads?
No. Each flip is independent and knows nothing about the last one, so the odds stay even. That expectation has a name, the gambler’s fallacy, and it is the single most common misreading of a coin.
What does the note under the tally mean?
It is how far the split sits from even, measured in standard deviations, said in plain English. It only appears after twenty flips, because below that the arithmetic behind it does not fit and a confident sentence would be worse than none.
Can I use this to settle something important?
For choosing who goes first, yes. For anything someone could contest, no: a web page cannot prove to the other party that it did not decide the answer before showing it.