Binomial distribution calculator with a bar chart
A binomial distribution counts how many successes you get when the same trial is repeated a set number of times, independently, with the same chance of success every time. If X ~ B(n, p), the chance of exactly k successes is P(X = k) = nCk × pᵏ × (1 − p)ⁿ⁻ᵏ. The chance of exactly 6 heads in 10 fair coin flips is 210 ÷ 1024 = 0.2051. This binomial distribution calculator is part of our Probability Calculator: set n and p, choose exactly, at most, at least or between, and it shades the bars and gives the probability, with the mean and standard deviation.
Probability Calculator
Visualise probability distributions and events
How to use the binomial distribution calculator
- Open the Probability Calculator and choose Binomial at the top. It opens on Normal.
- Under Distribution, set Trials n and Success chance p.
- Under Probability, pick a region in Shade and set the bounds, using the table below.
- Read the probability, written out in full, such as P(X ≤ 3) = 0.1719. The chart shades the bars you have included.
- Open Formulas for the mean E(X) = np, the variance and the standard deviation with your numbers.
- To practise, press Random problem in the Practice section.
| You want | Shade | Bounds |
|---|---|---|
| Exactly k: P(X = k) | P(a < X < b) | a = k and b = k |
| At most k: P(X ≤ k) | P(X < a) | a = k |
| At least k: P(X ≥ k) | P(X > a) | a = k |
| Between j and k: P(j ≤ X ≤ k) | P(a < X < b) | a = j and b = k |
For a binomial, the calculator includes the bounds themselves, and the result line shows ≤ and ≥ to say so. For fewer than k (X < k), use at most k − 1. For more than k, use at least k + 1.
Binomial distribution formula
nCk counts the orders in which the k successes can happen, pᵏ is the chance of k successes, and (1 − p)ⁿ⁻ᵏ the chance of the n − k failures. The mean and standard deviation are:
When to use a binomial distribution
- A fixed number of trials, n.
- Each trial has two outcomes: success or failure.
- The trials are independent.
- The chance of success, p, is the same every time.
Drawing cards without putting them back fails the last two, because p changes after each draw. Counting until the first success fails the first, because n isn't fixed. For the whole topic, including cumulative probabilities, the normal approximation and hypothesis tests, see the binomial distribution guide.
Worked examples you can check in the calculator
Example 1: exactly 6 heads in 10 flips
Set n = 10 and p = 0.5, choose P(a < X < b), and make a = b = 6: the calculator gives 0.2051.
Example 2: at most 3 heads
P(X ≤ 3) adds the chances of 0, 1, 2 and 3 heads: (1 + 10 + 45 + 120) ÷ 1024 = 176 ÷ 1024 = 0.1719. Choose P(X < a) with a = 3.
Example 3: at least one faulty item
Each item from a machine has a 10% chance of being faulty, independently. In a batch of 15, what is the chance that at least one is faulty? It is easiest through the complement: P(none) = 0.9¹⁵ = 0.2059, so P(at least 1) = 1 − 0.2059 = 0.7941. In the calculator, n = 15, p = 0.1, P(X > a) with a = 1. The mean is 15 × 0.1 = 1.5 faulty items.
Example 4: guessing on a multiple-choice test
A test has 20 questions, each with 4 options, and a student guesses every one, so n = 20 and p = 0.25. The mean is 20 × 0.25 = 5 correct, with standard deviation √(20 × 0.25 × 0.75) = 1.94. The chance of 10 or more correct is P(X ≥ 10) = 0.0139, about 1 in 72: guessing rarely gets you to half marks.
Try a binomial calculation, then press Mark to check your answer in the Probability course.
Use the binomial formula to find a probability to 3 decimal places.
Press Mark to have your answer marked in the Probability course.
Quick check
Common mistakes
- Mixing up at least and more than. At least 3 includes 3; more than 3 starts at 4.
- Forgetting nCk. pᵏ(1 − p)ⁿ⁻ᵏ is the chance of one particular order; multiply by the number of orders.
- Adding up dozens of terms for an at least question. Use 1 − P(at most k − 1).
- Using a binomial when p changes, as when sampling without replacement from a small group.
- Rounding each term before adding. Keep full values and round the total.
Common questions
What is the binomial probability formula?
How do you find the probability of at least one success?
What is the mean of a binomial distribution?
How do I get P(X = k) in the calculator?
What is the difference between binomial pdf and cdf?
Revision cards
Read the front, say your answer, then flip to check.
Where to go next
- Solve it
Probability Calculator
Visualise probability distributions and events
Open the tool - Learn it
Probability
Distributions, expected values and the maths behind uncertainty
Start the course - Test it
AP Statistics
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper