🏆 US-Registered Digital Marketing Agency
Advertisement
Advertisement
PROBABILITY

Coin Flip Probability Calculator — heads in n flips

Work out the chance of exactly, at least, at most or between a given number of heads across any run of coin flips, fair or biased.

Whole flips, up to 2000.
The count you are asking about.
Used only by the "between" option.
"At least" and "at most" both include k itself.
Leave at 50 for a fair coin. Change it to model a bias.
Probability
0%
 
0%
Exactly k heads
0%
At least k heads
0%
At most k heads
0
Expected heads (n × p)
Tip: "exactly half heads" gets less likely as n grows, even though the proportion tightens around 50%. At 10 flips the chance of exactly 5 is 24.6%; at 100 flips the chance of exactly 50 is under 8%.
Advertisement

The coin flip probability calculator above answers the four questions people actually ask about a run of flips: what is the chance of getting exactly this many heads, at least this many, at most this many, or a count somewhere inside a range. It handles a fair coin by default and a biased one as soon as you move the heads-probability field off 50%, and it reports the answer as a percentage, as one-in-N odds, and — when the coin is fair — as an exact fraction over 2 to the power n.

Arb Digital publishes free calculators for the reasoning that goes wrong quietly. Coin flips are the textbook case, because almost everyone can compute the chance of a single head and almost nobody instinctively gets the chance of seven heads in ten flips right. The gap between a point probability and a cumulative one is where most of the errors live, and this page shows both at once so the difference is impossible to miss.

What This Coin Flip Calculator Does

Every flip is an independent trial with two outcomes and a fixed probability, so a run of n flips follows a binomial distribution. The calculator evaluates that distribution: the probability mass function for a single count, and the cumulative sums for the "at least", "at most" and "between" questions. It works with n up to 2,000 by computing with logarithms internally, so the huge factorials involved never overflow and the answer stays accurate where a naive implementation would return infinity divided by infinity.

Our binomial distribution calculator is the same mathematics in general-purpose clothing, framed as trials and successes and set up for tasks like defect counts and conversion tests. This page is the coin-specific interface: heads and tails wording, fair-coin fractions, and prose about streaks and the gambler's fallacy rather than about quality control. If your problem is not literally about a two-outcome repeated trial, the general-purpose page is the better starting point. For the probability of single or combined events with no repetition involved, use the probability calculator instead.

How to Use It

  1. Enter the number of flips. This is the length of the whole run, not the number of heads you want. Ten flips means ten, whether they happen at once or one at a time.
  2. Enter the head count you care about. If you are checking a claim like "I got seven heads out of ten", seven is your k.
  3. Pick the question. This matters more than anything else on the page. "Exactly 7" and "at least 7" are different questions with different answers, and picking the wrong one is the single most common mistake with this calculation.
  4. Adjust the bias if the coin is not fair. Anything other than 50 models a weighted coin, or any other repeated yes-or-no event with a fixed chance.
  5. Read the grid as well as the headline. All three probability types are shown together, so you can see the shape of the answer instead of one isolated number.

The Formula and How It's Calculated

The chance of exactly k heads in n flips of a coin that lands heads with probability p is the binomial probability mass function: P(X = k) = C(n, k) × pk × (1 − p)n−k. The binomial coefficient C(n, k) counts how many distinct orderings produce k heads, and the two powers give the probability of any one of those orderings.

Take the defaults. With n = 10, k = 7 and p = 0.5, C(10, 7) = 120, and every specific sequence of ten flips has probability 0.510 = 1/1024. So P(exactly 7) = 120/1024 = 11.72%. The "at least 7" answer sums the cases for 7, 8, 9 and 10: 120 + 45 + 10 + 1 = 176 orderings out of 1024, giving 17.1875%. The "at most 7" answer is one minus the 8, 9 and 10 cases: 1 − 56/1024 = 94.5313%. All three of those figures appear in the grid above, which makes this example easy to check by hand.

For a fair coin every sequence is equally likely, so the whole calculation collapses to counting sequences over 2n. That is why the tool prints the exact fraction when p is 50%. For a biased coin the orderings are no longer equally likely and the powers of p do real work. The NIST/SEMATECH e-Handbook page on the binomial distribution gives the same mass function along with its mean, np, and its standard deviation, the square root of np(1 − p).

Advertisement

Why "Exactly" and "At Least" Give Such Different Answers

A point probability asks about one specific count. A cumulative probability asks about a whole tail of counts. They are answers to different questions, and confusing them is how a correct calculation ends up supporting a wrong conclusion.

The practical rule is that "exactly" is almost always the wrong question when you are testing whether something looks unusual. If a colleague flips a coin ten times and gets seven heads, the interesting question is not "how likely was exactly seven" — every individual outcome is fairly unlikely — but "how likely was a result this extreme or more". That is the cumulative tail, 17.19% here, and it is the same logic that produces a p-value. If it helps to see the connection, our p-value calculator formalises exactly that reasoning for continuous test statistics.

There is a further subtlety with a two-sided question. Seven heads out of ten is extreme in the heads direction, but three heads out of ten is equally extreme in the tails direction. If your claim is "this coin is not fair" rather than "this coin favours heads", you need both tails, which for a fair coin doubles the figure to 34.38%. A result that looked mildly surprising becomes entirely ordinary.

