Interactive binomial distribution calculator
Free online binomial distribution calculator. It computes binomial probabilities, the probability mass function (PMF) and cumulative distribution function (CDF), quantiles (inverse binomial), and the distribution measures for X ~ B(n, p), with an interactive bar chart, an optional normal approximation, a step-by-step calculation and the equivalent R code and Excel formulas.
What you can calculate
- P(X ≤ k) — cumulative probability of at most k successes (CDF).
- P(X ≥ k) — upper-tail probability of at least k successes.
- P(k₁ ≤ X ≤ k₂) — probability that the count lies between k₁ and k₂.
- Two tails — P(X ≤ k₁) + P(X ≥ k₂), the probability outside the range.
- Exact P(X = k) — the probability mass at exactly k successes (PMF).
- k from P(X ≤ k) — the quantile for a given cumulative probability (inverse CDF).
- k from P(X ≥ k) — the count for a given upper-tail probability.
- Tail values k₁, k₂ — both tail counts from two tail probabilities.
How to use
- Enter the number of trials (n) and the success probability (p). Leave empty to use the defaults n = 20, p = 0.5.
- Pick what to calculate — the small icons show which bars will be highlighted.
- Enter the count(s) k or the probability and press Calculate.
- Explore the chart: hover it to read P(X = k), P(X ≤ k) and P(X ≥ k) at any outcome; drag the round handles to move the boundaries — the results update as you drag. Switch to the CDF view or overlay the normal curve from the toolbar.
The binomial probability mass function
P(X = k) = n!k! (n − k)! pk(1 − p)n−k with mean μ = np and variance σ² = np(1 − p).
What is the binomial distribution?
The binomial distribution is a discrete probability distribution that models the number of successes in a fixed number of independent trials, where each trial has the same probability of success p. Classic examples include the number of heads in n coin flips, the number of defective items in a batch, or the number of correct answers on a multiple-choice test taken by guessing.
It has two parameters: the number of trials n and the success probability p. The mean is np and the variance is np(1 − p). When n is large and p is not too close to 0 or 1, the binomial distribution is well approximated by the normal distribution N(np, np(1 − p)) — you can overlay that curve on the chart to see the fit. For rare events (small p, large n) it is instead approximated by the Poisson distribution with λ = np.
Looking for other distributions (normal, t, chi-square, F, Poisson…)? Use the all-distributions calculator.