Skip to content

Coin Flip – Heads or Tails

Updated:

Flip a virtual coin and get an instant heads or tails result. Choose how many coins and flips to perform at once, then track your session tally, percentages and streaks.

Toss a Virtual Coin

Input Fields
How many coins are tossed in one press.
Each press performs this many consecutive flips; the results are listed below.
Custom text shown for the first side.
Custom text shown for the second side.
If enabled, the result will update automatically when you change any value.

Coin Flip Probability Formula

Formula
\[ P(\text{Heads}) = P(\text{Tails}) = \frac{1}{2} \] \[ P(\text{ }k \text{ identical flips in a row}) = \left(\frac{1}{2}\right)^{k} \] \[ E(\text{Heads in } n \text{ flips}) = n \times \frac{1}{2} = \frac{n}{2} \]

Where:

  • \(P\) — probability of an outcome (as a fraction, 1 in 2, or 50%)
  • \(k\) — length of a streak, i.e. how many identical results in a row
  • \(n\) — total number of flips in a session or batch
  • \(E\) — the expected (average) number of heads over many flips

A fair coin has two equally likely outcomes, so each individual flip lands heads with probability \(\tfrac{1}{2}\). Because flips are independent, a run of \(k\) identical results has probability \((\tfrac{1}{2})^{k}\), which shrinks quickly as \(k\) grows.

Coin Flip – Calculation Example

Example: you set the calculator to 1 coin per flip and 10 flips per press, then press Flip.

Each of the 10 results is heads with probability \(\tfrac{1}{2}\), so the expected number of heads in one press is:

\[ E(\text{Heads}) = 10 \times \frac{1}{2} = 5 \]

The chance that all 10 coins in the press land the same way, for example 10 heads in a row, is:

\[ P(10 \text{ Heads}) = \left(\frac{1}{2}\right)^{10} = \frac{1}{1024} \approx 0.0977\% \]

Result: over the long run you should expect about 5 heads and 5 tails per 10 flips, and an all-heads press occurs roughly once every 1,024 presses. Individual presses will vary widely around this average — that is normal randomness, not bias.

How to use the calculator

  1. Set Coins per flip (1–10) if you want to toss several coins at once instead of a single coin.
  2. Set Flips per press (1–1,000) to repeat the flip automatically and add all results to the tally in one go.
  3. Optionally edit the Heads label and Tails label to rename the two sides — useful for deciding between two custom options, such as “Pizza” vs. “Sushi”.
  4. Press the big Flip button (or hit Space or Enter on your keyboard) to toss. The last flip, the batch results and the running tally update immediately.
  5. Press Reset to clear all counts, streaks and the history. The tally also clears automatically if you reload the page.
  6. Watch the results area: Last flip shows the animated coin, Heads count, Tails count and the two share fields track your session, and Current streak and Longest streak record runs of identical results.

What a coin flip is and why it works

A coin flip is the classic tool for choosing between two options with equal chances. A fair coin has only two possible outcomes, heads or tails, and neither is more likely than the other, which is why flipping a coin is widely accepted as a fair way to break a tie, pick who goes first, or settle a friendly dispute.

This calculator generates each result with the browser's cryptographic random number generator, drawing one independent, unbiased random bit per coin. That makes every flip an exact 50/50 draw — unlike a physical coin, which can have a slight physical bias or be influenced by how it is tossed. The result is as close to a perfect fair coin as software can produce.

The running tally lets you see randomness in action. After a handful of flips the heads share can easily sit at 70% or 30%, but as the count grows into hundreds of flips it drifts steadily toward 50%. This is the law of large numbers: proportions converge on the true probability only over many trials, while short samples stay noisy.

The streak fields illustrate a common intuition trap. Many people expect a heads result to become “due” after several tails, but the coin has no memory — the probability of heads is \(\tfrac{1}{2}\) on every flip, no matter what came before. If you need to decide between more than two options, try the Yes or No Wheel or the Dice Roller instead.

Streaks, probabilities and what to expect

