Binomial Distribution Calculator
Compute binomial probabilities for any number of trials and success probability. Choose exact mode P(X = k), cumulative mode P(X ≤ k / P(X ≥ k)), or interval mode P(r0 ≤ X ≤ r1). Get the mean, variance, standard deviation, skewness, and excess kurtosis, plus a full probability table and bar chart.
Formula
Worked example
For n = 10, k = 4, p = 0.5: C(10,4) = 210, P(X = 4) = 210 x 0.5^4 x 0.5^6 = 210/1024 = 0.2051 (20.5%). Mean = 5, variance = 2.5, sigma = 1.581. Skewness = (1 - 2x0.5)/1.581 = 0 (symmetric). Excess kurtosis = (1 - 6x0.5x0.5)/2.5 = (1 - 1.5)/2.5 = -0.2 (slightly flatter than normal).
What the binomial distribution describes
The binomial distribution models the number of successes in a fixed number of independent trials, where every trial has exactly two outcomes: success or failure. Each trial carries the same probability of success p. Classic examples include the number of heads in twenty coin flips, the number of defective items in a production batch, the number of patients who respond to a treatment in a clinical trial, or the number of website visitors who click a link. Four conditions must hold: the number of trials n is fixed in advance, the trials are independent of one another, each trial has the same success probability p, and each outcome is binary. When these hold, the entire distribution is determined by just two parameters, n and p.
Exact and interval probability modes
Exact mode computes P(X = k): the probability of getting precisely k successes. The formula multiplies the binomial coefficient C(n, k), which counts the distinct arrangements of k successes among n trials, by p^k x (1 - p)^(n - k), the probability of any one arrangement. This calculator also reports the four cumulative variants: P(X <= k), P(X >= k), P(X < k), and P(X > k). Interval mode computes P(r0 <= X <= r1): the probability that the number of successes falls anywhere between r0 and r1, inclusive, along with its complement. This is useful when you care about a range of outcomes rather than a single value, for example the probability that a batch has between 5 and 15 defectives.
Mean, variance, skewness and excess kurtosis
Because a binomial count is the sum of n independent Bernoulli trials, expectations and variances add: the mean is np and the variance is np(1 - p). The standard deviation is the square root of the variance. Two higher-order moments characterise the shape. Skewness, gamma1 = (1 - 2p) / sqrt(np(1 - p)), measures asymmetry: it is zero when p = 0.5 (perfectly symmetric), positive when p < 0.5 (right tail is heavier), and negative when p > 0.5 (left tail is heavier). Excess kurtosis, gamma2 = (1 - 6p(1 - p)) / (np(1 - p)), measures how peaked the distribution is compared with a normal curve: a negative value (platykurtic) means the distribution is flatter and has lighter tails, which is common for binomial distributions with moderate p. As n grows large the binomial distribution is well approximated by a normal distribution with the same mean and variance.
Reading the distribution table and chart
The full distribution table below the calculator lists every possible outcome from k = 0 to k = n, with the exact probability P(X = k), the cumulative probability P(X <= k), and the survival probability P(X >= k). Use it to spot which outcomes are most likely (the modal values, near the mean), and to read off cumulative probabilities without re-entering inputs. The chart plots P(X = k) as a bar series and P(X <= k) as a line so you can see the shape of the distribution and where your target k falls relative to the bulk of the probability. Both the table and chart update automatically when you change n or p.
When to use the binomial vs other distributions
When n is large (above about 30) and p is moderate (say 0.1 to 0.9), the normal approximation with mean np and variance np(1 - p) is usually accurate to within a fraction of a percent, especially after applying a continuity correction. When n is large and p is very small so that np stays modest (below about 10), the Poisson distribution with rate lambda = np is a convenient approximation. Use the negative binomial distribution instead when you fix the number of successes and ask how many trials are needed. Use the hypergeometric distribution when sampling is done without replacement from a finite population, where the independence assumption breaks down.
Binomial distribution formulas at a glance
| Quantity | Formula | Notes |
|---|---|---|
| P(X = k) | C(n,k) x p^k x (1-p)^(n-k) | Exact probability (pmf) |
| P(X <= k) | sum_{i=0}^{k} P(X=i) | Cumulative distribution function (cdf) |
| P(r0 <= X <= r1) | sum_{i=r0}^{r1} P(X=i) | Interval probability |
| Mean (mu) | np | Expected number of successes |
| Variance (sigma^2) | np(1-p) | Spread of the distribution |
| Std deviation (sigma) | sqrt(np(1-p)) | Typical deviation from the mean |
| Skewness (gamma1) | (1 - 2p) / sigma | 0 when p = 0.5; positive when p < 0.5 |
| Excess kurtosis (gamma2) | (1 - 6p(1-p)) / (np(1-p)) | Negative for most binomials (platykurtic) |
All formulas use n = number of trials, p = probability of success, k = target successes.
Frequently asked questions
When can I use the binomial distribution?
Use the binomial distribution when you have a fixed number of trials n, each trial is independent of the others, every trial can only result in success or failure, and the probability of success p is the same on every trial. Coin flips, free-throw attempts, pass/fail quality inspections, and survey responses (yes/no) all fit. If sampling is without replacement from a small population, the hypergeometric distribution is more accurate. If the success probability changes from trial to trial, the binomial model does not apply.
What is the difference between P(X = k) and P(X <= k)?
P(X = k) is the probability of getting exactly k successes, a single bar of the histogram. P(X <= k) is the cumulative probability of getting k or fewer successes, computed by adding up all the individual probabilities from 0 through k. This calculator shows both, plus P(X >= k), P(X < k), P(X > k), and the interval probability P(r0 <= X <= r1) in interval mode.
What does skewness tell me about a binomial distribution?
Skewness measures asymmetry. A binomial distribution is perfectly symmetric when p = 0.5, giving skewness = 0. When p < 0.5, there is a longer right tail because most outcomes are clustered near zero: skewness is positive. When p > 0.5, the left tail is longer and skewness is negative. The formula is (1 - 2p) / sqrt(np(1 - p)), so skewness shrinks toward zero as n increases even for a fixed p.
What is excess kurtosis and why is it often negative for binomials?
Excess kurtosis, (1 - 6p(1-p)) / (np(1-p)), measures how peaked the distribution is compared with a normal distribution (which has excess kurtosis 0). A negative value (platykurtic) means the distribution is flatter than a normal curve with the same mean and variance, with lighter tails. The binomial distribution has negative excess kurtosis unless p is very close to 0 or 1 and n is small.
Why are the mean and variance np and np(1-p)?
A binomial count is the sum of n independent Bernoulli trials, each equal to 1 for a success and 0 for a failure. Each trial has mean p and variance p(1 - p). Because expectations and variances of independent random variables add, the total mean is np and the total variance is np(1 - p). The standard deviation is the square root of the variance.
How do I use interval mode?
Select "Interval: P(r0 <= X <= r1)" from the mode dropdown, then enter the lower bound r0 and upper bound r1. The calculator sums P(X = k) for all k from r0 to r1, giving you the probability that the number of successes falls in that range. The complement, P(X < r0) + P(X > r1), is also shown. This is useful when you want the probability that a batch has between 5 and 15 defectives, or that a team wins between 3 and 6 games in a series.