What is the Coin Flip Calculator?
This calculator finds the probability of getting exactly k heads in n coin flips. Each flip is an independent event, and the chance of heads on any single flip is p (0.5 for a fair coin). By adjusting p you can also model a biased or weighted coin. The same math answers questions about streaks — for example, the chance of flipping 5 heads in a row is just the case where n = 5 and k = 5.
How to use it
Enter the total number of flips (n), the number of heads you want (k), and the probability of heads on a single flip (p, use 0.5 for a fair coin). The calculator returns the probability as a percentage and a decimal, the number of combinations C(n,k), the expected number of heads, and the odds against that exact outcome.
The formula explained
The outcome follows a binomial distribution: $$P(X = k) = \binom{n}{k} \, p^{k} \left(1 - p\right)^{n - k}$$ The term \(\binom{n}{k}\) counts how many arrangements give exactly k heads, \(p^{k}\) is the probability those specific flips are heads, and \(\left(1-p\right)^{n-k}\) is the probability the rest are tails. For a fair coin (\(p = 0.5\)) this simplifies to \(\binom{n}{k} \cdot 0.5^{n}\).
Worked example
What is the chance of exactly 5 heads in 10 fair flips? \(\binom{10}{5} = 252\), and \(0.5^{10} = 1/1024 \approx 0.0009766\). So $$P = 252 \times 0.0009766 \approx 0.2461$$ or about 24.61% — the single most likely individual outcome, yet still less than one chance in four.
FAQ
What are the odds of flipping heads twice in a row? Set n = 2, k = 2, p = 0.5: \(P = 0.25\), so 25% or 1 in 4.
Can I model a weighted coin? Yes — change p to the actual probability of heads, e.g. 0.6 for a coin biased toward heads.
Why isn't 5 heads in 10 flips a 50% chance? 50% is the expected average, but "exactly 5" is only one of many possible counts (0 through 10). It is the most likely single value but still happens only about a quarter of the time.