Coin flip

A perfectly fair heads or tails in one tap, with a running tally of your flips.

Result
Heads 0
Tails 0
Total flips 0

What happens when you flip

Each press asks your browser's cryptographic random number generator (the same machinery used to create encryption keys) for a fresh, unpredictable value, and maps it to heads or tails with exactly equal probability. The flip happens entirely on your device: nothing is sent to a server, nobody can see the result before you do, and nobody can influence it.

Curiously, that makes this fairer than a real coin. Research into physical tosses has found a small bias towards the coin landing the same way up as it started, because of the way coins wobble in the air. A cryptographic flip has no starting side, no wobble and no wear, so it is a genuine 50/50 every single time.

The odds of streaks

chance of n heads in a row = 1 ÷ 2ⁿ

Streaks feel suspicious, but they are exactly what real randomness looks like. Flip enough times and runs of identical results are not just possible, they are inevitable.

What is the chance of five heads in a row?
1 ÷ 2⁵ = 1 in 32, about 3.1%. Flip in batches of five all afternoon and you will see one before long.
What is the chance of exactly 5 heads in 10 flips?
252 of the 1,024 possible sequences contain exactly five heads, which is about 24.6%. A perfect 50/50 split is actually the single most likely outcome, yet it happens less than a quarter of the time.
What is the chance of at least one head in three flips?
The only way to fail is three tails, which is 1 in 8. So at least one head appears 7 times in 8, or 87.5%.

The gambler's fallacy

After a run of heads, tails can feel overdue. It is not. Each flip is independent, so the chance of heads is 50% whether the last ten flips were all heads, all tails or a neat alternation. The coin has no memory, and neither does the random number generator behind this page.

What is true is that over many flips the tally tends towards an even split in percentage terms. That is the law of large numbers, and it works by dilution, not correction: an early surplus of heads does not get cancelled out, it just matters less and less as the total grows. Watch the tally on this page over 50 or 100 flips and you will see the percentages settle down even while short streaks keep appearing.

Ways people use the toss

  • Settling a choice: two restaurants, two films, two names for the cat. Assign one to each side and flip once.
  • Sport: who bats first, which end to defend, who kicks off. Cricket, football and rugby all still open with a toss.
  • Fair chores: winner picks, loser washes up. Agree the stakes before pressing the button.
  • Teaching probability: the running tally makes it easy to demonstrate streaks, independence and the drift towards 50% over a large number of flips.

One tip for close decisions: notice how you feel the instant the result appears. If HEADS comes up and your heart sinks, you have just learned what you actually wanted, and you are free to ignore the coin. Either way, it has done its job.

Frequently asked questions

Is it a true 50/50?

Yes. Each flip draws on your browser's cryptographic random number generator (crypto.getRandomValues), so heads and tails are exactly equally likely. Studies of real coin tosses suggest a physical coin has a slight bias towards the side that starts facing up, so this is arguably fairer than the real thing.

Why did I get several heads in a row?

Streaks are normal in genuinely random sequences. Five heads in a row has a 1 in 32 chance, so it will happen regularly if you keep flipping. Each flip is independent, and a streak says nothing about the next result.

Does the tally affect the next flip?

No. The counts are just a record for you. Even if the tally shows 10 heads and 2 tails, the next flip is still exactly 50/50. Believing past results are owed a correction is known as the gambler's fallacy.

Who calls heads or tails?

Convention says the person who did not suggest the toss makes the call, and they call while the coin is in the air. Online, agree who is heads before anyone presses the button, then flip once in front of both of you.

Can I use it to settle a real decision?

Yes. The flip is fair, independent and cannot be influenced by either party. For anything contested, agree the terms first, press the button once with the other person watching, and accept the first result.

Related tools