Streaks feel surprising but follow simple mathematics. A run of \(k\) identical flips has probability \((\tfrac{1}{2})^{k}\): 2 in a row is 25%, 4 in a row is 6.25%, and 10 in a row is about 0.098%. Individually rare, yes — but across a long session of hundreds of flips, some streaks of 6–8 are entirely expected somewhere in the sequence. The calculator shows the probability of your own longest streak so far, putting the number in context.

A rough rule of thumb: in \(n\) flips, the longest run of identical results is typically around \(\log_2 n\). In 100 flips expect a streak near 6 or 7; in 1,000 flips, near 9 or 10. Seeing a longer streak does not mean the “coin” is broken.

Limitations and practical tips

  • The session tally is kept in memory only — refreshing or leaving the page resets it. If you need a permanent record, write down the counts before leaving.
  • Each press can list at most 250 individual results on screen, but every flip is always included in the counts, shares and streaks.
  • With multiple coins per flip, the coin display shows the last coin of the batch; the full batch breakdown appears in the results list.
  • For statistically meaningful percentages, flip at least 100–200 times before judging the heads share — small samples naturally swing far from 50%.
  • If you enjoy probability experiments, the Poker Odds Calculator and the Lottery Odds Calculator show how coin-flip logic scales up to more complex random events.

Frequently Asked Questions

How do I calculate coin flip probability by hand?

For any single flip, the probability of one side is 1 favorable outcome out of 2 possible outcomes, so \(P = \frac{1}{2} = 0.5 = 50\%\). For a specific sequence of \(k\) flips, multiply the probabilities: for example, the chance of exactly HHT is \(\frac{1}{2} \times \frac{1}{2} \times \frac{1}{2} = \frac{1}{8}\). Note that any specific 3-flip order has the same 1-in-8 chance — HHT is no rarer than HHH before you flip.

Why does my heads percentage sit far from 50% after many flips?

This is normal randomness in small samples, not a biased coin. In 20 flips, a 60/40 split happens often; even a 100-flip session can reasonably end at 55/45. The proportion only converges toward 50% as the count reaches thousands of flips (the law of large numbers). If your share stays extreme after several thousand flips, that would be unusual — but a few hundred will still wobble.

Is it possible for a real coin to land on its edge?

Physically yes, but the odds are tiny. Studies of real coin tosses estimate the edge at well under 1 in 6,000 for typical coins on hard surfaces, and it depends heavily on the coin's thickness and the landing surface. This virtual coin has only two outcomes, heads or tails, so an edge result never occurs — which is one advantage of flipping online.

What is the gambler's fallacy, and does it apply here?

It is the mistaken belief that past flips change future odds — for example, that heads is "due" after five tails. A coin has no memory: after any streak, the next flip is still exactly \(\frac{1}{2}\) for each side. Believing otherwise is why some gamblers double their bets after losses. Streaks are just patterns humans notice in random sequences; the calculator's streak counters show them without implying anything about the next flip.

Is flipping a coin a good way to make a decision?

Yes, for pick-one-of-two situations where both options are genuinely acceptable — it is fast, fair, and unbiased. It is even useful as an intuition test: while the coin is in the air, notice which outcome you secretly hope for; that often reveals your true preference. But for decisions with unequal stakes or long-term consequences, a 50/50 toss discards information you actually have — weigh the options instead.

Does best-of-three beat a single flip for fairness?

Not in terms of fairness — both give each side exactly 50%. A best-of-three only adds drama and a guaranteed odd number of tosses. One subtle point: if you stop early when someone wins 2-0, that is fine because the third flip cannot change the outcome. But a person who is allowed to call the side each round can gain a tiny edge in some games, so fix the calls in advance.

Are real coins actually 50/50, or slightly biased?

Research suggests real coin tosses are close to fair, but a slight bias exists toward the side that starts facing up (found to be near 50.8% in a large 2023 study), and coins with uneven designs can lean one way too. Spinning a coin is worse — it can strongly favor the heavier side. This calculator avoids those issues by using a cryptographic random generator, so every flip is a mathematically exact 1-in-2 draw.

Leave a Reply

Your email address will not be published. Required fields are marked *