How to Use the Binomial Distribution Calculator
This binomial distribution calculator computes exact probabilities for any binomial experiment — enter n (the total number of trials), p (the probability of success on a single trial, between 0 and 1), and k(the specific number of successes you are interested in). The calculator instantly computes P(X = k), P(X ≤ k), P(X ≥ k), and the distribution's mean, variance, and standard deviation. For n ≤ 20, a complete probability table shows every possible outcome from 0 to n with its individual probability and cumulative probability.
The selected value of k is highlighted in the table so you can see exactly where your result falls in the full distribution. For questions about continuous probability distributions, see our normal distribution calculator.
The Binomial Probability Formula
The probability of observing exactly k successes in n independent trials, each with success probability p, is:
P(X = k) = C(n, k) × p^k × (1 − p)^(n − k)
Where C(n, k) = n! / (k! × (n − k)!) is the binomial coefficient, representing the number of ways to choose k successes from n trials. The term p^k accounts for the k successes, and (1 − p)^(n−k) accounts for the remaining failures.
Worked Example
A quality control inspector samples 10 items from a production line where the defect rate is 5% (p = 0.05). What is the probability that exactly 2 items are defective (k = 2)?
P(X = 2) = C(10, 2) × 0.05² × 0.95⁸ = 45 × 0.0025 × 0.6634 ≈ 0.0746
There is approximately a 7.46% chance of finding exactly 2 defective items. The cumulative probability P(X ≤ 2) ≈ 0.9885, meaning there is only a 1.15% chance of finding 3 or more defectives in a sample of 10.
Distribution Properties: Mean, Variance, and Standard Deviation
The binomial distribution has simple closed-form expressions for its summary statistics, making it easy to characterize without computing every probability.
- Mean (μ = np): The expected number of successes. For 20 free throws with p = 0.75, μ = 20 × 0.75 = 15 made shots.
- Variance (σ² = np(1 − p)): Measures the spread of the distribution. For the free throw example, σ² = 20 × 0.75 × 0.25 = 3.75.
- Standard deviation (σ = √np(1 − p)): The typical deviation from the mean in the original units. For the free throw example, σ = √3.75 ≈ 1.94 made shots.
Variance is maximized when p = 0.5 (equal chance of success and failure) and approaches 0 as p approaches 0 or 1 (outcomes become more certain).
Cumulative Probabilities Explained
In many real-world scenarios, you need more than just the probability of an exact outcome — you need to know the probability of a range of outcomes.
- P(X ≤ k): The probability of k or fewer successes. Used when you want to know if results are unexpectedly low.
- P(X ≥ k): The probability of k or more successes. Used when you want to know if results are unexpectedly high.
- P(X < k): Strictly less than k (equals P(X ≤ k − 1)).
- P(X > k): Strictly greater than k (equals 1 − P(X ≤ k)).
For example, if a drug has a 30% success rate (p = 0.3) and is given to 10 patients (n = 10), the probability of seeing 5 or more successes is P(X ≥ 5) ≈ 0.1503. This tells a researcher that 5+ successes would be a relatively unusual but possible result.
When to Use the Binomial Distribution
The binomial distribution applies when all four conditions are met:
- Fixed number of trials (n): You run the experiment a predetermined number of times.
- Two outcomes: Each trial results in exactly one of two outcomes — success or failure.
- Constant probability (p): The probability of success is the same on every trial.
- Independence: The outcome of one trial does not affect any other trial.
Common applications include: predicting the number of defective items in a batch, modeling the number of customers who make a purchase, analyzing test results where each question is answered correctly or incorrectly, and estimating the probability of winning a certain number of games in a sports season.
When n is large and both np ≥ 10 and n(1 − p) ≥ 10, the binomial is approximately normal. Use our confidence interval calculator when working with sample proportions from large populations.
Sources & References
- Binomial Distribution — NIST/SEMATECH e-Handbook of Statistical Methods
- Binomial Probability Formula — Khan Academy