Coin flip probability, explained
Flipping a coin n times is the textbook example of a binomial experiment: a fixed number of independent trials, each with only two outcomes (heads or tails) and the same probability of heads on every flip. For a fair coin that probability is p = 0.5, but the same math handles a biased coin — set p to whatever the chance of heads actually is.
The probability of getting exactly k heads in n flips is given by the binomial probability mass function:
P(X = k) = C(n, k) · pk · (1 − p)n − k
Here C(n, k) = n! / [k! · (n − k)!] is the number of distinct flip sequences that contain k heads (the binomial coefficient, read "n choose k"), pk is the chance of those k heads landing, and (1 − p)n − k is the chance of the remaining flips landing tails. Multiplying the three together gives the total probability of that head count.
Why the "n choose k" term matters
Any single specific sequence of 10 fair-coin flips has probability 0.510 = 1/1024 ≈ 0.0977%. But there are C(10, 5) = 252 different sequences that produce exactly 5 heads, so the probability of "5 heads in some order" is 252/1024 ≈ 24.6%. The coefficient counts how many orderings give the same total, which is why middle counts are far more likely than all-heads or all-tails.
Cumulative probabilities: at least and at most
Often you don't want exactly k heads but a range. "At most k heads" sums the individual probabilities from 0 up to k, P(X ≤ k) = Σ P(X = i) for i = 0…k. "At least k heads" is the complement of getting fewer, P(X ≥ k) = 1 − P(X ≤ k − 1). This calculator reports all three: exactly, at least, and at most.
Expected value and spread
On average you expect n·p heads. For a fair coin over 100 flips that is 50 heads. The spread around that mean is the standard deviation, √(n · p · (1 − p)); for 100 fair flips it is √25 = 5 heads. So a typical run of 100 fair flips lands roughly in the 45–55 range, and results far outside that band are increasingly unlikely.
Common reference points for a fair coin
- Exactly 5 heads in 10 flips: 252/1024 ≈ 24.61% — the single most likely count, yet it happens under a quarter of the time.
- All heads in 10 flips: 0.510 = 1/1024 ≈ 0.098%.
- At least one head in 3 flips: 1 − 0.53 = 7/8 = 87.5%.
- Heads on every flip of a "hot streak" of 6: 0.56 = 1/64 ≈ 1.56%.