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.
Probability Comparison for Common Coin Flip Scenarios
The table below uses a fair coin (p = 0.5) and the binomial formula \(P(X=k)=\binom{n}{k}p^k(1-p)^{n-k}\). Each row is the chance of getting exactly k heads in n flips. The last row shows a biased coin for comparison.
| n (flips) | k (heads) | Probability (%) | Odds (1 in X) |
|---|---|---|---|
| 2 | 2 | 25% | 1 in 4 |
| 3 | 3 | 12.5% | 1 in 8 |
| 5 | 5 | 3.125% | 1 in 32 |
| 10 | 10 | 0.0977% | 1 in 1,024 |
| 10 | 0 | 0.0977% | 1 in 1,024 |
| 10 | 5 | 24.61% | 1 in 4.06 |
| 100 | 50 | 7.96% | 1 in 12.6 |
| 10 (p = 0.6) | 6 | 25.08% | 1 in 3.99 |
Check of the 10-flip row: \(\binom{10}{5}=252\), so \(P = 252 \times 0.5^{10} = 252/1024 \approx 0.2461\). Check of the biased row: \(210 \times 0.6^6 \times 0.4^4 = 210 \times 0.046656 \times 0.0256 \approx 0.2508\).
Note that the most likely single outcome is not very likely: even in 100 flips, landing on exactly 50 heads happens less than 8% of the time.
Interpreting the Result: Exact vs. Streak vs. At-Least Probabilities
- Exactly k, not at least k. The calculator returns the probability of precisely k heads. To find "at least k" you must add the probabilities for k, k+1, …, n. For example, the chance of at least 1 head in 3 fair flips is \(1 - 0.5^3 = 0.875\), not 12.5%.
- Expected value and spread. The expected number of heads is \(\mu = np\) and the standard deviation is \(\sigma = \sqrt{np(1-p)}\). For 100 fair flips, \(\mu = 50\) and \(\sigma = \sqrt{100 \times 0.5 \times 0.5} = 5\), so results between about 45 and 55 heads are very ordinary.
- Flips are independent. A fair coin has no memory. After five heads in a row, the next flip is still 50% heads. Believing a tail is "due" is the gambler's fallacy.
- k = n means a specific run from the start. Setting k equal to n gives the probability that the first n flips are all heads, \(p^n\). This is different from the chance of seeing a streak of n heads somewhere in a longer sequence, which is higher because there are many possible starting positions.
- Rare events still happen. A 1-in-1,024 outcome, such as 10 heads in 10 flips, is unlikely for any single attempt, but across thousands of independent attempts it is expected to occur regularly.
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.