Skip to content
GivenTool

Flip a coin: heads or tails

Flip a fair coin once, or flip up to 1,000 coins at once and see the heads/tails tally, percentages and longest streak.

Loading tool…

Press "Flip a coin" for a single heads-or-tails decision. For experiments, enter a number up to 1,000 and flip them all at once: the page shows how many heads and tails came up, the percentages, the longest run of the same side and the full sequence.

The session totals keep adding up across single and batch flips, which is a quick way to watch the law of large numbers at work: after 10 flips a 70/30 split is common, after 1,000 flips the share of heads is usually within about 3 percentage points of 50%.

Each flip is one random bit from crypto.getRandomValues, so heads and tails have exactly equal probability. A physical coin is close to fair too, though a 2023 study of 350,757 hand flips by Bartoš and colleagues found a slight tendency to land on the side that started facing up.

How to use it

  1. Press "Flip a coin" for one flip; the side is shown and announced.
  2. For many flips, enter a count from 1 to 1,000 and press the batch button.
  3. Read the tally, percentages and longest streak; open "Sequence" to see every flip in order.
  4. Use "Reset totals" to start a new running count.

Frequently asked questions

Is it really random and fair?

Yes. Draws come from your browser's crypto.getRandomValues, the cryptographically secure generator defined by the W3C Web Cryptography API, rather than Math.random. The widget turns 32-bit random numbers into a choice with rejection sampling: values from the small top slice of the range that would favour some options are thrown away and redrawn, so every option has exactly the same probability.

Is a streak of 8 heads in a row suspicious?

No. In 1,000 fair flips the longest run of one side is typically around 9 or 10. Long streaks feel unlikely but are expected in large samples; the "Longest run" figure lets you see this for yourself.

Why is my batch not exactly 50/50?

Random samples scatter around the true probability. With 100 flips, anything from roughly 40 to 60 heads is ordinary; with 1,000 flips, roughly 470 to 530. An exact 50/50 split is actually one of many possible outcomes, not the typical one.

Can I use this to settle a bet?

It is as fair as a coin can be, and nothing is predetermined or stored. For anything with money or legal weight, agree beforehand with the other person on who calls which side.

Does the result depend on previous flips?

No. Every flip is independent. After five heads, the next flip is still exactly 50% heads and 50% tails.