Skip to content
MoneyDeck

Coin Flip

Flip a fair virtual coin once or 10,000 times and count heads vs tails

Updated · Free, no signup

Any word or number. The same seed and settings always give the same flips.

Result

Heads

Heads (first side)

1

Tails (second side)

0

Heads share

100%

Expected heads

0.5

Standard deviation

0.5

Typical range (95%)

0–1

Number of heads you land within about 95% of the time.

Heads vs tails

About the Coin Flip

Flip a coin online when you need a fast, fair decision: who kicks off, who pays, which movie to watch, or which option to try first. One click gives you heads or tails, and every unseeded toss uses your browser’s cryptographically secure random number generator (Web Crypto), so each side has exactly a 50% chance and no flip is influenced by the last one.

Need more than one toss? Flip up to 10,000 coins at once to settle a best-of-three, run a classroom probability experiment or see the law of large numbers in action. The tool counts heads and tails, shows the percentage of each, finds the longest streak and compares your result with what probability predicts — the expected number of heads, the standard deviation and the range you should land in 95% of the time.

Type an optional seed (any word) to make a run repeatable, which is handy for teaching or for proving a draw was not rerolled. A seeded run uses a fast repeatable pseudo-random generator instead of Web Crypto: still 50/50 and fine for games or demos, but not for anything security-sensitive. Leave the seed blank for a fresh random result every time you change an input; there is no separate re-flip button, so change any input (or the seed) to flip again.

How to use the coin flip

  1. 1Leave the number of flips at 1 for a single heads-or-tails decision.
  2. 2Increase the flips (up to 10,000) for a best-of series or a probability experiment.
  3. 3Pick the coin labels — Heads/Tails, Yes/No or Option A/B.
  4. 4Change any input to flip again, or type a seed to make the run repeatable.
  5. 5Compare your heads count with the expected value and the 95% range.

Formula and method

P(heads) = 0.5 · E[heads] = n × 0.5 · σ = √(n × 0.5 × 0.5) = √n ÷ 2

Each flip draws a uniform random number between 0 and 1; values below 0.5 are heads and the rest are tails, so both sides have exactly a 50% chance and every flip is independent of the ones before it.

The number of heads in n flips follows a binomial distribution. Its mean is n ÷ 2 and its standard deviation is √n ÷ 2. The typical 95% range is the mean ± 1.96 standard deviations, rounded to whole flips. The chance that all n flips match (all heads or all tails) is 2 × 0.5ⁿ = 0.5ⁿ⁻¹.

n
Number of flips
E[heads]
Expected (average) number of heads
σ
Standard deviation of the heads count

Worked examples

One flip to settle a decision

A single toss lands heads or tails, so the heads count is either 0 or 1 with equal chance. The expected number of heads is 0.5 and the standard deviation is √1 ÷ 2 = 0.5.

10 flips: how many heads should you get?

With 10 flips you expect 5 heads with a standard deviation of √10 ÷ 2 ≈ 1.58. About 95% of runs land between 2 and 8 heads (5 ± 3.1). The chance all ten flips match is 0.5⁹ ≈ 0.195%, roughly 1 in 512.

1,000 flips classroom experiment

In 1,000 flips the expected heads count is 500 and the standard deviation is √1000 ÷ 2 ≈ 15.8. So 95% of the time you get between 469 and 531 heads — a 46.9% to 53.1% share, much tighter than with 10 flips.

Frequently asked questions

Is an online coin flip really 50/50?+

Yes. Each flip uses the browser’s cryptographically secure random generator (Web Crypto), and values are split exactly in half, so heads and tails each have a 50% chance on every toss.

Does a streak of heads make tails more likely next?+

No. That belief is the gambler’s fallacy. Coin flips are independent, so after five heads in a row the next flip is still exactly 50% heads and 50% tails.

Is a real coin toss fair?+

Nearly, but not perfectly. A 2023 study of over 350,000 hand-tossed coins found about a 50.8% chance of landing on the same side it started on, which is why a random generator is fairer than a thumb flip.

What are the odds of getting 10 heads in a row?+

The chance of 10 heads in a row is 0.5¹⁰ = 1 in 1,024, about 0.098%. The chance of 10 identical results (all heads or all tails) is double that, 1 in 512.

How do I flip a coin best of 3?+

Set the number of flips to 3. Whichever side appears at least twice wins. Because three is odd, there can never be a tie.

What does the seed do?+

A seed makes the flips reproducible: the same seed and settings always give the same sequence. Seeded runs use a repeatable pseudo-random generator rather than Web Crypto. Use it to replay a classroom demo or prove a result was not rerolled; leave it blank for fresh randomness.

Related tools