Binomial Distribution Calculator
Enter the number of trials (n), success probability (p), and number of successes (k) to get P(X=k), P(X≤k), P(X≥k), and P(a≤X≤b), the mean, variance and standard deviation, a full distribution table, and — when np≥5 and n(1−p)≥5 — the normal approximation with a continuity correction. For n=10, p=0.5, k=5: P(X=5) = 0.24609375.
0.24609375
P(X = 5) with n = 10, p = 0.5
P(X ≤ 5): 0.62304688 · P(X ≥ 5): 0.62304687
P(3 ≤ X ≤ 7): 0.890625
Mean (np): 5 · Variance (np(1−p)): 2.5 · Std. deviation: 1.5811
Show the binomial coefficient C(n, k)
Show the P(X = 5) formula
Show P(X ≤ 5) and P(3 ≤ X ≤ 7) working
Show the distribution table (k, P(X=k), P(X≤k))
| k | P(X=k) | P(X≤k) |
|---|---|---|
| 0 | 0.00097656 | 0.00097656 |
| 1 | 0.00976563 | 0.01074219 |
| 2 | 0.04394531 | 0.0546875 |
| 3 | 0.1171875 | 0.171875 |
| 4 | 0.20507813 | 0.37695313 |
| 5 | 0.24609375 | 0.62304688 |
| 6 | 0.20507813 | 0.828125 |
| 7 | 0.1171875 | 0.9453125 |
| 8 | 0.04394531 | 0.98925781 |
| 9 | 0.00976563 | 0.99902344 |
| 10 | 0.00097656 | 1 |
Normal approximation (with continuity correction)
C(n, k) is computed in log-space, so n up to 1000 never overflows. How we calculate →
The binomial probability formula, plugged in
The binomial distribution models the number of successes in n independent trials, each with the same success probability p. The formula for exactly k successes is P(X = k) = C(n, k) × pᵏ × (1−p)ⁿ⁻ᵏ, where C(n, k) — "n choose k" — counts how many different orderings of k successes among n trials are possible.
For n = 10 coin flips with p = 0.5 (a fair coin) and k = 5 heads: C(10, 5) = 1… — worked out fully, P(X = 5) = 0.24609375 (about 24.61%), the calculator's default example.
Exactly, at most, at least, or in between — four different questions
"Exactly k" (P(X = k)) is a single term of the formula above. "At most k" (P(X ≤ k)) sums every P(X = i) from i = 0 up to k. "At least k" (P(X ≥ k)) is the complement: 1 − P(X ≤ k − 1) — much faster than summing all the way to n. And "between a and b" (P(a ≤ X ≤ b)) is P(X ≤ b) minus P(X ≤ a − 1).
For the same 10-flip example: P(X ≤ 5) = 0.62304688, P(X ≥ 5) = 0.62304687, and P(3 ≤ X ≤ 7) = 0.890625 — all four are computed automatically above whenever you change n, p, or k.
Mean, variance and standard deviation — no simulation needed
Unlike many distributions, the binomial's mean and variance have closed-form shortcuts: mean = np (over many repeats, you expect np successes on average) and variance = np(1−p), with the standard deviation as its square root. For n = 10, p = 0.5: mean = 5, variance = 2.5, standard deviation = 1.5811.
These numbers alone tell you a lot before running a single calculation: a mean far from n/2 combined with a small p or (1−p) usually signals a skewed, asymmetric distribution — exactly the case where the normal approximation below breaks down.
When the normal approximation works — and when it doesn't
A commonly cited rule of thumb says you can approximate a binomial distribution with a normal curve when np ≥ 5 and n(1−p) ≥ 5 — both "success" and "failure" counts are expected often enough for the bell curve shape to fit reasonably well. When it applies, adding a continuity correction of ±0.5 to k noticeably improves the approximation, since the normal distribution is continuous but the binomial is discrete.
Plenty of calculators show the formula without saying when it's actually safe to use. A stark counter-example: with n = 20 and p = 0.1, np = 2 — well under 5 — so the distribution is heavily skewed toward 0 and a normal approximation would be misleading; the calculator flags this explicitly instead of applying the shortcut anyway.
Frequently asked questions
What is the binomial distribution formula?
P(X = k) = C(n, k) × pᵏ × (1−p)ⁿ⁻ᵏ, where n is the number of trials, p is the probability of success on each trial, k is the number of successes, and C(n, k) = n! ÷ [k!(n−k)!] counts the possible orderings.
How do you calculate the binomial coefficient C(n, k) for large n?
Directly computing n! overflows for n much above 170 on a standard calculator. This tool instead sums logarithms — log C(n, k) = Σ log[(n−k+i) ÷ i] for i = 1 to k — then exponentiates once at the end, which stays accurate for n up to 1000.
What is the mean and variance of a binomial distribution?
Mean = n × p. Variance = n × p × (1−p). Standard deviation is the square root of the variance. For n = 10, p = 0.5: mean = 5, variance = 2.5, standard deviation ≈ 1.581.
What's the difference between P(X = k) and P(X ≤ k)?
P(X = k) is the probability of exactly k successes (one term of the formula). P(X ≤ k) is the cumulative probability of k or fewer successes — the sum of P(X = 0) through P(X = k).
When can you use the normal approximation for a binomial distribution?
A common rule of thumb requires both np ≥ 5 and n(1−p) ≥ 5. If either condition fails, the binomial distribution is too skewed for the normal curve to approximate well, and the exact binomial values should be used instead.
What is the continuity correction in the normal approximation?
Because the binomial distribution is discrete (whole numbers only) but the normal distribution is continuous, approximating P(X ≤ k) as Φ(k, mean, sd) understates the true probability slightly. Adding 0.5 — approximating instead with Φ(k + 0.5, mean, sd) — corrects for this and noticeably improves accuracy.
Can the binomial distribution be used for more than two outcomes?
No — the binomial distribution strictly requires exactly two outcomes per trial (success/failure) with a constant probability across independent trials. More than two outcomes per trial requires the multinomial distribution instead.
Researched & verified by the Calcuris Data & Research Team. How we build and check our tools →