Calcamaze

Binomial Distribution Calculator

Find the probability of exactly, at most or at least k successes in n trials, with the mean, standard deviation and a chart.

A decimal between 0 and 1 — for 30%, enter 0.3.

Result

P(X = 5)
0.246094
The probability of exactly 5 successes in 10 trials.
P(X ≤ 5)
0.623047
At most
P(X < 5)
0.376953
Fewer than
P(X ≥ 5)
0.623047
At least
P(X > 5)
0.376953
More than
Mean (np)
5
Standard deviation √(np(1 − p))
1.5811
Variance np(1 − p) = 2.5
Probability of each number of successesP(X = k)
Year 0: P(X = k) $0.000Year 1: P(X = k) $0.01Year 2: P(X = k) $0.042Year 3: P(X = k) $0.12Year 4: P(X = k) $0.214Year 5: P(X = k) $0.25Year 6: P(X = k) $0.216Year 7: P(X = k) $0.12Year 8: P(X = k) $0.048Year 9: P(X = k) $0.01Year 10: P(X = k) $0.0010
Binomial probabilities
kP(X = k)P(X ≤ k)
00.0009770.000977
10.0097660.010742
20.0439450.054687
30.1171870.171875
40.2050780.376953
50.2460940.623047
60.2050780.828125
70.1171870.945313
80.0439450.989258
90.0097660.999023
100.0009771

Find the probability of getting exactly k successes in n independent trials, each with the same chance of success p — like heads in 10 coin flips, defective items in a batch, or patients who respond to a treatment. The calculator also gives the cumulative probabilities for at most, fewer than, at least and more than k, the mean and standard deviation, and a chart of the whole distribution.

What is the binomial distribution?

The binomial distribution gives the probability of each possible number of successes in a fixed number of independent trials, when every trial has the same two outcomes and the same chance of success. Flipping a coin 10 times, testing 50 items from a production line, or asking 200 voters a yes-or-no question all fit the model, as long as each trial doesn’t affect the others.

Its two parameters are n, the number of trials, and p, the probability of success on each. The distribution is centred on the mean np, with standard deviation √(np(1 − p)); it is symmetric when p = 0.5 and skewed otherwise. Probabilities for ranges — at most, at least, more than — are found by adding the probabilities of the individual outcomes, which is what the cumulative values in the calculator do.

How to use the binomial distribution calculator

  1. Enter the number of trials n and the probability of success p on each one.
  2. Enter the number of successes k you are interested in.
  3. Read the exact probability, then the “at least” and “at most” values for ranges.

Formula

P(X = k) = C(n, k) × pᵏ × (1 − p)ⁿ⁻ᵏ

C(n, k) = n! ÷ (k!(n − k)!) counts the ways to choose which k of the n trials are successes; pᵏ(1 − p)ⁿ⁻ᵏ is the probability of any one such arrangement. Cumulative probabilities add these terms: P(X ≤ k) is the sum from 0 to k.

The mean is np and the standard deviation √(np(1 − p)). The binomial model needs a fixed number of trials, two outcomes per trial, independent trials and the same p every time.

Worked examples

At least 8 correct guesses on a 10-question true/false quiz

Number of trials (n)
10
Probability of success on each trial (p)
0.5
Number of successes (k)
8
P(X = 8)
0.043945
P(X ≤ 8)
0.989258
P(X < 8)
0.945313

P(X ≥ 8) = P(8) + P(9) + P(10) = 0.04395 + 0.00977 + 0.00098 = 0.05469, about a 5.5% chance by guessing alone.

Defective parts in a sample

Number of trials (n)
50
Probability of success on each trial (p)
0.02
Number of successes (k)
2
P(X = 2)
0.185801
P(X ≤ 2)
0.921572
P(X < 2)
0.735771

If 2% of parts are defective, the chance of finding at most 2 in a sample of 50 is P(X ≤ 2) = 0.9216, and of exactly 2 is 0.1858. The expected number is 50 × 0.02 = 1.

Number of heads in 10 fair coin flips

Heads (k)P(X = k)P(X ≤ k)Ways C(10, k)
00.0009770.0009771
10.0097660.01074210
20.0439450.05468745
30.1171870.171875120
40.2050780.376953210
50.2460940.623047252
60.2050780.828125210
70.1171870.945313120
80.0439450.98925845
90.0097660.99902310
100.00097711

Check the four conditions first

The binomial model needs a fixed number of trials, two outcomes per trial, the same probability every time and trials that don’t affect each other. Drawing without replacement breaks the last two: the chance of a heart changes after each card leaves the deck. When the sample is less than about a tenth of the population, as when testing 50 parts from a batch of 10,000, the binomial is still a close approximation.

Common mistakes

  • Using “at least” and “more than” interchangeably. P(X ≥ 3) includes 3; P(X > 3) does not.
  • Applying the binomial model when trials aren’t independent — for example drawing cards without replacement from a small deck. Use the hypergeometric distribution then.
  • Entering p as a percentage. A 30% chance is p = 0.3, not 30.
  • Forgetting the C(n, k) term and multiplying only pᵏ(1 − p)ⁿ⁻ᵏ, which gives the probability of one particular order of successes, not all of them.

Frequently asked questions

What is the probability of 5 heads in 10 coin flips?

C(10, 5) × 0.5¹⁰ = 252 ÷ 1,024 = 0.2461, or about 24.6%. It is the single most likely result but happens less than a quarter of the time.

What is the difference between “at least” and “more than”?

“At least 3” includes 3: P(X ≥ 3). “More than 3” starts at 4: P(X > 3). The calculator shows both, along with “at most” and “fewer than”.

When can I use the normal approximation instead?

When np and n(1 − p) are both at least about 10, the binomial is close to a normal distribution with the same mean and standard deviation. This calculator computes the exact binomial values, so no approximation is needed.

How many tries do I need to have a good chance of at least one success?

Solve 1 − (1 − p)ⁿ ≥ target. With a 10% chance per try, you need 29 tries for a 95% chance of at least one success, because ln(0.05) ÷ ln(0.9) is about 28.4.

Sources

  1. Binomial Distribution (NIST/SEMATECH e-Handbook of Statistical Methods), National Institute of Standards and Technology (NIST)
  2. Introductory Statistics 2e, 4.3: Binomial Distribution, OpenStax, Rice University

Last updated · Calculations checked by automated tests· Editorial policy