🪙 Coin Flip Simulator

Flip one coin at a time for a quick decision, or flip thousands at once to see how close the results land to 50/50.

🪙

How the coin is decided

Each flip pulls a fresh 32-bit value from your browser's cryptographic random source and reads only its lowest bit:

crypto.getRandomValues(arr);
heads = (arr[0] & 1) === 1;

Taking a single bit matters. Squeezing a large random number into two outcomes with a remainder can leave one side very slightly favoured, but a bit is either 0 or 1 with nothing left over, so heads and tails are exactly even. A real coin is not: spun on a table it favours one face by a few percent, and a caught flip lands the same side up about 51% of the time.

Flipping in bulk

Set the count to 10,000 and the tally lands near 50% but rarely on it. The spread of the heads count is √n / 2, so results scale like this:

FlipsTypical heads countAs a percentage
10050 ± 545-55%
1,000500 ± 1648.4-51.6%
10,0005,000 ± 5049.5-50.5%

The percentage tightens while the raw gap between heads and tails grows - that is the law of large numbers, and it is the opposite of what most people expect it to say.

The tally keeps adding up across every press of Flip until you hit Reset tally. Individual Heads/Tails badges only appear for batches of 50 or fewer; above that you get the totals only.

Frequently asked questions

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

1 in 1,024, or 0.098%. It stops feeling rare at scale: a single batch of 100,000 flips contains roughly a hundred runs of ten heads somewhere in it.

After five heads in a row, is tails more likely?

No. Every flip reads a new random bit that knows nothing about the last one, so it is 50% again. Expecting a correction is the gambler's fallacy.

Why did 100 flips not come out exactly 50 and 50?

Because a dead-even split is itself unlikely - it happens only 7.96% of the time over 100 flips. Anything from 45 to 55 heads is an ordinary result.