Streaks Are Not Evidence of a Broken Coin

The gambler's fallacy is the belief that a run of heads makes tails "due". It does not. The coin has no memory, so the next flip is 50/50 regardless of what came before. What actually happens over a long run is not correction but dilution: the absolute gap between heads and tails tends to grow, while the ratio drifts toward 50% simply because the denominator grows faster.

The second half of that is worth stating plainly, because it is the part people find hardest. Over 1,000 fair flips you should expect the heads count to sit around 500 give or take about 16, so a gap of 30 either way is ordinary. Over a million flips the expected gap grows to around 500. The ratio converges on one half; the raw difference does not converge on anything.

Long streaks are also far more common than intuition allows. In 100 fair flips, a run of five or more identical results in a row occurs more often than not, and a run of seven is unremarkable. This is why sequences that "look random" to people — alternating too often, avoiding long runs — are usually recognisable as fabricated. If you want to see the effect directly, set n to 5, k to 5 and the mode to "exactly": the answer is 3.125%, or one in 32. Across 100 flips there are 96 overlapping windows of five, so seeing at least one such run is close to certain rather than remarkable.

How Much Bias Can You Actually Detect?

Suppose you suspect a coin is weighted to land heads 55% of the time. How many flips would you need to notice? Set p to 55 and try it. With n = 100, the expected number of heads is 55 and the standard deviation is about 5, so a fair coin producing 55 or more heads has a probability around 18% — nowhere near enough to distinguish the two. Push n to 1,000 and the picture changes: the expected count is 550, the standard deviation is about 15.8, and a fair coin reaching 550 heads has a probability near 0.1%.

That is the general shape of detection power. Because the standard deviation grows with the square root of n while the signal grows with n, quadrupling the sample size only doubles your resolution. Detecting a 1% bias reliably takes tens of thousands of flips. Our sample size calculator turns that relationship into a required n for a chosen effect size, and the A/B test calculator applies the identical arithmetic to conversion rates, which are just biased coins with commercial consequences.

It is worth knowing that real coins are not quite fair either. Wolfram MathWorld's entry on coin tossing reports empirical work finding a same-side bias of roughly 50.8% — a tossed coin is slightly more likely to land showing the face that was up when it was flipped. That is a bias of the physical toss, not of the coin's weighting, and it is small enough that it takes many thousands of tosses to see.

Running tests on real traffic instead of coins?

Arb Digital designs and reads conversion experiments with the same discipline — sample size first, tail probability second, and no conclusions from a run of five.

Browse All Free Tools Talk To Our Team

Common Mistakes to Avoid

  • Answering "exactly k" when you meant "at least k" — the cumulative version is almost always the one that matters when you are judging whether a result is surprising.
  • Forgetting the second tail — testing whether a coin is unfair in either direction needs both extremes, which roughly doubles the probability for a fair coin.
  • Assuming a streak changes the next flip — independence means the eleventh flip is 50/50 no matter what the first ten did.
  • Reading a small sample as proof of bias — seven heads in ten happens about one time in six with a perfectly fair coin.
  • Entering the head count in the flips field — n is the length of the run and k is the count within it, and swapping them silently produces a plausible but wrong answer.

Related Free Tools From Arb Digital

Model the same trials in general terms with the binomial distribution calculator, work out single and combined event chances with the probability calculator, simulate multi-sided outcomes with the dice roller, weigh outcomes by payoff with the expected value calculator, or count arrangements with the permutation calculator. The full free online tools hub lists every probability tool we publish.

Frequently Asked Questions

What is the probability of getting 7 heads in 10 coin flips?

Exactly 7 heads has a probability of 11.72 percent, or 120 out of 1024 possible sequences. At least 7 heads is 17.19 percent, because it also counts the outcomes with 8, 9 or 10 heads.

Why is getting exactly half heads not the most likely by a wide margin?

It is the single most likely count, but it competes with an increasing number of nearby counts as the run gets longer. In 100 flips the chance of exactly 50 heads is under 8 percent, even though counts near 50 are collectively very likely.

Does a run of heads make tails more likely next?

No. Each flip is independent, so the next flip stays at its base probability regardless of the history. The belief that the coin evens itself out is the gambler's fallacy.

How do I calculate the chance of at least one head?

Take one minus the probability of no heads at all. For a fair coin over n flips that is one minus 0.5 to the power n, which reaches 96.9 percent by five flips.

Can this calculator handle a biased coin?

Yes. Change the heads probability away from 50 percent and the calculator applies the general binomial formula, which weights each ordering by the bias rather than treating all sequences as equally likely.

How many flips does it take to prove a coin is unfair?

It depends on how large the bias is. A 5 percent bias needs roughly a thousand flips before the result separates clearly from a fair coin, and smaller biases need far more, because precision only improves with the square root of the number of flips.

What is the difference between this and a binomial calculator?

None mathematically. This page is the coin-specific version, with heads and tails wording and exact fractions over two to the power n, while the binomial page frames the same distribution as general trials and successes.

Advertisement
Advertisement

Take it further