Coin Flip Probability Calculator
The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.
This calculator works out the probability of getting a certain number of heads (or tails) in a given number of coin flips. You enter the number of flips, the desired number of successes, and whether you want an exact, at-least, or at-most probability, and it returns the answer as a percentage and a fraction. It uses the binomial distribution, the standard mathematical model for independent yes/no trials.
Formula
The probability of getting exactly k heads in n fair coin flips is given by the binomial probability formula:
P(X = k) = C(n, k) × pk × (1 − p)n−k
Where:
- n = number of flips (a positive integer)
- k = number of heads you want (0 ≤ k ≤ n)
- p = probability of heads on a single flip = 0.5 for a fair coin
- C(n, k) = n choose k = n! / (k! × (n − k)!)
For a fair coin, p = 0.5, so the formula simplifies to P(X = k) = C(n, k) × 0.5n. The at-least probability is the sum of exact probabilities from k to n; the at-most probability is the sum from 0 to k.
Worked Example
Using the default values: n = 10 flips, k = 5 heads, exact probability.
- Calculate C(10, 5) = 10! / (5! × 5!) = 252.
- Compute 0.510 = 1/1024 ≈ 0.0009765625.
- Multiply: 252 × 0.0009765625 = 0.24609375.
- Convert to percentage: 24.609375%.
The calculator shows 24.6094% (rounded to 4 decimal places). The at-least probability (5 or more heads) is 62.3047%, and the at-most probability (5 or fewer heads) is also 62.3047% because the distribution is symmetric around 5.
When to Use This Calculator
Use this tool whenever you need the exact probability of a specific number of successes in a fixed number of independent binary trials with a 50% chance per trial. Common situations include:
- Checking whether a result (e.g., 8 heads in 10 flips) is unusual or within normal variation.
- Solving textbook probability problems about coins.
- Understanding the likelihood of outcomes in games or experiments that use coin flips.
- Estimating the probability of a certain number of successes in any fair two-outcome process (e.g., guessing answers on a true/false test).
For example, if you flip a coin 10 times, getting exactly 5 heads has about a 24.6% chance—not the 50% many people intuitively expect. The probability of getting at least 5 heads is about 62.3%.
How to Read the Results
The main result is the exact probability of getting exactly k heads. The at-least and at-most results are cumulative probabilities—they sum the exact probabilities for all outcomes from k to n (or 0 to k). These are useful for questions like “What is the chance of getting 7 or more heads?� (at least 7) or “What is the chance of getting 2 or fewer heads?� (at most 2).
Remember that probability values range from 0% (impossible) to 100% (certain). A probability of 24.6% means that if you repeated the 10-flip experiment many times, you would get exactly 5 heads in about 24.6% of those repetitions. The percentages are rounded to 4 decimal places; the underlying fraction is exact.
Common Mistakes and Misconceptions
- Confusing “exactly� with “at least�: Many people ask “what’s the chance of 5 heads in 10 flips?� but actually mean “5 or more.� These give different answers (24.6% vs. 62.3%). Always clarify which one you need.
- Gambler’s fallacy: Past flips do not affect future flips. If you’ve flipped 9 heads in a row, the chance of the next flip being heads is still 50%, not higher or lower.
- Wrong n: The number of flips must be a positive integer. Entering 0 or a negative number will produce an error or a meaningless result.
- Rounding too early: In manual calculations, rounding intermediate steps can change the final answer. Keep full precision until the end.
Limits of the Formula
The binomial formula assumes each flip is independent and has exactly two outcomes (heads/tails) with a constant probability of 0.5. This holds for a fair coin in ideal conditions. Real coins can be slightly biased due to wear, uneven weight distribution, or the way they are tossed, but the bias is usually negligible for practical purposes. The formula also assumes the coin is not caught and flipped in a way that gives a predictable result—a skilled flipper can influence the outcome.
For very large n (e.g., thousands of flips), the binomial distribution can be approximated by a normal distribution, but the exact formula still works and is what this calculator uses. The calculator handles n up to a few hundred without issue; beyond that, the factorial calculations may become extremely large, but the result is still mathematically valid.
Frequently Asked Questions
What is the probability of getting at least one head in 3 flips?
At least one head means 1, 2, or 3 heads. The easiest way is to subtract the probability of zero heads from 1. The chance of zero heads (all tails) is (0.5)^3 = 0.125, so the probability of at least one head is 1 − 0.125 = 0.875, or 87.5%.
Why is getting exactly 5 heads in 10 flips not 50%?
Because 50% is the probability of a single flip being heads, not the probability of exactly half the flips being heads. There are many possible outcomes (0 through 10 heads), and the probabilities are spread across them. The most likely single outcome is 5 heads, but its probability is only about 24.6%.
How do I calculate the probability of getting 3 heads in 5 flips?
Use the formula: C(5,3) × 0.5^5 = 10 × 0.03125 = 0.3125, or 31.25%. You can enter n=5, k=3, and select “Exact� in the calculator to get the same result.
Does the calculator work for unfair coins?
No, this calculator assumes a fair coin with p = 0.5. For an unfair coin, you would need a different formula where p is not 0.5. The binomial formula still applies, but you would replace 0.5 with the actual probability of heads.
What is the probability of getting all heads in 10 flips?
That is exactly 10 heads. The probability is (0.5)^10 = 1/1024 ≈ 0.09765625%, or about 0.0977%. It’s very unlikely—less than 1 in 1000.
Why does the at-least and at-most probability sometimes add to more than 100%?
They shouldn’t if you use the same k. For a given k, the at-least probability (k or more) plus the at-most probability (k or fewer) equals 100% plus the exact probability of k, because k is counted in both. For example, with n=10, k=5, at-least is 62.3%, at-most is 62.3%, and their sum is 124.6%, not 100%. That’s because the exact probability of 5 heads (24.6%) is included twice.
Related
Formula used
in n | Number of flips | flips | 10 | 1 in k | Desired number of heads | heads | 5 | 0 sel q | Probability type | Exact = 0, At least = 1, At most = 2 out p | Probability | % | 100 * ncr(n, k) * 0.5^n | 4 out p_atleast | At-least probability | % | 100 * (1 - sum(i=0, k-1, ncr(n, i) * 0.5^n)) | 4 out p_atmost | At-most probability | % | 100 * sum(i=0, k, ncr(n, i) * 0.5^n) | 4
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.