Coin Flip Probability: Calculate Heads and Tails
- Probability as a percentage
- %
- Result
- Probability of a different number of heads
- Result
- Number of flips
- 10 flips
- You entered
Calculate the probability of getting a specified number of heads in a set number of fair coin flips. Enter the number of flips and the number of heads you want; the calculator returns the probability as a decimal from 0 to 1, with the percentage and the chance of the complementary result also available.
Formula
For a fair coin flipped independently n times, the probability of getting exactly k heads is:
P(X = k) = C(n, k) / 2n
- n is the total number of flips, a count.
- k is the number of heads sought, a count from 0 through n.
- C(n, k), also written “n choose k,” counts the different arrangements that contain k heads among n flips.
- 2n is the total number of equally likely head-and-tail sequences when each flip has two outcomes.
The calculator accepts whole-number counts. Its first result is a probability, not a count: 0 means impossible under the stated model, and 1 means certain. Multiply by 100 to express it as a percentage. The third output is the probability of getting any number of heads other than k.
Worked Example
Using the defaults, calculate the probability of exactly 5 heads in 10 fair flips:
- Total equally likely sequences: 210 = 1,024.
- Ways to place 5 heads in 10 positions: C(10, 5) = 10! / (5! × 5!) = 252.
- Probability: 252 / 1,024 = 0.24609375, which rounds to 0.246094 at six decimal places.
- Percentage: 100 × 0.24609375 = 24.6094%, rounded to four decimal places.
- Probability of a different number of heads: 1 − 0.24609375 = 0.753906, rounded to six decimal places.
So the chance of exactly five heads in ten flips is about 24.61%. This does not mean five heads is guaranteed, or that every group of ten flips will be close to five.
Exactly, At Least, and At Most
“Exactly k heads” is one particular outcome count. Other common questions describe a range, which requires adding the probabilities for the included counts:
- At least k heads: add the probabilities for k, k + 1, …, n heads.
- At most k heads: add the probabilities for 0, 1, …, k heads.
- Between a and b heads, inclusive: add the probabilities for every count from a through b.
For instance, “at least 5 heads in 10 flips” includes 5, 6, 7, 8, 9, and 10 heads. It is not the same as “exactly 5.” For a fair coin, symmetry also means that exactly k heads has the same probability as exactly n − k heads. In 10 flips, exactly 4 heads and exactly 6 heads are equally likely.
Why the Combination Formula Works
A sequence of n flips has 2n possible ordered outcomes if each flip can be heads or tails and all outcomes are equally likely. With three flips, for example, the eight sequences are HHH, HHT, HTH, HTT, THH, THT, TTH, and TTT.
To get exactly k heads, choose which k of the n positions will be heads. The remaining positions must be tails, so the number of valid sequences is C(n, k). For three flips and two heads, the valid sequences are HHT, HTH, and THH: three outcomes out of eight, or 3/8. The order matters when listing sequences, even though the combination counts how many positions can be selected.
Independent Flips and Common Misconceptions
The calculation assumes a fair coin and independent flips. Fair means each flip has a 1/2 chance of heads and a 1/2 chance of tails; independent means earlier outcomes do not change the chance of the next one. Real physical flips can depart from this ideal model because of the way a coin is launched or caught, but the standard calculation treats each flip as fair and independent.
A common error is the gambler’s fallacy: believing that tails is “due” after several heads. If flips are independent, a streak does not alter the probability of the next flip. The probability of heads on the next toss remains 1/2 under the model. This differs from asking about a whole sequence in advance: the chance of ten heads in ten fair flips is 1/210, or 1/1,024.
Another distinction is between the probability of one particular sequence and the probability of a number of heads. The sequence HHTTT is one specified order and has probability 1/32. Exactly two heads in five flips includes ten different sequences, so its probability is 10/32 = 0.3125.
When the Fair-Coin Model Does Not Apply
If a coin’s chance of heads is p rather than 1/2, and flips remain independent with the same probability, use the binomial formula:
P(X = k) = C(n, k) × pk × (1 − p)n − k
Here, p is the probability of heads on each flip. The calculator above uses p = 1/2, so it should not be used as an exact answer for a known biased coin. If the chance of heads changes from flip to flip, or outcomes influence one another, the simple binomial model also does not apply directly.
Rounding can make displayed probabilities appear not to add to exactly 1. For a complete set of outcomes, the unrounded probabilities sum to 1; small discrepancies in rounded values are only display effects. For very large flip counts, exact factorial calculations can also exceed the limits of ordinary calculators, though the formula remains the same mathematically.
Frequently Asked Questions
What is the probability of heads on one fair coin flip?
It is 1/2, or 50%, assuming a fair coin and an ordinary two-outcome flip.
What is the probability of getting exactly 5 heads in 10 flips?
There are C(10, 5) = 252 qualifying sequences among 210 = 1,024 total sequences. The probability is 252/1,024, or about 24.61%.
How do I calculate the probability of at least one head?
It is often simplest to use the complement: subtract the chance of no heads from 1. In n fair flips, P(at least one head) = 1 − (1/2)n.
Does getting heads several times make tails more likely next?
No, not for independent flips. Each flip still has a 1/2 chance of tails under the fair-coin model, regardless of the previous results.
What is the chance of a specific sequence of flips?
For a specified sequence of n outcomes on a fair coin, the probability is (1/2)n. For example, the sequence HHTTT has probability 1/32.
Related
Formula used
in n | Number of flips | flips | 10 | 0 in k | Number of heads | heads | 5 | 0 out p | Probability of exactly this many heads | - | ncr(n,k) / 2^n | 6 out pct | Probability as a percentage | % | 100 * p | 4 out odds | Probability of a different number of heads | - | 1 - p | 6
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.