🧮
🧮 Math & statistics

Coin Flipper (flip a fair coin online: heads or tails)

Results update as you type.

Your numbers

Understanding the coin flipper — concept and principle

This tool flips a fair virtual coin as many times as you like and shows the sequence, the counts of heads and tails, the longest run and how likely that exact number of heads was. Use it to settle a choice, run a classroom probability experiment or see what real randomness looks like.

Coin flipper10 flips (one random run)THHTTHTHHHrun of 3Heads6 / 10Expected5P(exactly 6)0.2051C(10, 6) ÷ 2¹⁰ = 210 ÷ 1,024
Six heads in ten is ordinary: it happens about one time in five.

How it is calculated

The principle

A fair coin has no memory: each flip is 50/50 whatever came before. Over many flips the share of heads settles near 50 % (the law of large numbers), but the count can still wander: with n flips the number of heads typically varies by about √n ÷ 2 around n ÷ 2. Runs of the same side are far more common than people expect; a sequence that alternates too neatly is a sign of human invention rather than chance.

Worked example

Default inputs: 10 flips, flip number 1. The flips are random, so the page may show a different result each time; when this page was checked it gave:

  1. Sequence T H H T T H T H H H: 6 heads and 4 tails; last flip Heads.
  2. Heads share = 6 ÷ 10 = 60 %; expected heads for a fair coin = 5.
  3. Longest run of the same side = 3 (the last three heads).
  4. Chance of exactly 6 heads = C(10, 6) ÷ 2¹⁰ = 210 ÷ 1,024 = 0.2051.

How to read the result

Results like 6–4 or 7–3 in 10 flips are completely normal; even 8–2 happens about 4–5 % of the time in one direction. Only with hundreds of flips does the share reliably sit close to 50 %. A long run does not make the other side "due".

Common mistakes

Keep in mind: For fun, games and classroom use only; not for gambling.

Frequently asked questions

Is an online coin flip fair?

This one uses the browser's cryptographic random generator with an unbiased mapping, so each flip is 50/50.

What is the chance of 10 heads in a row?

1 in 1,024, about 0.1 %.

How long is the longest run in 100 flips?

Usually around 6 or 7.

Sources: W3C Web Cryptography API, crypto.getRandomValues · Binomial distribution, standard probability theory

Checked 9 Nov 2026. Web Crypto API, crypto.getRandomValues (W3C Recommendation); unbiased bounded integers by rejection sampling; binomial probabilities C(n, k) ÷ 2ⁿ for a fair coin.

🧮 All math & statistics tools →🌍 Calculators by country →