gizmobench
BrowseDaily

Coin Flip Probability Calculator

Count heads as success. This page opens on 10 independent flips of a fair coin and exactly 5 heads. Change Trials and Count, or choose a tail or range. For a biased coin, enter its known probability of heads in Probability.

P(X = 5)0.2461n = 10 · p = 0.5 · mean 5 · standard deviation 1.5811
Successes

The probability of exactly k successes in n trials, which is the one term C(n, k) times p to the k times (1 - p) to the rest.

P(X = 5)
0.246094
P(X <= 5)
0.623047
Mean
5
Variance
2.5
P(X < 5)
0.376953
P(X > 5)
0.376953
P(X >= 5)
0.623047
Standard deviation
1.5811
Z score of Count
0

Probabilities are shown to six decimal places and agree with exact rational arithmetic to within 1e-9. Anything below 0.00001 keeps its digits as an exponent rather than rounding away to zero, and a probability that is certain by definition is written as a plain 1 or 0. P(X = 5) = C(10, 5) * 0.5^5 * 0.5^5

0246810

Each bar is the probability of exactly that count. The shaded bar is the one count P(X = 5) covers. The most likely count is 5, at 0.246094.

Calculation steps
  1. Let X count successes in 10 independent trials, each with p = 0.5.
  2. P(X = 5): Include only count 5.
  3. For each included count j, use C(10, j) * 0.5^j * 0.5^(10 - j). C(n, j) = n! / (j! * (n - j)!).
  4. P(X = 5) = C(10, 5) * 0.5^5 * 0.5^5. Result: P(X = 5) = 0.246094.
  5. Mean = n * p = 5; variance = n * p * (1 - p) = 2.5; standard deviation = sqrt(variance) = 1.5811.
Probability table

All 11 possible counts are listed.

n = 10, p = 0.5. Yes marks counts included in P(X = 5).
Count jP(X = j)P(X <= j)P(X >= j)In event
00.0009770.0009771No
10.0097660.0107420.999023No
20.0439450.0546880.989258No
30.1171880.1718750.945312No
40.2050780.3769530.828125No
50.2460940.6230470.623047Yes
60.2050780.8281250.376953No
70.1171880.9453120.171875No
80.0439450.9892580.054688No
90.0097660.9990230.010742No
100.00097710.000977No

Read 1/2 as p = 0.5.

Worked examples

The cases a binomial question usually starts from. Every figure here is computed by the same code as the answer above, so the examples and the tool can never disagree.

  • n = 4, p = 0.5, X = 2exact probability
    0.375000
  • n = 20, p = 0.3, X = 6exact probability
    0.191639
  • n = 20, p = 0.3, X >= 7right tail
    0.391990
Accuracy. Probabilities use jstat 1.9.6 log-gamma factorials to avoid factorial overflow, with representable small tails summed directly; smaller values can underflow floating-point storage. The model assumes a fixed number of independent trials with one shared probability, and p = 0 and p = 1 are returned exactly. It describes a distribution and predicts nothing about whatever you are counting.

Common questions

What is the chance of exactly 5 heads in 10 fair flips?
The binomial probability is C(10, 5) * (1/2)^5 * (1/2)^5 = 252/1024, displayed as 0.246094. Each flip is treated as independent with the same 1/2 chance of heads. Calculation steps shows the event bounds and formula for the numbers entered.
How do I calculate at least 8 heads or a range of heads?
Set Count to 8 and choose At least for P(X >= 8), displayed as 0.054688 at 10 fair flips. Between includes both its From and To counts. More than excludes the entered count, while At most includes it. Each selected count is shaded in the graph and marked Yes in the probability table.
Can I count tails or use a biased coin?
To count tails, treat a tail as success. A fair coin still uses p = 1/2. If the probability of heads is 0.7, the probability of tails is 0.3. The supplied probability must be constant across independent flips; this page does not measure coin bias or predict the outcome of the next flip.
Which counts appear in the table?
The probability table includes every count from 0 through n for up to 200 flips. Above that it shows 41 counts around Count, or around the middle of a Between range. Move Count to inspect another window. PMF, full cumulative probability and the inclusive right tail appear as numeric columns in a scrollable region.
Does this preset overwrite the main calculator?
The fair-coin preset sets the displayed inputs without saving them. A control you change saves just that changed field and retains the other remembered main-page inputs. Loading another preset applies its own values, and a browser with storage disabled can still perform the calculation.

Probabilities use jstat 1.9.6 log-gamma factorials to avoid factorial overflow, with representable small tails summed directly; smaller values can underflow floating-point storage. The model assumes a fixed number of independent trials with one shared probability, and p = 0 and p = 1 are returned exactly. It describes a distribution and predicts nothing about whatever you are counting.