Are online coin flips fair?

By · Updated

A fair online coin should land on heads about half the time, with no pattern you can predict. We flipped 1,000 coins on our Coin Flip tool and got 510 heads and 490 tails. That is a good result, but it is also easy to misread, because a fair coin is not supposed to be perfectly even. Here is what the number shows, what it does not show, and how randomness works in a browser.

What we did

On the live Coin Flip page we set 100 coins per flip and flipped 10 times, for 1,000 coins in total. The tool counted 510 heads and 490 tails, or 51% and 49%.

ResultCountShare
Heads 510 51%
Tails 490 49%
Total 1,000 100%

Is 510 out of 1,000 fair?

Yes. With 1,000 fair flips, the typical distance from 500 is about 16 flips (the standard deviation, the square root of 1,000 x 0.5 x 0.5, which is 15.8). Our result is 10 away, well inside normal variation. An exact 500 would not be any more impressive.

One run cannot prove a coin is fair; it can only fail to show a problem. A much larger gap, say 600 heads in 1,000, would be a real warning sign, since that is more than six standard deviations from the middle.

What normal variation looks like

The binomial distribution tells you exactly how uneven a fair coin is allowed to look. These figures are calculated, not measured, and they apply to any fair coin, real or virtual.

  • With 10 flips, a lopsided result is common: 8 or more of one side, either way, happens about 11% of the time.
  • With 1,000 flips, only about half of all fair runs land between 490 and 510 heads. Our 510 sits right at the edge of that middle band, which is entirely ordinary.
  • The percentage gets closer to 50% as you flip more, but the raw gap from an even split tends to grow. That is the law of large numbers working as it should, not a sign of bias.
FlipsChance of an exact 50/50 splitAt least 95% of fair runs land between
10 24.6% (exactly 5 heads) 2 and 8 heads
100 8.0% (exactly 50 heads) 40 and 60 heads
1,000 2.5% (exactly 500 heads) 469 and 531 heads

Streaks are normal

People expect random results to alternate, so a run of five heads looks suspicious. It is not. Each flip is independent: after five heads the next is still 50/50. Believing tails is now "due" is the gambler's fallacy.

In fact, long runs are close to guaranteed. In 100 fair flips, the chance of seeing a run of at least 5 of the same side somewhere is about 97%, at least 6 about 81%, and at least 7 about 54%. In 1,000 flips, a run of 10 or more turns up about 62% of the time. A list of results with no runs longer than three would be more suspicious than one with a streak of seven.

How to run your own test

The counters keep the most recent 1,000 coins, so for a test of exactly 1,000, reset first. The streak counter shows the current run of heads or tails, and the row of small coins shows the last 24 results, which is a good way to see for yourself how often runs of three or four appear.

  • Open the Coin Flip tool and choose 100 under Coins per flip.
  • Press Flip 100 coins ten times. You can also press F, the space bar or Enter.
  • Read the Heads, Tails and Total flips counters and the percentage bar underneath.
  • Compare the result with the table above: anything between about 469 and 531 heads in 1,000 is what a fair coin produces 95% of the time.
  • Click Reset stats to start a fresh test.

One coin or many: same odds

With one coin selected, the tool shows a full toss animation and lands on the result; with 2 to 100 coins it shows a grid of small coins and a heads and tails count. The display is the only difference. Every coin in a batch is decided separately by the same generator, so flipping 100 coins once is statistically the same as flipping one coin 100 times, just faster. That makes the batch mode the practical choice for testing, and the single coin the friendlier choice for settling who goes first. If your device is set to reduce motion, the result appears without the animation.

Where the randomness comes from

Our random tools use your browser's crypto.getRandomValues, a cryptographically secure generator, rather than the simpler Math.random. The flip happens on your device, so the site does not choose the outcome.

The code also guards against a subtle problem called modulo bias by discarding random values that would favour some outcomes over others. For a coin it never has to: the generator produces one of 2^32 equally likely numbers, which divides exactly into two halves, so heads and tails each get exactly half. The guard matters for things like a 6-sided die, where 2^32 does not divide evenly by 6.

The same source drives the Dice Roller, Spin the Wheel and the Random Number Generator, so all of them have the same basis for fairness.

How to judge any random tool

Virtual coins also skip a detail of real ones: studies of human coin tossing have found a slight tendency to land on the side that started up. A software flip has no starting side.

  • Run a large sample and compare it with what chance predicts, not with a perfect split.
  • Look for a statement of how results are generated. Secure browser randomness is a good sign.
  • Check whether the result is decided on your device or on a server you cannot see. A server-side result is not necessarily unfair, but you are trusting the operator.
  • For anything with money or legal weight, use a process people can witness or audit. A website is fine for deciding who goes first, not for a prize draw with legal rules.

Common misunderstandings

  • "It gave heads three times, so it must be broken." Three in a row happens one time in eight for any three flips.
  • "I flipped 10 and got 7 heads, so it is biased." Seven or more heads in 10 flips happens about 17% of the time.
  • "Best of three is fairer than one flip." Each player still has exactly a 50% chance; it only takes longer.
  • "The animation decides the result." The result is chosen first by the random generator, and the spinning coin is then drawn to land on it.

Try the free Coin Flip

Frequently asked questions

Is a virtual coin flip truly random?

It is random enough for everyday decisions. Ours uses the browser's cryptographically secure generator, which is designed to be unpredictable.

What are the odds of 5 heads in a row?

One in 32, or about 3%, for any given five flips: 0.5 multiplied by itself five times. Somewhere within 100 flips, a run of 5 of the same side is very likely, at about 97%.

Does the previous flip affect the next one?

No. Each flip is independent and stays 50/50.

How many coins can I flip at once?

Up to 100 per flip. You can choose 1, 2, 5, 10, 25 or 100 coins, and the tool counts heads and tails for you.

Is it fair for settling a decision between two people?

Yes, for everyday choices. Agree who takes heads before anyone flips, flip once, and accept the result; re-flipping until someone likes the answer is what makes it unfair.

How many flips do I need to test fairness?

Several hundred at least. With 10 flips almost any split is normal; with 1,000 a fair coin lands between 469 and 531 heads about 95% of the time.

Sources