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: .

Tap the coin or press Space.

    1 to 1,000

    Result

    Expected heads per flip
    0.5

    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

    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, …):

    EventMathChance
    3 heads in a row1/812.5%
    exactly 2 heads3/837.5%
    at least 1 head1 − 1/8 = 7/887.5%
    exactly 8 heads in 10 flips45/10244.39%
    10 heads in 10 flips1/10240.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 leastin 10 flipsin 20 flipsin 100 flips
    5 in a row21.7%45.8%97.2%
    6 in a row9.4%23.7%80.7%
    7 in a row3.9%11.5%54.2%
    8 in a row1.6%5.4%31.5%
    10 in a row0.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

    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

    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

    As of: · Editorial policy

    Embed on your website

    Free, no sign-up: copy the code and paste it into your page (e.g. an HTML block). Feel free to adjust the size and the link.

    Open previewColours, dark mode and more widgets

    Related tools