Binomial Distribution Calculator

Find the probability of getting an exact number of successes in a fixed series of independent yes/no trials, together with the cumulative probabilities and the mean, variance, and standard deviation of the distribution.

Before You Calculate

  • Count the total number of trials n — the number of items inspected, customers contacted, or attempts made.
  • Express the success probability p as a decimal between 0 and 1, so a 5% defect rate becomes 0.05.
  • Confirm every trial is independent and shares the same p; sampling without replacement from a small batch technically calls for the hypergeometric distribution instead.

What the Tool Returns

Exact probability P(X = k): The chance of observing precisely k successes.

Four cumulative probabilities: P(X ≤ k), P(X < k), P(X ≥ k), and P(X > k), so you can answer at most, fewer than, at least, and more than questions without re-entering data.

Distribution summary: The mean np, the variance np(1 − p), and the standard deviation.

When to Use the Binomial Distribution

The binomial model applies whenever a random process satisfies four conditions, sometimes remembered by the acronym BINS:

  • Binary outcomes: Each trial ends in exactly one of two states — defective or acceptable, click or no click, cured or not cured.
  • Independence: The outcome of one trial does not change the probability of any other trial.
  • Number fixed in advance: You decide on n before collecting data, rather than sampling until a success appears.
  • Same probability: The success probability p stays constant from the first trial to the last.

If the number of trials is not fixed but the observation window is — for example, counting arrivals per hour — the Poisson distribution is usually the better model. If you sample without replacement from a small population, successive trials are no longer independent and the hypergeometric distribution applies.

The Binomial Probability Formula

The calculator evaluates the probability mass function and its cumulative sums:

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

C(n, k) = n! / (k! × (n − k)!)

μ = np

σ² = np(1 − p)

Where:

  • n = total number of trials
  • k = number of successes of interest
  • p = probability of success on a single trial
  • C(n, k) = number of ways to choose which k trials succeed
  • μ, σ² = mean and variance of the distribution

The cumulative probability P(X ≤ k) adds the mass function from 0 up to k. The remaining outputs follow from complements: P(X > k) = 1 − P(X ≤ k) and P(X ≥ k) = 1 − P(X ≤ k − 1).

Normal and Poisson Approximations

Before software made exact computation trivial, statisticians replaced the binomial with easier distributions, and the approximations still matter for intuition and for large-n shortcuts.

Normal approximation: When both np ≥ 10 and n(1 − p) ≥ 10, the binomial is closely matched by a normal distribution with mean np and standard deviation √(np(1 − p)). A continuity correction — treating P(X ≤ k) as the normal area below k + 0.5 — improves accuracy near the center.

Poisson approximation: When n is large and p is small (a common rule of thumb is n ≥ 100 with np ≤ 10), the binomial is well approximated by a Poisson distribution with rate λ = np. This is why rare-event counts such as manufacturing defects are often modeled directly with the Poisson.

Real Applications

The binomial distribution shows up wherever repeated yes/no trials are audited or planned.

  • Quality control: Estimate how likely an inspection lot is to pass when each unit has a known defect rate, and set acceptance sampling plans accordingly.
  • Marketing and A/B testing: Model the number of conversions among n visitors when each converts with probability p.
  • Medicine: Predict how many patients out of a trial cohort will respond to a treatment with a known response rate.
  • Education: Compute the chance of passing a multiple-choice exam by random guessing, which sets a floor for interpreting test scores.

Worked Example: Defects in a Quality Sample

A quality inspector samples 10 items from a production line where each item independently has a 5% chance of being defective (p = 0.05). What is the probability of finding exactly 1 defect?

  1. Count the arrangements: C(10, 1) = 10, because the single defect could be any of the ten items.
  2. Probability of that pattern: one defect contributes 0.05¹ = 0.05, and the nine good items contribute 0.95⁹ ≈ 0.630249.
  3. Multiply: P(X = 1) = 10 × 0.05 × 0.630249 ≈ 0.315125, or about a 31.5% chance.

The complementary results are just as useful. The chance of a clean sample is P(X = 0) = 0.95¹⁰ ≈ 0.598737, so the probability of finding at least one defect is P(X ≥ 1) = 1 − 0.598737 ≈ 0.401263. The cumulative probability of at most one defect is P(X ≤ 1) ≈ 0.913862, leaving P(X > 1) ≈ 0.086138 for two or more defects.

The distribution summary reads: mean np = 10 × 0.05 = 0.5 defects per sample, variance np(1 − p) = 0.475, and standard deviation √0.475 ≈ 0.6892. Entering n = 10, p = 0.05, k = 1 into the calculator reproduces every one of these numbers.

Frequently Asked Questions

What is the difference between the binomial and Poisson distributions?

The binomial counts successes in a fixed number of trials n, each with probability p, so the count can never exceed n. The Poisson counts events in a fixed interval of time or space with no upper limit, governed by a single rate parameter. When n is large and p is small, the two nearly coincide with lambda = np, which is why rare defects can be modeled either way.

When does the normal approximation to the binomial work?

A common rule requires np >= 10 and n(1 - p) >= 10, which keeps the distribution far enough from the 0 and n boundaries to look symmetric. Under those conditions a normal curve with mean np and standard deviation sqrt(np(1 - p)) gives good tail estimates, especially with a continuity correction of 0.5.

What is the difference between P(X = k) and P(X <= k)?

P(X = k) is the probability mass at a single count, computed from the binomial formula for exactly k successes. P(X <= k) is cumulative: it sums P(X = 0) through P(X = k). Use the exact form for questions like 'exactly one defect' and the cumulative form for 'no more than one defect'.

Can I use a sample proportion as the probability p?

Yes, and it is standard practice: estimate p from historical data, such as 37 defects in 1000 units giving p = 0.037. Keep in mind the result is then conditional on that estimate being accurate, so small historical samples make the computed probabilities less trustworthy.

What happens if the trials are not independent?

The binomial formula no longer holds. Positive dependence, such as defects clustering within a machine run, makes extreme counts more likely than the binomial predicts, while sampling without replacement from a small lot calls for the hypergeometric distribution. Check how the data was generated before trusting the model.