What this calculator does
The Coin Flip Probability Calculator tells you how likely you are to get a specific number of heads when you toss a coin a set number of times. It uses the binomial probability distribution, which models any sequence of independent yes/no trials. Although the classic case is a fair coin (\(p = 0.5\)), this tool also handles biased coins by letting you set any probability of heads between 0 and 1.
How to use it
Enter three values: the number of flips n, the number of heads you want k, and the probability of heads on a single flip p. The calculator returns the exact probability of getting exactly k heads, the number of winning combinations \(C(n,k)\), the cumulative chances of getting at most k and at least k heads, and the expected number of heads (\(n \cdot p\)).
The formula explained
The binomial formula is $$P(X = k) = \binom{n}{k} \, p^{\,k} \left(1 - p\right)^{n - k}.$$ The term \(C(n,k)\) counts how many distinct orderings produce exactly k heads. The factor \(p^k\) is the chance of those k heads occurring, and \((1-p)^{n-k}\) is the chance of the remaining flips all being tails. Multiplying them gives the probability of one specific count.
Worked example
For 10 fair flips with \(k = 5\) and \(p = 0.5\): \(C(10,5) = 252\), \(p^5 = 0.03125\), and \((1-p)^5 = 0.03125\). So $$P = 252 \times 0.03125 \times 0.03125 \approx 0.2461,$$ or about 24.61%. Even though 5 heads is the most likely outcome, it still happens less than a quarter of the time.
FAQ
What is a fair coin? A fair coin has \(p = 0.5\), meaning heads and tails are equally likely on each flip.
Can I model a biased coin? Yes — just set p to the actual chance of heads, for example 0.6 for a coin that lands heads 60% of the time.
What does "at least k heads" mean? It is the cumulative probability of getting k or more heads, found by summing the exact probabilities for k, k+1, …, n.