Coin Flip Probability Calculator

Find the probability of getting exactly, at least, or at most a given number of heads in n coin flips using the binomial formula, plus the expected number of heads and the standard deviation.

Quick Facts

Method
Binomial distribution: P(k) = C(n,k) · p^k · (1−p)^(n−k)
A fair coin uses p = 0.5. Set p between 0 and 1 for a biased coin.

Your Results

Calculated
P(exactly k heads)
-
Probability of getting precisely k heads
P(at least k heads)
-
Probability of k or more heads
P(at most k heads)
-
Probability of k or fewer heads
Expected heads (n·p)
-
Mean ± standard deviation

Ready

Enter n, k, and p, then run the calculation.

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%.

Frequently Asked Questions

What is the probability of getting exactly 5 heads in 10 coin flips?
For a fair coin (p = 0.5), P(exactly 5) = C(10,5) × 0.55 × 0.55 = 252 / 1024 ≈ 0.2461, or about 24.6%. It is the most likely single outcome, but roughly three flips in four land on some other count, so "5 out of 10" is far from guaranteed.
Does a run of several heads make tails "due" on the next flip?
No. Each flip is independent, so a fair coin's next flip is always 50/50 regardless of what came before. The belief that past results change the next flip is the gambler's fallacy. Long runs look surprising only because we forget how many sequences are possible — the coin has no memory.
How do I handle a biased or weighted coin?
Set p to the true probability of heads on a single flip — for example 0.6 for a coin that lands heads 60% of the time. The binomial formula still applies; only p changes. The expected number of heads becomes n·p and the standard deviation becomes √(n·p·(1−p)), which is largest at p = 0.5 and shrinks as the coin becomes more predictable.