Binomial Distribution Calculator

Calculate binomial probabilities for experiments with fixed trials and success probability.

Probability
—
Enter n, p, and k
P(X = k)
—
P(X ≤ k)
—
Mean (μ)
—
Std Dev (σ)
—
Variance
—
C(k)
—

Quick Examples

Binomial Distribution

The binomial distribution models the number of successes in n independent Bernoulli trials, each with probability p of success. It answers questions like: how likely is exactly one defect in a batch of 10, or at least 7 correct guesses on a 10-question true/false quiz?

Probability Mass Function

P(X = k) = C(n,k) × p^k × (1-p)^(n-k)

where C(n,k) = n! / (k!(n-k)!) is the binomial coefficient.

Exact vs Cumulative Probabilities

The PMF gives one exact count, but most questions ask about ranges. Cumulative probabilities add the masses of all included outcomes:

QuestionNotationHow to Compute
Exactly k successesP(X = k)PMF formula directly
At most k (k or fewer)P(X ≤ k)P(X=0) + … + P(X=k)
Fewer than kP(X < k)P(X ≤ k−1)
At least k (k or more)P(X ≥ k)1 − P(X ≤ k−1)
More than kP(X > k)1 − P(X ≤ k)
Between a and bP(a ≤ X ≤ b)P(X ≤ b) − P(X ≤ a−1)
Watch the endpoints: P(X ≥ k) = 1 − P(X ≤ k−1), not 1 − P(X ≤ k). Using 1 − F(k) actually gives P(X > k) — the most common off-by-one error in binomial problems.

Key Formulas

  • Mean: μ = np
  • Variance: σ² = np(1-p)
  • Standard Deviation: σ = √(np(1-p))

Conditions for Binomial

  • Fixed number of trials (n)
  • Independent trials
  • Two possible outcomes (success/failure)
  • Constant probability of success (p)

Students remember the four conditions with the mnemonic BINS: Binary outcomes, Independence, Number of trials fixed in advance, Same probability on every trial. If the observation window is fixed but the number of trials is not — for example, arrivals per hour — the Poisson distribution is usually the better model. Sampling without replacement from a small batch calls for the hypergeometric distribution instead.

Shape of the Distribution

  • Symmetry: the distribution is perfectly symmetric only when p = 0.5. Below 0.5 it skews right (a tail of rare successes); above 0.5 it skews left.
  • Spread: the variance np(1−p) is largest when p = 0.5 and shrinks toward zero as p approaches 0 or 1. Uncertainty is highest at a coin flip.
  • Most likely count: the mode sits at or near the mean np. For n = 10, p = 0.05, the mean is 0.5 and the mode is 0 — the single most likely outcome of a quality sample is zero defects, even though the expected value is half a defect.

Worked Example 1: Defects in a Quality Sample

An inspector samples n = 10 items from a line where each item is independently defective with probability p = 0.05. What is the probability of finding exactly 1 defect?

Step 1 — Count the arrangements: C(10, 1) = 10, because the single defect could be any of the ten items.

Step 2 — Probability of one such pattern: the defect contributes 0.05, the nine good items contribute 0.95⁹ ≈ 0.630249.

Step 3 — Multiply:

P(X = 1) = 10 × 0.05 × 0.630249 ≈ 0.315125

A clean sample has P(X = 0) = 0.95¹⁰ ≈ 0.598737, so a sample with at most one defect has probability 0.913862, and at least one defect has probability 1 − 0.598737 = 0.401263. The summary reads: mean np = 0.5, variance np(1−p) = 0.475, standard deviation ≈ 0.6892.

Worked Example 2: Coin Tosses

A fair coin is tossed n = 7 times. What is the probability of exactly k = 4 heads?

P(X = 4) = C(7,4) × 0.5⁴ × 0.5³ = 35 / 128 ≈ 0.273438

There are 35 sequences with exactly 4 heads out of 2⁷ = 128 equally likely outcomes. Note the distribution is symmetric here because p = 0.5 — for p below one half it skews right, for p above one half it skews left.

Normal and Poisson Approximations

Before software, statisticians replaced the binomial with simpler distributions. The approximations still build intuition:

  • Normal approximation: when np ≥ 10 and n(1−p) ≥ 10, the binomial is close to a normal distribution with mean np and standard deviation √(np(1−p)). A continuity correction — using the area below k + 0.5 for P(X ≤ k) — improves it.
  • Poisson approximation: when n is large and p is small (roughly n ≥ 100 and np ≤ 10), the binomial is close to a Poisson distribution with rate λ = np.

Exact computation costs nothing today, so use the calculator's exact values and treat approximations as sanity checks only.

Binomial in Spreadsheets and Code

SoftwareP(X = k)P(X ≤ k)
Excel / Google SheetsBINOM.DIST(k, n, p, FALSE)BINOM.DIST(k, n, p, TRUE)
Rdbinom(k, n, p)pbinom(k, n, p)
Python (SciPy)scipy.stats.binom.pmf(k, n, p)scipy.stats.binom.cdf(k, n, p)
TI-84binompdf(n, p, k)binomcdf(n, p, k)

For P(X ≥ k), use 1 minus the cumulative value at k − 1.

Real Applications

  • Quality control: the chance an inspection lot passes given a known defect rate, and acceptance sampling plans.
  • Marketing and A/B testing: conversions among n visitors when each converts with probability p.
  • Medicine: how many patients in a trial cohort respond to a treatment with a known response rate.
  • Education: the chance of passing a multiple-choice exam by pure guessing, which sets the floor for reading test scores.

Common Mistakes

  • Off-by-one on endpoints: "at least k" includes k — compute 1 − F(k−1), not 1 − F(k).
  • Entering p as a percent: p must be a decimal between 0 and 1. A 5% defect rate is p = 0.05, not p = 5.
  • Treating dependent trials as binomial: defects that cluster within a machine run, or draws without replacement from a small lot, violate independence — the binomial formula no longer holds.
  • Using an observed proportion as if it were known p: estimating p from a small historical sample makes every computed probability less trustworthy than the digits suggest.

Bernoulli Trials: The n = 1 Case

When n = 1, the binomial distribution is called a Bernoulli distribution — a single yes/no trial with success probability p. Every binomial experiment is just n independent Bernoulli trials added together.