Flip a coin: heads or tails?
One click, one fair coin toss: heads or tails, 50% each. Flip a coin once or 100 times and watch heads and tails creep towards 50%; three heads in a row come up in 12.5% of three-flip tosses.
Source: W3C Recommendation, W3C Web Cryptography API – getRandomValues(). Updated: .
How it is calculated
Every flip is independent: heads and tails always have exactly 50%. The randomness comes from crypto.getRandomValues(), your browser's cryptographically secure random number generator. The result is fixed before the animation starts – when you click and how the coin spins change nothing.
How it works: a worked example with 10 coins
Set "Coins per flip" to 10 and the tool computes three numbers before every flip: expected heads = 10 ÷ 2 = 5 heads. Chance that all 10 coins land the same: 2 × (1/2)10 = 2/1024 ≈ 0.20%. Chance of exactly 5 heads and 5 tails: (10 choose 5) ÷ 210 = 252/1024 ≈ 24.61%. All three numbers sit right above the flip button and update the moment you change the count.
What the statistics show
After a few flips the share often strays far from 50% – 7 : 3 in ten flips is nothing unusual (chance of a deviation at least that large: about 34%). Only with many flips does the share settle near one half. That is the law of large numbers: the share becomes stable, while the absolute gap between heads and tails can still grow.
Streaks are normal
Many people find five heads in a row suspicious. In fact, in 100 flips a longest streak of 6 or 7 identical results is typical. Thinking "tails is due now" after a streak is the gambler's fallacy: the coin has no memory, the chance stays at 50%.
The values in the result box
- All the same: 2 × (1/2)n – 25% with 3 coins, only 0.2% with 10 coins.
- Exactly half: (n choose n/2) ÷ 2n – 24.61% with 10 coins, only 7.96% with 100 coins. An exact tie becomes less likely the more you flip.
Flip a coin 3 times or 10 times: the odds
The chance of exactly k heads in n flips is (n choose k) ÷ 2n. With 3 flips there are 23 = 8 equally likely sequences (HHH, HHT, HTH, …):
| Event | Math | Chance |
|---|---|---|
| 3 heads in a row | 1/8 | 12.5% |
| exactly 2 heads | 3/8 | 37.5% |
| at least 1 head | 1 − 1/8 = 7/8 | 87.5% |
| exactly 8 heads in 10 flips | 45/1024 | 4.39% |
| 10 heads in 10 flips | 1/1024 | 0.098% |
How likely is a streak?
The chance of at least one run of k identical results somewhere in n flips (exact, counted over all sequences):
| Run of at least | in 10 flips | in 20 flips | in 100 flips |
|---|---|---|---|
| 5 in a row | 21.7% | 45.8% | 97.2% |
| 6 in a row | 9.4% | 23.7% | 80.7% |
| 7 in a row | 3.9% | 11.5% | 54.2% |
| 8 in a row | 1.6% | 5.4% | 31.5% |
| 10 in a row | 0.2% | 1.2% | 8.7% |
So a streak of 5 heads or tails somewhere in 100 flips is almost certain, and a run of 7 is more likely than not. The number of outcomes doubles with every flip: 3 flips give 8 sequences, 4 flips 16, 10 flips 1,024. A study with 350,757 real flips found a tiny bias towards the starting side, about 50.8% (Bartoš et al., 2023); the online flip has no such bias.
Common mistakes
- Believing tails is “due” after five heads: the next flip is still 50%. Five heads in a row happen in about 97% of 100-flip series.
- Expecting exactly 5 heads in 10 flips: that happens only 24.61% of the time; 7 : 3 or worse happens in about 34% of ten-flip series.
- Adding the odds of separate flips: 3 flips are not 3 × 50% = 150%. At least one head is 1 − 1/8 = 87.5%.
- Choosing what the sides mean after the flip: decide first, for instance heads = yes, tails = no, then flip once and stick with it.
- Using a coin flip for more than two options: three options need a die or the wheel. Two flips give four outcomes, which only fit four equal options.
Flip a coin for yes or no
Decide before the flip what each side means, e.g. heads = yes, tails = no. A useful side effect: if you feel disappointed by the result, you usually know what you really wanted.
Famous coin flips
- Wright brothers, 1903: Wilbur won the coin toss for the first flight attempt; it failed, and three days later Orville flew.
- Portland, Oregon, 1845: the founders flipped a coin to decide whether the city would be named Boston or Portland.
- Euro 1968: the semi-final Italy vs. Soviet Union ended 0–0 after extra time – a coin toss sent Italy to the final.
Where the coin flip comes from and what it's used for
The idea is ancient: in Rome, people flipped coins in a practice called navia aut caput ("ship or head"), named after the images stamped on Roman coins. Today a coin flip decides kickoff and side selection in football (including the Super Bowl coin toss), splits teams for game night, or settles everyday disputes where both sides deserve equal odds.
A real coin can, in theory, also land on its edge, though it's extremely rare (rough estimate: about 1 in 6,000). This online flip only models the two faces, so it always gives a clear heads or tails.
More than two options? Use the dice roller or the wheel.
Custom labels, up to 1,000 flips, sound and link
Instead of heads and tails you can label both sides yourself – “Pizza” and “Pasta”, say, or two names. Your labels appear in the result, the statistics and the history; “Share” creates a link that carries them along, so the other person sees the same coin. The labels are not stored. You can flip 1 to 1,000 coins at once; the statistics add up all flips and show the current streak next to the longest one. Sound can be switched on and is off at first. Every single coin is drawn independently with the browser’s cryptographic random number generator – labels change nothing about the 50%.
For more than two outcomes try the random number generator; for a card instead of a coin use draw a card.
Frequently asked questions
Is a real coin really 50/50?
Almost. A study with more than 350,000 flips (Bartoš et al., 2023) found that a coin lands on the side it started on about 50.8% of the time. This online coin has no such bias: it is exactly 50/50.
Can I flip several coins at once?
Yes, choose 3, 5, 10 or 100 coins per flip. The statistics count every single coin.
How often do five identical results in a row happen?
The chance that five given flips all match is 2 × (1/2)5 = 6.25%. Somewhere within 100 flips, though, a streak of at least five appears with about 97% probability.
What are the odds of 3 heads in a row?
(1/2)3 = 1/8 = 12.5%. At least one head in three flips, on the other hand, comes up 7/8 = 87.5% of the time. Pick "3 coins" above to try it.
Can a coin flip be rigged?
With a real coin, yes: practised flippers can influence the outcome with a consistent toss (Diaconis, Holmes & Montgomery, 2007). In this online flip, only your browser's cryptographic randomness decides, before the animation starts.
How many outcomes are there when you flip a coin 3 or 4 times?
Every flip doubles the number: 3 flips give 2³ = 8 equally likely sequences and 4 flips give 2⁴ = 16. For 3 flips, 1 sequence has all heads, 3 have exactly 2 heads and 7 have at least 1 head.
What are the odds of exactly 5 heads in 10 flips?
The odds are 24.61% (252 of 1,024 sequences). Exactly 5 heads is the single most likely result, yet it still happens only about one time in four.
What are the odds when you flip two coins?
There are four equally likely outcomes: two heads 25%, one head and one tail 50%, two tails 25%. The 50% is double because heads-tails and tails-heads both count.
Sources and legal basis
- W3C Recommendation: W3C Web Cryptography API – getRandomValues()
- MDN Web Docs – Crypto.getRandomValues()
As of: · Editorial policy
Related tools
- Yes or No Wheel: Spin for Your AnswerSpin a free yes or no wheel: 50/50, add "maybe" or your own weighting. Secure randomness, shareable by link, no sign-up.
- Dice roller: roll d6, d20 and more onlineDice roller: roll d4 to d100 or type dice notation like 3d6+2 or 2d20kh1. Several sets at once, advantage, roll history, exact odds and a shareable link.
- Random number generatorRandom number generator: pick numbers between any two values, 1–100 or up to 1,000 at once, no repeats if you like. Powerball and EuroMillions presets.
- Spin the Wheel Online – Free Wheel GeneratorSpin the wheel with your own names, numbers or ideas. Set adjustable odds, remove winners, share by link. Truly random, free, no sign-up.
- Play Solitaire OnlineFree Klondike solitaire in your browser: draw 1 or 3, unlimited undo, hints and a winnable daily deal. Share your time – the link deals the same cards.
- Snooker Scoreboard and ScorerSnooker scoreboard online: tap each ball potted and it keeps the score, the break, points remaining and snookers required, with fouls, free ball and frames.
- Roll number pickerRoll number picker for teachers: enter the class strength, tap once and a random roll number appears. No repeats until everyone is done; absentees are skipped.
- Table tennis scoreboard onlineTable tennis scoreboard online and free: tap to score, games end at 11 with a two-point lead, the server changes every two points. Best of 3, 5 or 7 games.
- Classroom jobs generator: random job chart for your classClassroom jobs assigned fairly: enter students and jobs, draw the job chart at random and rotate it every week so everyone gets a turn. Full screen and print.