Coin Flip

Flip a fair coin once or a hundred times, with a running tally and the longest streak shown.

Loading tool…

Everything runs in your browser. Nothing is uploaded, nothing is stored on a server, and closing the tab clears it.

What the Coin Flip does

This coin flip will flip a fair coin once or a hundred times, with a running tally and the longest streak shown. Everything runs inside this page, so the work happens on your own device rather than on a server. It is most often used for settling a decision between two options. A related tool on this site is the spin the wheel.

How to use it

  1. Press Flip for one toss.
  2. Use the batch buttons to flip ten or a hundred times at once.
  3. Watch the tally and the longest run.
  4. Reset to start a fresh count.

How it works

Each flip reads a byte from the browser's cryptographic random generator and takes the low bit, which is exactly fair — a bit is either 0 or 1 with equal probability and there is no modulo bias to worry about, unlike dice where the face count rarely divides the generator range evenly.

The tally is the interesting part, because it demonstrates something most people get wrong about randomness. A fair coin does not stay near an even split; it drifts, and the drift grows roughly with the square root of the number of flips. After a hundred flips you should expect to be about five away from 50/50, not exactly on it. Being exactly 50/50 after a hundred flips is itself slightly unusual.

Streaks are the other thing that looks wrong and is not. In a hundred flips, a run of six or seven of the same face is entirely ordinary — the chance of at least one run of six somewhere in a hundred flips is better than even. People asked to write down a "random-looking" sequence almost never include runs that long, which is one of the ways statisticians detect fabricated data.

The gambler's fallacy is worth naming, since this is the tool that demonstrates it. After five heads in a row, the next flip is still exactly 50/50. The coin has no memory and no mechanism by which it could. What is true is that a long run is unlikely *before* it starts — the chance of six heads from a fresh start is 1 in 64 — but once five have happened, the sixth is a fresh coin with fresh odds.

When to use it

  • Settling a decision between two options.
  • Picking who goes first.
  • Generating a random binary sequence.
  • Demonstrating probability, streaks and the gambler's fallacy.

Common mistakes to avoid

  • Expecting a run of heads to make tails "due". Each flip is independent — that is the gambler's fallacy.
  • Being surprised by a streak of six. In a hundred flips it is more likely than not.
  • Expecting the tally to sit exactly on 50/50. Drift grows with the square root of the number of flips.

Frequently asked questions

Is the coin actually fair?

Yes. Each flip takes one bit from the browser's cryptographic random generator, which is exactly even. There is no bias of the kind that affects naive dice implementations.

I got seven heads in a row. Is something wrong?

No. In a hundred flips, at least one run of six is more likely than not, and seven is unremarkable. Runs that feel wrong are a normal feature of genuine randomness — their absence is what suggests fabricated data.

After five heads, is tails more likely?

No. The coin has no memory, so the next flip is 50/50 regardless of history. That intuition is the gambler's fallacy. The run being unlikely in advance and the next flip being even are both true and not in conflict.

Related tools

See all everyday tools →