StatGardenREF. DESK
Calculators/Statistics/Binomial probability
Statistics

Binomial probability calculator

Chance of exactly k successes in n independent trials.

What this calculator does

The binomial distribution describes the number of successes in a fixed number of independent trials, each with the same probability of success. Coin flips, quality inspections, free throws and conversion events all fit this shape, provided the trials really are independent and the probability really is constant.

The probability of at least one success is often the most useful line, and the most counterintuitive. An event with a 5 per cent chance per trial is more likely than not to occur at least once within fourteen trials: which is why rare events feel common when there are many opportunities.

The formula

FormulaP(X=k) = C(n,k)·pᵏ·(1−p)ⁿ⁻ᵏ; mean = np, variance = np(1−p)

The formula has two parts. The combination term counts how many different orderings produce exactly k successes, and the probability term gives the chance of any one such ordering. Multiplying them gives the total probability for that number of successes.

TermMeaning
nThe number of independent trials.
kThe number of successes of interest.
pThe probability of success on each trial.
C(n,k)The number of ways to arrange k successes among n trials.
Expected successesn × p, the mean of the distribution.

The inputs explained

FieldWhat to enter
Number of trialsHow many trials. Each must be independent of the others.
Number of successesThe number of successes you are asking about. Cannot exceed n.
Probability of success each trial (%)The probability of success on a single trial, as a percentage. It must be the same for every trial.

When to use it

Quality inspection

If 3 per cent of items are defective, the chance of finding two or more defects in a sample of fifty follows directly from the cumulative lines.

Assessing a run of results

Seven heads in ten flips sounds unlikely. The exact probability is about 12 per cent: uncommon but far from remarkable, which is a useful corrective to pattern-seeking.

Planning for rare events

The at-least-one line answers how many attempts are needed before something probably happens. It rises much faster than intuition suggests.

Estimating conversions

With a known conversion rate and a fixed number of visitors, the distribution gives the likely range of conversions rather than just the average.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

Ten trials at a 30 per cent success rate

The full distribution across different numbers of successes.

n = 10, p = 30%
Successes (k)P(exactly k)P(k or fewer)P(more than k)
02.82%2.82%97.2%
112.1%14.9%85.1%
223.3%38.3%61.7%
326.7%65.0%35.0%
510.3%95.3%4.73%
80.145%100.0%0.014%
The expected number of successes is 3, and that is indeed where the individual probability peaks. Eight or more successes is vanishingly unlikely at this rate.

How the trial count changes the odds

A 5 per cent event across increasing numbers of trials.

p = 5%, asking about at least one
TrialsP(at least one)Expected successes
15.00%0.05 ± 0.22
522.6%0.25 ± 0.49
1451.2%0.70 ± 0.82
2064.2%1.00 ± 0.97
5092.3%2.50 ± 1.54
10099.4%5.00 ± 2.18
At fourteen trials the chance of at least one occurrence passes 50 per cent. By a hundred trials it is above 99 per cent: rare events become near-certain given enough opportunities.

Questions

When does the binomial distribution apply?

When there is a fixed number of trials, each independent, each with two outcomes and the same success probability throughout. If the probability changes between trials or the trials influence each other, it does not apply.

What is the difference between exactly k and at most k?

Exactly k is the probability of that precise count. At most k sums the probabilities of every outcome from zero up to k, which is what you usually want for questions phrased as "no more than".

Why is the probability of at least one so high?

Because it accumulates across every trial. It equals one minus the probability of no successes at all, and that no-success probability shrinks geometrically as trials increase.

How is this different from the normal distribution?

The binomial is discrete, counting whole numbers of successes. For large n it becomes well approximated by the normal distribution, which is why the two are so often taught together.

What if trials are not independent?

The binomial no longer applies. Sampling without replacement from a small population, for instance, needs the hypergeometric distribution instead: though for large populations the difference is negligible.

For continuous distributions, see normal distribution probability. For combining event probabilities, use the probability calculator.