Binomial Probability Calculator
The binomial distribution gives the probability of exactly k successes in n independent trials with success probability p. For n = 10, p = 0.5 and k = 5, P(X = 5) = 0.2461 (252 ÷ 1,024) and P(X ≤ 5) = 0.6230.
Last updated · By S. Dilshan · Runs in your browser, nothing is uploaded
Step-by-Step Solution
What Is the Binomial Distribution?
The binomial distribution models the number of successes in a fixed number of independent attempts, where each attempt has only two outcomes (success or failure) and the same chance of success. Flipping a coin 10 times and counting heads is the classic case, but the same model fits the number of defective items in a batch, the number of customers who click an advert, or the number of free throws a player makes.
For a situation to be binomial, four conditions must hold, often remembered as BINS.
| Condition | Meaning | Coin-flip example |
|---|---|---|
| Binary outcomes | Each trial is a success or a failure | Heads or tails |
| Independent trials | One trial does not affect another | Flips do not influence each other |
| Number of trials is fixed | n is decided in advance | 10 flips |
| Same probability | p stays constant | p = 0.5 each time |
Binomial Probability Formula
nis the number of trials.kis the number of successes you want the probability of.pis the probability of success on a single trial, and1 − pis the probability of failure.C(n, k)counts the different orders in which k successes can occur among n trials. See the combination calculator.
Cumulative probabilities such as P(X ≤ k) add up the individual probabilities from 0 to k, and P(X ≥ k) is 1 − P(X ≤ k − 1).
Worked Example: 5 Heads in 10 Flips
- n = 10, k = 5, p = 0.5.
- C(10, 5) = 10! ÷ (5! × 5!) = 252.
- 0.5⁵ × 0.5⁵ = 0.5¹⁰ = 1 ÷ 1,024.
- P(X = 5) = 252 ÷ 1,024 = 0.2461, about 24.6%.
- P(X ≤ 5) = 0.6230 and P(X ≥ 5) = 0.6230, because the distribution is symmetric when p = 0.5.
- Mean = 10 × 0.5 = 5 and standard deviation = √(10 × 0.5 × 0.5) = 1.5811.
Example: Defective Parts
A machine produces 10% defective parts. In a sample of 20, what is the chance of finding none, or at most two?
| Question | Calculation | Result |
|---|---|---|
| No defects, P(X = 0) | 0.9²⁰ | 0.1216 |
| Exactly 2 defects, P(X = 2) | C(20, 2) × 0.1² × 0.9¹⁸ | 0.2852 |
| At most 2, P(X ≤ 2) | 0.1216 + 0.2702 + 0.2852 | 0.6769 |
| More than 2, P(X > 2) | 1 − 0.6769 | 0.3231 |
The mean is 20 × 0.1 = 2 defects with a standard deviation of 1.34, so finding 0, 1, 2 or 3 defects in a sample is quite ordinary.
Example: At Least One Six in Four Rolls
The chance of at least one six in four rolls is P(X ≥ 1) = 1 − (5/6)⁴ = 0.5177, slightly better than even.
How to Use This Binomial Probability Calculator
- Enter the number of trials n (a whole number).
- Enter the probability of success p as a decimal between 0 and 1.
- Enter the number of successes k you are interested in.
- Read P(X = k), P(X ≤ k), P(X ≥ k), P(X < k) and P(X > k), plus the mean and standard deviation.
For rare events over a continuous period, the Poisson distribution calculator may fit better. For sampling without replacement from a small population, use the hypergeometric distribution calculator.
Real-World Uses of the Binomial Distribution
- Quality control: deciding whether the number of defective items in a sample is unusual.
- Medicine: modelling how many patients out of n respond to a treatment.
- Marketing and web analytics: counting conversions out of n visitors.
- Polling: the number of people who support a measure in a random sample.
- Games and risk: computing the odds of streaks, hits or wins over repeated attempts.
The Normal Approximation in Practice
For large n, adding up many binomial terms is tedious, so a normal curve is used instead. With n = 100 and p = 0.5, the mean is 50 and the standard deviation is 5. To estimate P(X ≤ 45), apply a continuity correction and use 45.5: z = (45.5 − 50) ÷ 5 = −0.9, which gives about 0.184. The exact binomial answer is 0.1841, so the approximation is excellent. See the normal distribution calculator for these look-ups.
What Are the Most Common Mistakes With the Binomial Probability Calculator?
- Using it when trials are not independent. Drawing cards without replacement changes the probabilities, so the binomial model is only an approximation.
- Changing p between trials. The model needs a constant success probability.
- Mixing up “at least” and “exactly”. P(X = k) and P(X ≥ k) answer different questions.
- Entering p as a percentage. Use 0.1, not 10.
- Forgetting k must be a whole number between 0 and n.
- Floating-point limits. With very large n, individual probabilities become tiny and may round to zero.
Where Can You Verify These Formulas?
The definitions and formulas on this page follow standard references. Check them against these sources:
Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.
Frequently Asked Questions
What is the formula for binomial probability?
P(X = k) = C(n, k) × pᵏ × (1 − p)ⁿ⁻ᵏ, where n is the number of trials, k is the number of successes and p is the probability of success on each trial.
How do you calculate “at least” probabilities?
Subtract the cumulative probability below k from 1: P(X ≥ k) = 1 − P(X ≤ k − 1). For at least one success it simplifies to 1 − (1 − p)ⁿ.
What are the mean and standard deviation of a binomial distribution?
The mean is n × p and the standard deviation is √[n × p × (1 − p)]. For n = 10 and p = 0.5 they are 5 and 1.5811.
When can I use the binomial distribution?
When there is a fixed number of independent trials, each with two possible outcomes and the same probability of success.
What is the difference between binomial and Poisson distributions?
Binomial counts successes in a fixed number of trials. Poisson counts events in a fixed interval of time or space with no fixed upper limit. Poisson approximates the binomial when n is large and p is small.
Can the binomial distribution be approximated by the normal?
Yes, when n × p and n × (1 − p) are both at least about 10, the binomial is well approximated by a normal distribution with mean np and standard deviation √(np(1 − p)).