ThisCalculator

Statistics

Binomial Distribution Calculator with Steps

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 with Steps

This calculator computes the exact probability of getting a specific number of successes in a fixed number of independent trials, and shows the step-by-step work using the binomial formula. You enter the number of trials (n), the probability of success on each trial (p), and the number of successes (k) you want to check; it returns P(X = k), plus the cumulative probability P(X ≤ k) and the expected value. The full working is displayed so you can verify every factorial and exponent.

Formula

The binomial probability formula gives the chance of exactly k successes in n independent trials, each with success probability p:

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

  • n – number of trials (a positive integer)
  • k – number of successes you are asking about (integer from 0 to n)
  • p – probability of success on a single trial (between 0 and 1)
  • C(n, k) – binomial coefficient, “n choose kâ€�, equal to n! / (k! · (n − k)!)

The cumulative probability P(X ≤ k) is the sum of all individual probabilities from 0 up to k. The expected value (mean) is simply n·p, which tells you the average number of successes over many repetitions.

Worked Example

Using the defaults from the calculator: n = 10, p = 0.5, k = 3.

  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.

So P(X = 3) = 0.1171875, which rounds to 0.117188. The cumulative P(X ≤ 3) = P(0) + P(1) + P(2) + P(3) = 0.000977 + 0.009766 + 0.043945 + 0.117188 = 0.171875. The expected value is 10 · 0.5 = 5. These match the calculator’s output.

When to Use the Binomial Distribution

Use the binomial distribution when all four conditions hold:

  • There is a fixed number of trials (n).
  • Each trial has only two outcomes – success or failure.
  • The probability of success (p) is the same on every trial.
  • The trials are independent – one outcome does not affect another.

Common real-world examples include flipping a coin (p = 0.5), checking whether a product is defective (p = defect rate), or counting how many people in a random sample have a certain trait. If any condition fails – for example, sampling without replacement from a small population – the hypergeometric distribution is more appropriate.

How to Read the Results

The main output, P(X = k), is the probability of getting exactly k successes. This is often what you need for a single-event question like “what is the chance of exactly 3 heads in 10 flips?� The cumulative probability P(X ≤ k) answers “what is the chance of at most k successes?� which is used for hypothesis tests and quality control limits. The expected value n·p gives the long-run average – not the most likely single outcome, but the mean if you repeated the experiment many times.

Note that for a skewed distribution (p far from 0.5), the most likely outcome may be different from the mean. For example, with n = 10 and p = 0.9, the mean is 9, but the most likely single outcome is also 9 – they often coincide, but not always.

Common Mistakes and Misconceptions

  • Confusing “exactlyâ€� with “at mostâ€� or “at leastâ€�. P(X = k) is not the same as P(X ≤ k). For “at least kâ€�, you need 1 − P(X ≤ k−1).
  • Using p as a percentage. Enter p as a decimal (0.3), not 30. The calculator expects a number between 0 and 1.
  • Ignoring independence. If trials are not independent, the binomial formula gives wrong results. For example, drawing marbles without replacement requires the hypergeometric distribution.
  • Rounding too early. Carry full precision through intermediate steps; round only the final answer. The calculator does this automatically.
  • Assuming n·p is always an integer. The mean can be a decimal (e.g., n=10, p=0.3 gives mean 3.0, but n=10, p=0.33 gives 3.3). That is fine – it is an average, not a possible count.

Limitations of the Binomial Model

The binomial distribution assumes a fixed n. If you are counting successes until a certain number occurs (e.g., “how many trials until 3 successes?�), you need the negative binomial distribution. If n is very large and p is very small (n > 50 and np < 5), the Poisson distribution is a good approximation. If n is large and p is not too close to 0 or 1 (np and n(1−p) both > 5), the normal distribution with mean np and variance np(1−p) can approximate binomial probabilities – this is the basis of many statistical tests.

Also, the binomial coefficient C(n, k) grows quickly; for n above about 170, factorials exceed the range of many calculators. In such cases, use the normal or Poisson approximation, or a calculator that handles large numbers.

Comparison with Other Distributions

  • Hypergeometric: Use when sampling without replacement from a finite population – trials are not independent.
  • Poisson: Use for counting rare events over a continuous interval (time, area) when the average rate is known.
  • Negative binomial: Use when you want the number of trials needed to achieve a fixed number of successes.
  • Normal: Use as an approximation for binomial when n is large and p is moderate.

Each distribution answers a different question. The binomial is the go-to for “exactly k out of n� with replacement or independent trials.

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 – it gives the probability of k successes in those n trials. So Bernoulli is a special case of binomial with n = 1.

How do I calculate “at least 3� successes?

“At least 3� means 3, 4, 5, … up to n. You can compute this as 1 − P(X ≤ 2), i.e., one minus the cumulative probability of 0, 1, and 2 successes. Many calculators have a “tail� option, but you can always subtract the cumulative from 1.

Can p be greater than 1 or negative?

No. The probability of success must be between 0 and 1 inclusive. If you enter a value outside that range, the formula will produce meaningless results (negative probabilities or values over 1). The calculator clamps p to [0,1] or warns you – but you should always check your input.

What if n is very large, like 1000?

For n = 1000, the factorial terms become astronomically large, and many calculators overflow. Use the normal approximation if np and n(1−p) are both greater than 5. For example, with n=1000 and p=0.5, the distribution is approximately normal with mean 500 and standard deviation sqrt(1000·0.5·0.5) ≈ 15.81. This gives accurate probabilities for most purposes.

Why is my probability not adding up to 1?

The sum of all probabilities P(X = 0) through P(X = n) always equals 1. If you are adding a subset (like only k=3), the sum will be less than 1. The cumulative P(X ≤ k) correctly sums from 0 to k. If you get a total different from 1 when summing all, you likely missed a value or rounded each probability too early.

Is the binomial distribution symmetric?

It is symmetric only when p = 0.5. For p < 0.5, the distribution is skewed right (more mass on low k); for p > 0.5, it is skewed left. The skewness decreases as n increases, which is why the normal approximation works well for large n even with p not equal to 0.5.

Related

Formula used
in n | Number of trials (n) | - | 10 | 1
in p | Probability of success (p) | - | 0.5 | 0
in k | Number of successes (k) | - | 3 | 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 value (np) | - | 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.