3tej home
← All Games

What is Coin Flip?

A Coin Flip computes coin flip from the inputs you provide. It applies the standard formula to the values you enter and returns the result instantly, without sending any data to a server. Single flip or batch of N flips.

Interactive simulator

Coin flip

Fair coin flip using crypto.getRandomValues.

Heads
Heads-
Tails-
Sequence (last 50)-

Coin Flip

Animated coin. Single flip or batch of 100.

About this coin flip

This coin flipper settles a yes/no decision or runs a batch of trials so you can watch probability in action. Each flip is a Bernoulli trial with a 0.5 chance of heads and 0.5 chance of tails. Crucially, the flips are drawn from crypto.getRandomValues, the browser's cryptographically secure random source, not the weaker Math.random, so there is no detectable bias or pattern even across thousands of flips.

Two ideas explain almost everything people get wrong about coins. The gambler's fallacy is the false belief that a run of heads makes tails "due"; in reality every flip is independent and the next one is still exactly 50/50. The law of large numbers is the true statement that the observed proportion of heads converges toward 50 percent as the number of flips grows, even though the absolute gap between heads and tails counts can keep widening. Both can be true at once, and the batch mode above lets you see it.

Flipping a coin to decide is ancient. The Romans called it "navia aut caput" (ship or head, after the imagery on their coins), and the toss has settled disputes ever since because it is fast, visible, and accepted as fair by both sides. Today it opens every American football game, breaks ties in some local elections by law, and even decided the 1968 European Cup semi-final between Italy and the Soviet Union. The appeal is procedural fairness: when no option is clearly better, a verifiable 50/50 draw lets everyone agree the outcome was impartial rather than chosen.

How it works

For a single flip the math is trivial; the interesting part is what happens across many flips. The expected number of heads in n flips and the spread around that expectation follow the binomial distribution.

P(heads on one flip) = 0.5
Expected heads in n flips  = 0.5 x n
Standard deviation         = sqrt(n x 0.5 x 0.5) = 0.5 x sqrt(n)
Observed heads %           = (heads / n) x 100  -> tends to 50% as n grows
  • Expected heads scales linearly with the number of flips; in 100 flips you expect 50.
  • Standard deviation scales with the square root of n, so the typical gap from 50/50 grows slowly while the percentage tightens.
  • Independence means the sequence H-H-H-H has the same probability (1/16) as H-T-H-T; no order is "luckier".
  • Convergence rate follows 1/sqrt(n): to halve the typical percentage error you must quadruple the number of flips, which is why a stable 50 percent reading needs thousands of trials, not dozens.

Worked example

Suppose you flip the coin 100 times and get 57 heads, 43 tails. Is that suspicious?

  1. Expected heads: 0.5 x 100 = 50.
  2. Standard deviation: 0.5 x sqrt(100) = 0.5 x 10 = 5 heads.
  3. How far is 57? (57 - 50) / 5 = 1.4 standard deviations above the mean.
  4. Interpretation: results within about 2 standard deviations (40 to 60 heads) happen roughly 95 percent of the time, so 57 is completely ordinary.
Result: 57 heads out of 100 is well inside the normal range for a fair coin. You would need something past 60 to 61 heads before a single 100-flip run starts to look genuinely unusual.

Probability reference

ScenarioProbabilityAs odds / percent
1 heads in a row1/250%
2 heads in a row1/425%
3 heads in a row1/812.5%
5 heads in a row1/323.13%
10 heads in a row1/10240.098%
Exactly 50 heads in 100 flips~0.0796~7.96%
At least one head in 5 flips31/3296.9%

Common pitfalls

  • Believing tails is "due". After five heads, the sixth flip is still 50/50. The coin has no memory; that is the gambler's fallacy in its purest form.
  • Expecting an exact 50/50 split. Even a perfect coin rarely lands on precisely 50 heads in 100 flips (only about an 8 percent chance). A 53/47 or 56/44 split is normal.
  • Confusing percentage and count convergence. As you flip more, the heads percentage closes in on 50, but the raw difference between heads and tails often grows, not shrinks.
  • Trusting weak randomness. Many online flippers use Math.random, which is not designed to be unpredictable. This tool uses the cryptographic generator instead.
  • Reading streaks as bias. A run of six identical results in a long sequence is expected, not evidence of a loaded coin. Streaks are how true randomness looks.
  • Using a coin for unfair odds. A coin only gives 50/50. For other splits (such as 1-in-3) use the dice roller or random picker instead.

Related tools

Frequently asked questions

Is this coin flip truly random?

Yes. It draws bits from crypto.getRandomValues, the browser's cryptographically secure random number generator, rather than the predictable Math.random. Each flip has an unbiased 50 percent chance of heads and 50 percent of tails with no detectable pattern.

If I get five heads in a row, is tails more likely next?

No. Each flip is independent, so after five heads the next flip is still exactly 50/50. Believing the coin is "due" for tails is the gambler's fallacy. The coin has no memory of past results.

Why is my batch not exactly 50/50?

Random variation. In 100 flips the standard deviation is 5 heads, so anything from about 40 to 60 heads is normal. The percentage converges to 50 as you flip more (the law of large numbers), but the exact count almost never lands on the midpoint.

What are the odds of flipping ten heads in a row?

One in 1,024, or about 0.098 percent. Each additional head halves the probability: two in a row is 1/4, three is 1/8, and ten is (1/2) to the tenth power, which equals 1/1024.

Is a real coin actually 50/50?

Almost, but not perfectly. A 2007 Stanford study by Persi Diaconis found a spinning or flipped physical coin has a tiny bias (around 51 percent) toward the side that started face up, because of wobble during the flip. A digital flip like this one removes that physical bias entirely.