Skip to content
thecalculatorstudio

Flip a Coin: Heads or Tails Online, With the Odds

Press the button for one fair flip, or choose how many coins to flip at once. You see every result, the count of heads and tails, your longest streak, and how likely each outcome really was.

By Abdaal Akram · Last reviewed

Press the button to flip. Each press is a fresh flip.

Flipped with your browser's cryptographic random source, so heads and tails are exactly equally likely. For games and decisions, not for gambling.

How to flip a coin here

Press the button and the coin lands on heads or tails. That is the whole job for most people: deciding who goes first, picking between two films, or settling an argument fairly.

If you want more than one flip, set the number of flips and press again. You can flip up to 1,000 coins at once. You see every result in order (H for heads, T for tails, for up to 200 flips), how many of each came up, and your longest streak. Each press is a new set of flips, and a running total of everything you have flipped since opening the page sits underneath.

Why the flip is fair

Each flip comes from your browser’s cryptographic random source, the same one used to make passwords and encryption keys. One random byte is drawn per flip: an even byte is heads and an odd byte is tails. A byte has 256 possible values, 128 even and 128 odd, so neither side is favoured and no adjustment is needed. Nothing is stored or sent anywhere, and the coin is flipped only when you press the button.

The coin also has no memory. After a run of heads, the next flip is still exactly 50/50. That is the part people find hardest to believe, and it is the reason the page shows how likely your results were.

What your result means

Ten flips rarely come out five and five. Exactly five heads is the most likely single result, but it happens only about one time in four. Six heads and four tails, or seven and three, are not signs that anything is wrong. They are what a fair coin does most of the time.

Streaks are the other surprise. In 100 flips you will almost always see five of the same side in a row, and usually six. If you are testing whether a coin, or a person, is “random”, a long streak is not evidence against it. A sequence with no streaks at all would be stranger.

The formula

The chance of getting exactly k heads in n flips is the binomial formula:

P(k heads) = C(n, k) ÷ 2ⁿ

Here 2ⁿ is the number of equally likely sequences of n flips, and C(n, k), read “n choose k”, is how many of those sequences have exactly k heads. It is n! ÷ (k! × (n − k)!).

Worked example: 5 heads in 10 flips. There are 2¹⁰ = 1,024 possible sequences. The number with exactly five heads is C(10, 5) = 10! ÷ (5! × 5!) = 252. So the chance is 252 ÷ 1,024 = 0.2461, or 24.61%.

The chance of at least a number of heads adds up the rows from that number upwards. At least 5 heads in 10 flips is (252 + 210 + 120 + 45 + 10 + 1) ÷ 1,024 = 638 ÷ 1,024, or 62.30%.

The calculator works these out exactly for any number of flips up to 100, using whole-number counts so nothing rounds until the final percentage.

Ten flips: every possible result

Heads in 10 flips Ways Chance of exactly this Chance of this or more
0 1 0.10% 100.00%
1 10 0.98% 99.90%
2 45 4.39% 98.93%
3 120 11.72% 94.53%
4 210 20.51% 82.81%
5 252 24.61% 62.30%
6 210 20.51% 37.70%
7 120 11.72% 17.19%
8 45 4.39% 5.47%
9 10 0.98% 1.07%
10 1 0.10% 0.10%

The table is symmetrical because heads and tails are equally likely: 3 heads is as likely as 7 heads, which is the same as 3 tails.

With more flips the share of heads settles closer to half, but the exact half becomes less likely. Exactly 50 heads in 100 flips has a chance of only 7.96%, while landing anywhere from 40 to 60 heads has a chance of 96.48%.

How long a streak to expect

A streak here means a run of the same side, heads or tails. The chance of seeing one at least as long as a given length:

Flips Streak of at least Chance
10 4 46.48%
20 5 45.84%
100 5 97.17%
100 6 80.68%
100 7 54.23%
100 8 31.48%

These are counted exactly. A sequence with no run of r or more is fixed by which side comes first and the lengths of its runs, so the calculator counts the ways to split n flips into runs shorter than r and takes that away from all 2ⁿ sequences. When you flip more than one coin, it shows the chance of a streak at least as long as your longest one.

Five heads in a row from a standing start is 1 in 32, or 3.125%. But across 100 flips there are dozens of places for such a run to start, which is why one almost always turns up.

Real coins

A real coin tossed by hand is very close to fair. In a 2023 study, a team of researchers flipped coins 350,757 times. Heads came up 50.0% of the time, but each coin landed on the side it started on 50.8% of the time. That matches a physics model of coin tossing from 2007, which predicted about 51%. So a hand-tossed coin is fair if nobody can see the starting side, and slightly favours the side facing up when it is thrown. The coin on this page has no starting side, so it is exactly 50/50.

For more than two outcomes, the dice roller throws any number of dice and shows the odds of every total. To pick a number from a range use the random number generator, and the probability calculator combines the chances of several events.

Frequently asked questions

Is this coin flip really 50/50?

Yes. Each flip is drawn from your browser's cryptographic random source, so heads and tails are exactly equally likely, and nothing is stored or sent. A real coin is very close to 50/50 for heads and tails too, as long as nobody can see which side starts face up.

Is a real coin toss fair?

Close to it, with one twist. In a 2023 study of 350,757 flips, heads came up 50.0% of the time, but a coin landed on the side it started on 50.8% of the time. So a hand-tossed coin is fair if the starting side is random, and very slightly favours the side facing up when it is thrown.

What are the odds of getting 5 heads in 10 flips?

There are 252 ways to choose which 5 of the 10 flips are heads, out of 1,024 equally likely sequences, so the chance is 252 in 1,024, or 24.61%. It is the most likely result, but three times out of four you will get some other count.

After five heads in a row, is tails due?

No. The coin has no memory, so the next flip is still 50/50. Five heads in a row has a chance of 1 in 32 when you start counting, but once those five have happened, the sixth flip is a fresh one.

How long a streak should I expect?

Longer than most people guess. In 100 flips there is a 97.17% chance of a run of at least five of the same side, and an 80.68% chance of a run of six or more. The calculator shows how likely your own longest streak was.

Can I use it to settle a decision or for gambling?

It is fine for deciding who goes first or choosing between two options. It is a free tool with no guarantees and is not certified for gambling.

Related calculators

Sources