ThisCalculator

Statistics

Binomial Distribution Equation Calculator

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Binomial Distribution Equation Calculator

This calculator computes the binomial probability of exactly k successes in n independent trials, each with success probability p. You enter the number of trials, the number of successes you want, and the probability of success per trial; the calculator returns the exact probability and the cumulative probability of up to k successes.

Formula

The binomial probability formula gives the probability of exactly k successes in n independent trials:

P(X = k) = C(n, k) · pk · (1 − p)n − k

  • n = number of trials (a positive integer)
  • k = number of successes (integer from 0 to n)
  • p = probability of success on a single trial (between 0 and 1)
  • C(n, k) = binomial coefficient = n! / (k! · (n − k)!)

The cumulative probability P(X ≤ k) is the sum of the individual probabilities from 0 up to k.

Worked Example

Using the default values: n = 10, k = 3, p = 0.5.

  1. Calculate the binomial coefficient: C(10, 3) = 10! / (3! · 7!) = 120.
  2. Compute pk = 0.53 = 0.125.
  3. Compute (1 − p)(n−k) = 0.57 = 0.0078125.
  4. Multiply: 120 × 0.125 × 0.0078125 = 0.1171875.

The calculator shows P(X = 3) = 0.117188 (rounded to 6 decimals). The cumulative probability P(X ≤ 3) is the sum of P(X=0) through P(X=3), which equals 0.171875.

When to Use the Binomial Distribution

The binomial distribution applies when all of these conditions hold:

  • You have a fixed number of trials n.
  • Each trial has only two outcomes: success or failure.
  • The probability of success p is the same for every trial.
  • The trials are independent — the outcome of one trial does not affect another.

Common examples include coin flips (p = 0.5), free-throw shooting (p = player’s average), or quality control where each item is either defective or not. If you ask “what is the chance of getting exactly 3 heads in 10 flips?� this calculator gives the answer directly.

How to Read the Results

The first output, P(X = k), is the probability of exactly k successes. The second, P(X ≤ k), is the probability of k or fewer successes. For example, with n=10, k=3, p=0.5, the chance of exactly 3 heads is 11.72%, and the chance of 3 or fewer heads is 17.19%.

If you need the probability of at least k successes, use 1 − P(X ≤ k−1). For “more than k�, use 1 − P(X ≤ k).

Common Mistakes and Misconceptions

  • Swapping k and n−k: The formula is symmetric only when p = 0.5. For other p, P(X = k) ≠ P(X = n−k) generally.
  • Using p as a percentage: Enter 0.5 for 50%, not 50. The calculator treats p as a decimal fraction.
  • Forgetting independence: If trials are not independent (e.g., drawing without replacement from a small population), the hypergeometric distribution is more appropriate.
  • Rounding too early: Keep several decimal places in intermediate steps. The calculator uses full precision internally.

Limits of the Binomial Formula

The binomial distribution is exact for discrete trials, but it can be computationally heavy for very large n (thousands). In such cases, the normal approximation (with continuity correction) or the Poisson approximation (when n is large and p is small) is often used. Also, the binomial assumes a constant p; if p changes between trials, the distribution is not binomial.

Frequently Asked Questions

What is the difference between binomial and hypergeometric?

Binomial assumes independent trials with replacement (or effectively infinite population). Hypergeometric applies when sampling without replacement from a finite population, so the probability of success changes after each draw. Use hypergeometric when the population size is small relative to the sample.

Can I use this for cumulative “at least� probabilities?

Yes. For P(X ≥ k), compute 1 − P(X ≤ k−1). For P(X > k), use 1 − P(X ≤ k). The calculator gives P(X ≤ k), so you can subtract from 1.

What if p is expressed as a percentage?

Convert it to a decimal first. For 25%, enter 0.25. If you enter 25, the formula will produce nonsense because p must be between 0 and 1.

How many trials do I need for the normal approximation to be good?

A common rule of thumb is that both np and n(1−p) should be at least 5. For p near 0 or 1, you may need larger n. The binomial calculator is exact, so it’s always safe to use it directly when n is manageable.

Does the order of successes matter?

No. The binomial coefficient C(n, k) counts all possible arrangements of k successes among n trials. The formula gives the total probability of any arrangement with exactly k successes.

Why is my result so small for large n?

As n increases, the probability of any single exact k usually decreases because the total probability is spread over more possible outcomes. That’s normal; the cumulative probability is often more meaningful for large n.

Related

Formula used
in n | Number of trials (n) | - | 10 | 1
in k | Number of successes (k) | - | 3 | 0
in p | Success probability (p) | - | 0.5 | 0
out prob | P(X = k) | - | ncr(n,k) * p^k * (1-p)^(n-k) | 6
out cum | P(X ≤ k) | - | sum_{i=0}^{k} ncr(n,i) * p^i * (1-p)^(n-i) | 6

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.