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
- Enter the number of trials n and the probability of success p on each one.
- Enter the number of successes k you are interested in.
- 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) |
|---|---|---|---|
| 0 | 0.000977 | 0.000977 | 1 |
| 1 | 0.009766 | 0.010742 | 10 |
| 2 | 0.043945 | 0.054687 | 45 |
| 3 | 0.117187 | 0.171875 | 120 |
| 4 | 0.205078 | 0.376953 | 210 |
| 5 | 0.246094 | 0.623047 | 252 |
| 6 | 0.205078 | 0.828125 | 210 |
| 7 | 0.117187 | 0.945313 | 120 |
| 8 | 0.043945 | 0.989258 | 45 |
| 9 | 0.009766 | 0.999023 | 10 |
| 10 | 0.000977 | 1 | 1 |
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
- Binomial Distribution (NIST/SEMATECH e-Handbook of Statistical Methods), National Institute of Standards and Technology (NIST)
- Introductory Statistics 2e, 4.3: Binomial Distribution, OpenStax, Rice University
Last updated · Calculations checked by automated tests· Editorial policy