Binomial Distribution Calculator
Compute P(X=k) and cumulative P(X≤k) for n trials at probability p, along with the mean and variance.
P(X = k)
0.246094
Chance of exactly k successes.
P(X ≤ k)
0.623047
Chance of k or fewer successes.
The binomial PMF is C(n, k) · pᵏ · (1−p)ⁿ⁻ᵏ. With n = 10, p = 0.5, and k = 5 you get about 0.2461 for exactly five successes.
How it works
The binomial distribution models a fixed number of independent yes/no trials that each succeed with the same probability p. Flipping a coin ten times and counting heads is the classic example. Enter the number of trials n, the success probability p, and the number of successes k you care about.
The tool computes the exact probability P(X=k) using the formula C(n, k) · pᵏ · (1−p)ⁿ⁻ᵏ, where C(n, k) is the number of ways to choose k successes out of n trials. It also adds up every term from 0 to k to give the cumulative probability P(X≤k), plus P(X<k) and P(X≥k) for good measure.
Alongside the probabilities you get the distribution's mean (np) and variance (np(1−p)). For ten fair coin flips (n=10, p=0.5), the chance of exactly five heads is about 0.2461, the mean is 5, and the variance is 2.5.
Frequently asked questions
When can I use the binomial distribution?
Use it when you have a fixed number of independent trials, each with only two outcomes (success or failure), and the success probability stays the same across trials. Think coin flips, defective-part checks, or pass/fail tests.
What's the difference between P(X=k) and P(X≤k)?
P(X=k) is the chance of exactly k successes. P(X≤k) is the cumulative chance of k or fewer successes — it adds up the probabilities for 0, 1, 2, all the way up to k. This tool reports both.
How are the mean and variance calculated?
For a binomial distribution the mean is n × p and the variance is n × p × (1 − p). The standard deviation is just the square root of the variance. These summarize the center and spread of the number of successes.