ThisCalculator

Statistics

Binomial Distribution Calculator Keys Explained

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 Calculator Keys Explained

This calculator works out the probability of getting exactly k successes in n independent trials, each with the same success probability p. You enter the number of trials, the number of successes you are interested in, and the per-trial success probability, and you get back the exact probability, the cumulative probability of up to k successes, and the expected number of successes. The binomial distribution is the go‑to model for yes/no outcomes, from coin flips to quality control, and this page shows you the formula, a worked example, and the common pitfalls to avoid.

Formula

The probability of exactly k successes in n independent trials is given by the binomial probability formula:

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

  • n – number of trials (a positive integer, e.g., 10 tosses).
  • k – number of successes you are asking about (0 ≤ k ≤ n).
  • p – probability of success on a single trial (0 ≤ p ≤ 1).
  • C(n, k) – the binomial coefficient, “n choose kâ€�, which counts how many ways you can get k successes in n trials. It equals n! / (k! × (n − k)!).

The cumulative probability P(X ≤ k) is the sum of the individual probabilities from 0 up to k. It answers questions like “what is the chance of 3 or fewer heads in 10 tosses?�

Worked Example

Using the default values from the calculator above: n = 10, k = 3, p = 0.5. We want P(X = 3) for a fair coin tossed 10 times.

  1. Compute 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 decimal places). The cumulative probability P(X ≤ 3) is the sum of P(X = 0) + P(X = 1) + P(X = 2) + P(X = 3) = 0.000977 + 0.009766 + 0.043945 + 0.117188 = 0.171875. The expected number of successes is n × p = 10 × 0.5 = 5.

When to Use the Binomial Distribution

The binomial distribution applies when all of these conditions hold:

  • There is a fixed number of trials (n).
  • Each trial has exactly 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 real‑world examples include:

  • Number of heads in 20 coin flips.
  • Number of defective items in a batch of 50, when each item has a 2% defect rate.
  • Number of patients who respond to a drug in a clinical trial of 100 patients, if the response rate is known.
  • Number of free throws made in 10 attempts by a player with a 70% success rate.

If any condition fails – for example, the probability changes from trial to trial, or trials are not independent – the binomial model is not appropriate. In those cases, look at the hypergeometric distribution (sampling without replacement) or the Poisson distribution (rare events over time).

How to Read the Results

The first output, P(X = k), is the probability of getting exactly k successes. The second, P(X ≤ k), is the probability of getting k or fewer successes. For example, with n = 10, p = 0.5, k = 3:

  • P(X = 3) = 0.117188 – about 11.7% chance of exactly 3 heads.
  • P(X ≤ 3) = 0.171875 – about 17.2% chance of 3 or fewer heads.
  • Expected successes = 5 – on average, you get 5 heads in 10 tosses.

If you need “at least k successes�, subtract the cumulative from 1: P(X ≥ k) = 1 − P(X ≤ k−1). For “more than k�, use 1 − P(X ≤ k).

Common Mistakes and Misconceptions

One frequent error is mixing up k and n. Remember n is the total number of trials, and k is the specific number of successes you are asking about. Another is forgetting that the formula gives the probability of exactly k, not “k or more�. For example, P(X = 3) is not the same as P(X ≥ 3).

Unit mix‑ups are rare here because probabilities are dimensionless, but be careful with percentages: enter 0.5 for 50%, not 50. If you enter 50, the formula will produce an astronomically small number because (1−p) becomes negative when p > 1, which is invalid. Also, rounding too early in intermediate steps can change the final answer noticeably. Keep at least 6 decimal places until the end.

A common misconception is that the binomial distribution is symmetric. It is symmetric only when p = 0.5. For p ≠ 0.5, the distribution is skewed – more trials make it more symmetric, but it never becomes perfectly symmetric unless p = 0.5.

Limits of the Binomial Formula

The binomial distribution assumes a fixed number of trials and a constant success probability. In real life, these assumptions may not hold exactly. For example, if you are sampling without replacement from a finite population, the success probability changes slightly after each draw. In that case, the hypergeometric distribution is more accurate. However, if the population is large relative to the sample (say, sample is less than 5% of the population), the binomial is a good approximation.

For large n (typically n > 30) and moderate p (not too close to 0 or 1), the binomial can be approximated by a normal distribution with mean np and variance np(1−p). This is useful for quick mental estimates, but the exact binomial is always more accurate.

If n is large and p is small (say, n > 50 and p < 0.1), the Poisson distribution with λ = np is a good approximation. But for exact results, use the binomial formula as this calculator does.

Frequently Asked Questions

What is the difference between binomial and Bernoulli distribution?

A Bernoulli distribution is a single trial with two outcomes (success or failure). The binomial distribution is the sum of n independent Bernoulli trials. In other words, a Bernoulli is a binomial with n = 1.

How do I calculate the probability of “at least one� success?

Use the complement rule: P(at least one) = 1 − P(zero successes). For n trials with success probability p, P(zero) = (1−p)n. So the answer is 1 − (1−p)n. For example, with n = 10 and p = 0.5, P(at least one) = 1 − 0.510 = 0.999023.

Can I use the binomial distribution for survey results?

Yes, if each respondent is independent and the probability of a particular answer is the same for all. For example, if 60% of voters support a candidate, the number of supporters in a random sample of 100 voters follows a binomial distribution with n = 100 and p = 0.6.

What if my probability is given as a percentage?

Convert the percentage to a decimal before entering it. For instance, 25% becomes 0.25. Entering 25 directly will give a nonsensical result because p must be between 0 and 1.

How do I find the probability of “more than k� successes?

Use the complement: P(X > k) = 1 − P(X ≤ k). For example, with n = 10, p = 0.5, k = 3, P(X > 3) = 1 − 0.171875 = 0.828125.

Why does my textbook use a different formula?

Some textbooks write the binomial coefficient as nCk or C(n,k), but it is the same thing. Others write the formula as (n choose k) p^k (1−p)^(n−k). The order of multiplication does not matter. If you see a different formula, check whether it is for the cumulative distribution or for the probability of “at least k� – those are different.

Related

Formula used
in n | Number of trials (n) | - | 10 | 0
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
out mean | Expected successes | - | n * p | 2

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.