Skip to main content

Binomial Distribution Probabilities With Charts

Calculate exact and cumulative binomial probabilities for n trials with success probability p. Explore the distribution with interactive charts and key statistics.

Last Updated: February 13, 2026

What is P(X = k) for a binomial? It's C(n,k) · pᵏ · (1−p)ⁿ⁻ᵏ, the probability of exactly k successes in n independent Bernoulli trials with success probability p. That's the textbook prompt: n = 30, p = 0.20, exactly 5 successes. Answer ≈ 0.1023.

Most working questions land on the cumulative version. P(X ≤ k), P(X ≥ k), or P(a ≤ X ≤ b). Acceptance sampling, A/B test stopping rules, and hypothesis tests on proportions all want a tail or an interval rather than a single k. The tool returns the exact PMF and all three cumulatives in one pass, computed via log-gamma so factorial overflow doesn't bite at large n (n = 215 with k = 200 evaluates cleanly). Two traps to flag: p has to be a decimal, not a percentage. Typing 20 instead of 0.20 silently returns nonsense. And once both n·p ≥ 5 and n·(1−p) ≥ 5, the normal approximation tracks the exact PMF closely enough that the exact form is overkill; below that threshold, exact is the only honest answer.

Define n and p (Trial Assumptions)

Binomial distribution calculations require two parameters: n (number of trials) and p (success probability). Enter incorrect values and every downstream probability is wrong. Before running the calculator, confirm these assumptions hold.

n — Fixed Number of Independent Trials

The trial count n must be fixed in advance—known before the experiment begins. Flipping a coin 10 times means n = 10. Testing 50 products means n = 50. The binomial model breaks if you keep running trials until some stopping rule triggers (use negative binomial instead) or if n is unknown or varies randomly.

p — Constant Success Probability

Each trial has identical success probability p, which stays constant across all n trials. A fair coin has p = 0.5 for heads. A manufacturing defect rate of 3% means p = 0.03. If success probability changes trial-to-trial—due to learning, fatigue, or batch differences—the binomial assumption fails and results become unreliable.

Independence Requirement

Trials must be independent: the outcome of one trial cannot affect another. Drawing cards with replacement qualifies—each draw has the same probabilities. Drawing without replacement violates independence because the deck composition changes. For sampling from finite populations without replacement, use the hypergeometric distribution instead.

Binary Outcomes Only

Each trial produces exactly two outcomes: success or failure. Guessing on a multiple-choice question is either right (success) or wrong (failure). Rolling a die for "six" is either six (success) or not-six (failure). Problems with more than two categories need multinomial distributions.

Common error: Using percentages instead of decimals. Enter p = 0.20, not p = 20. The calculator expects values between 0 and 1.

Exact P(X = k) vs Cumulative P(X ≤ k)

Binomial queries come in two forms: exact probabilities for a specific outcome and cumulative probabilities that sum ranges. Selecting the wrong mode returns the wrong answer.

Exact: P(X = k)

The probability of exactly k successes in n trials. The formula is P(X = k) = C(n,k) × pᵏ × (1−p)ⁿ⁻ᵏ, where C(n,k) counts the ways to arrange k successes among n positions. Use this mode for "exactly" questions: What is the probability of exactly 7 heads in 10 flips?

Cumulative Left: P(X ≤ k)

The probability of k or fewer successes—summing P(X = 0) through P(X = k). Use this mode for "at most" questions: What is the probability of at most 7 heads in 10 flips? The cumulative probability always exceeds the exact probability at the same k because it includes more outcomes.

Cumulative Right: P(X ≥ k)

The probability of k or more successes. Computed as 1 − P(X ≤ k−1). Use this mode for "at least" questions: What is the probability of at least 3 defectives in a batch of 50? This equals summing P(X = k) through P(X = n).

Range: P(a ≤ X ≤ b)

The probability of successes falling between a and b (inclusive). Computed as P(X ≤ b) − P(X ≤ a−1). Use this mode for interval questions: What is the probability of 5 to 8 conversions out of 20 visitors?

Quick check: Exact probabilities decrease as k moves away from the mean n × p. Cumulative probabilities monotonically increase toward 1 as k increases.

Mean, Variance, and Standard Deviation

Three summary statistics describe where the distribution centers and how spread out it is. These formulas depend only on n and p—no summation required.

Mean: μ = n × p

The expected number of successes over many repetitions. With n = 100 trials and p = 0.30, expect about 30 successes on average. The mean shifts linearly with both n and p—double n and the mean doubles; double p and the mean doubles.

Variance: σ² = n × p × (1 − p)

Variance measures spread around the mean. It peaks when p = 0.5 (maximum uncertainty) and shrinks as p approaches 0 or 1 (near-certain outcomes). Larger n increases variance because more trials create more potential deviation from the mean.

Standard Deviation: σ = √(n × p × (1 − p))

The square root of variance puts spread in the same units as the success count. About 68% of outcomes fall within μ ± σ, and roughly 95% fall within μ ± 2σ. For n = 100, p = 0.5: μ = 50, σ ≈ 5, so most outcomes land between 40 and 60.

StatisticFormulan=20, p=0.3n=100, p=0.5
Meann × p6.050.0
Variancen × p × (1−p)4.225.0
Std Dev√(n × p × (1−p))≈ 2.055.0

Fast Checks: Symmetry and Edge Cases

Before trusting calculator output, run quick sanity checks based on known binomial properties.

Symmetry at p = 0.5

When p = 0.5, the distribution is symmetric around n/2. P(X = k) equals P(X = n − k). For n = 10 and p = 0.5, P(X = 3) equals P(X = 7). If your results violate this symmetry, recheck inputs.

Skewness for p ≠ 0.5

When p < 0.5, the distribution is right-skewed—more mass on lower k values, tail extending right. When p > 0.5, the distribution is left-skewed—more mass on higher k values, tail extending left. Check the chart to confirm the expected skew direction.

Boundary Cases: p = 0 or p = 1

If p = 0 (no chance of success), all probability concentrates at k = 0. If p = 1 (certain success), all probability concentrates at k = n. These degenerate cases collapse the distribution to a single spike.

k Outside Valid Range

For k < 0 or k > n, P(X = k) = 0 by definition. You cannot have negative successes or more successes than trials. The calculator should return zero for such inputs.

Sum-to-One Check

Summing P(X = 0) through P(X = n) must equal 1.0. Similarly, P(X ≤ n) must equal 1.0 and P(X ≥ 0) must equal 1.0. If the distribution table shows values that don't sum to 1, something is wrong.

Mode sanity: The mode (most likely k) sits near n × p. For large n with moderate p, the mode equals floor(n×p + p) or floor(n×p + p) − 1. If the highest probability bar in the chart is far from n × p, recheck your parameters.

Chart View: Probability Mass Across k

The probability mass function (PMF) chart displays bars for each possible k from 0 to n, with bar heights proportional to P(X = k). Use the chart to visualize distribution shape and locate high-probability regions.

Reading Bar Heights

Each bar represents the exact probability of that specific k. The tallest bar marks the mode—the most likely outcome. Adjacent bars show how probability tapers as k moves away from the mode. Compare bar heights to gauge relative likelihoods.

Identifying the Distribution Shape

Symmetric distributions (p = 0.5) show mirror-image bars around the center. Right-skewed distributions (p < 0.5) pile bars on the left with a long right tail. Left-skewed distributions (p > 0.5) pile bars on the right with a long left tail. The chart makes skewness immediately visible.

Cumulative Insight from the Table

The distribution table accompanies the chart, showing both P(X = k) and P(X ≤ k) for each k. Watch the cumulative column climb toward 1.0 as k increases. The jump between consecutive cumulative values equals the corresponding exact probability.

Using the Chart for Presentation

Screenshot the PMF chart for reports, slides, or homework. The visual clarifies where probability mass concentrates—helpful when explaining results to stakeholders who find tables harder to parse than graphs.

Common questions about the binomial PMF

What does the binomial coefficient C(n,k) represent?

C(n,k) counts the number of ways to choose k positions (for successes) out of n total trials. It equals n! / (k! × (n−k)!). For n = 10 and k = 3, C(10,3) = 120 means there are 120 different orderings that yield exactly 3 successes in 10 trials.

Why is my exact probability so small?

As n grows, the number of possible outcomes expands, spreading probability across more values of k. Exact probabilities shrink because each specific k captures a smaller share of total probability. Cumulative probabilities remain stable because they sum ranges.

When should I use normal approximation instead?

For large n (typically n > 50) with moderate p (both n×p ≥ 5 and n×(1−p) ≥ 5), the binomial distribution approximates a normal with mean n×p and standard deviation √(n×p×(1−p)). Normal approximation is faster and avoids numerical overflow for very large n. Exact binomial is more accurate for small n or extreme p.

What if trials are not independent?

Dependent trials invalidate the binomial model. Sampling without replacement from finite populations requires hypergeometric distribution. Sequential processes with memory (each trial affects the next) need Markov chains or other dependent models. Do not force binomial on dependent data.

How do I interpret the mean and standard deviation?

The mean μ = n×p tells you the expected success count on average. The standard deviation σ tells you typical deviation from that average. Most outcomes fall within μ ± 2σ. If μ = 30 and σ = 5, outcomes between 20 and 40 cover roughly 95% of probability.

Can I use this for quality control sampling?

Yes—binomial distributions underpin acceptance sampling plans. Given sample size n and defect probability p, compute the probability of finding k or fewer defects. Compare against accept/reject criteria to determine whether a lot passes inspection.

Worked examples: PMF and CDF computations

Six problems with full work. Numbers match scipy.stats.binom.pmf and binom.cdf to four decimals.

Problem. X ~ Binomial(n = 30, p = 0.20). Find the exact probability P(X = 5).

PMF: P(X = k) = C(n, k) · p^k · (1 − p)^(n − k). Plug in n = 30, k = 5, p = 0.20.

C(30, 5) = 30! / (5! · 25!) = 142,506
0.20^5  = 0.00032
0.80^25 ≈ 0.003778
P(X = 5) = 142,506 × 0.00032 × 0.003778 ≈ 0.1723

Note that the mean of this distribution is np = 6, so k = 5 is just below the mean and lands close to the modal probability. Expect P(X = 6) to be slightly larger (it's ≈ 0.1795). For tail values like k = 12 or k = 1 the probabilities fall off quickly because the binomial concentrates around its mean.

Answer: P(X = 5) ≈ 0.1723.

Problem. Same X ~ Binomial(30, 0.20). Find the cumulative probability P(X ≤ 5).

Sum the PMF from k = 0 through k = 5. Each term uses the same C(n, k) · p^k · (1 − p)^(n − k) formula from the previous example, just iterated.

P(X = 0) ≈ 0.001238
P(X = 1) ≈ 0.009285
P(X = 2) ≈ 0.033657
P(X = 3) ≈ 0.078532
P(X = 4) ≈ 0.132524
P(X = 5) ≈ 0.172281
Sum     ≈ 0.4275

The mean of this distribution is np = 6, so "at most 5" means "at most one below the mean." That P(X ≤ 5) ≈ 0.43 is roughly half makes sense, with the other half (≈ 0.57) split across k = 6, 7, 8, … . The distribution is right-skewed because p < 0.5, so the right tail decays slower than the left.

Answer: P(X ≤ 5) ≈ 0.4275. Equivalently, P(X ≥ 6) ≈ 0.5725.

Problem. X ~ Binomial(n = 215, p = 0.875). Find P(X ≤ 200) using the normal approximation.

Mean μ = np = 188.125. Variance σ² = np(1 − p) = 23.516, so σ ≈ 4.849. Apply the continuity correction.

z = (200 + 0.5 − 188.125) / 4.849
  = 12.375 / 4.849
  ≈ 2.5520
Φ(2.5520) ≈ 0.9946

np = 188 is large enough that the normal approximation matches the exact binomial sum to four decimals here. The rule of thumb is np ≥ 10 and n(1 − p) ≥ 10. When both fail, use the exact PMF or a Poisson approximation if p is small.

Answer: P(X ≤ 200) ≈ 0.9946.

Problem. X ~ Binomial(n = 10, p = 0.5). Tabulate P(X = k) for k = 0, 1, …, 10.

Each P(X = k) = C(10, k) / 1024, since 0.5^10 = 1/1024.

k =  0:    1/1024 = 0.000977
k =  1:   10/1024 = 0.009766
k =  2:   45/1024 = 0.043945
k =  3:  120/1024 = 0.117188
k =  4:  210/1024 = 0.205078
k =  5:  252/1024 = 0.246094
k =  6:  210/1024 = 0.205078
k =  7:  120/1024 = 0.117188
k =  8:   45/1024 = 0.043945
k =  9:   10/1024 = 0.009766
k = 10:    1/1024 = 0.000977

Answer: Symmetric around k = 5 because p = 0.5. Mode at k = 5 with probability ≈ 0.2461. P(X ≤ 4) = P(X ≥ 6) = 0.3770.

Problem. X ~ Binomial(n = 20, p = 0.05). Find P(X ≥ 1), the probability of at least one success.

Use the complement. P(X ≥ 1) = 1 − P(X = 0), and P(X = 0) = (1 − p)^n = 0.95^20 ≈ 0.3585. When the question reads "at least one," the complement is almost always faster than summing the tail.

Same setup, different framing: if you want the trial count n that makes "at least one success" have probability ≥ 0.95, solve 1 − (1 − p)^n ≥ 0.95, giving n ≥ log(0.05)/log(0.95) ≈ 58.4. So n = 59 trials get you there. Useful for sample-size planning when you're tracking rare events.

Answer: P(X ≥ 1) = 1 − 0.3585 ≈ 0.6415.

Problem. X ~ Binomial(n = 12, p = 0.3). What is the mode?

The mode of Binomial(n, p) is ⌊(n + 1) · p⌋, or both ⌊…⌋ and ⌊…⌋ − 1 when (n + 1)·p is an integer. Here (12 + 1) · 0.3 = 3.9, so ⌊3.9⌋ = 3. Quick check: P(X = 3) = C(12, 3) · 0.3³ · 0.7⁹ = 220 · 0.027 · 0.04035 ≈ 0.2397, and P(X = 4) ≈ 0.2311. Confirms k = 3 is the peak.

Answer: Mode at k = 3, with P(X = 3) ≈ 0.2397.

Limitations of the binomial PMF

Fixed n: the trial count must be known and predetermined. Variable or random n breaks the model. You probably want negative binomial or Poisson instead.

Independence with constant p: trials have to be independent with identical success probability. Sampling without replacement violates this. Switch to hypergeometric.

Numerical limits: for n above ~170, naive factorials overflow float64. The page handles it with log-gamma, but extreme tail probabilities can still underflow to zero.

Note: For production work, scipy.stats.binom or R's dbinom and pbinom give the same numbers with proper test coverage. If you're producing parameters from messy data, the binomial output is only as good as your estimate of p. Tighten that first.

Binomial PMF: working questions

How do I solve "find P(X = 5) when n = 30, p = 0.20"?

Plug into the binomial PMF: P(X = k) = C(n, k) · p^k · (1 − p)^(n−k). For n = 30, p = 0.20, k = 5, the binomial coefficient C(30, 5) = 142506. The factors are 0.2⁵ = 0.00032 and 0.8²⁵ ≈ 0.003778. Multiplying: 142506 · 0.00032 · 0.003778 ≈ 0.1723. So P(X = 5) ≈ 0.1723. The expected count is n·p = 6, so 5 is close to the mean and not unusual. R's dbinom(5, 30, 0.2) and scipy.stats.binom.pmf(5, 30, 0.2) both return the same value.

When does the normal approximation to binomial actually work, and when is it bad?

Standard rule: n·p ≥ 5 and n·(1 − p) ≥ 5, with continuity correction P(X ≤ k) ≈ Φ((k + 0.5 − np)/√(np(1−p))). It's very good when both quantities clear 10. With n = 215, p = 0.875, n·p = 188.1 and n·(1−p) = 26.9, so the normal approximation is fine; for P(X ≤ 200), the corrected z is (200.5 − 188.125)/√23.5 ≈ 2.55 giving p ≈ 0.9946. Bad regimes: p near 0 or 1 with small n. There the exact PMF is the only honest answer.

Binomial vs negative binomial vs hypergeometric, which do I need?

Binomial fixes n in advance and assumes independent trials with constant p. Counting successes in a fixed batch. Negative binomial flips it: you fix the number of successes and count trials needed. "How many tries until 5 wins?" is negative binomial, not binomial. Hypergeometric handles sampling without replacement from a finite population, where p shifts as you draw. Drawing 5 cards from a deck without replacement is hypergeometric. Quick rule: with replacement or independent trials, binomial. Stop at a target number of successes, negative binomial. Finite population, no replacement, hypergeometric.

What's the difference between P(X = k) and P(X ≤ k)?

P(X = k) is the exact PMF value, the probability of hitting k successes on the nose. P(X ≤ k) sums P(X = 0) + P(X = 1) + ... + P(X = k), the probability of k or fewer. The cumulative is always at least as large as the exact, equal only at k = 0. For "at most" questions (no more than 3 defects), use P(X ≤ k). For "at least" questions, use P(X ≥ k) = 1 − P(X ≤ k − 1). For "exactly," use the PMF.

How do I read the mean μ = n·p and standard deviation σ = √(n·p·(1−p))?

μ is the long-run average successes if you repeated the n-trial experiment many times. With n = 100 fair coin flips, you expect about 50 heads. σ measures typical deviation from that mean, so 100 fair flips have σ = √25 = 5, and most outcomes (roughly 95%) fall in 50 ± 10, i.e., 40 to 60. σ peaks at p = 0.5 (maximum uncertainty). It shrinks as p approaches 0 or 1, where outcomes become more predictable.

What happens when p = 0 or p = 1?

Degenerate cases. p = 0 means every trial fails, so P(X = 0) = 1 and the rest is zero. p = 1 means every trial succeeds, so P(X = n) = 1. Variance is 0; the distribution collapses to a single point. The PMF formula still evaluates correctly because of conventions like 0⁰ = 1, but there's no randomness left to model. If you find yourself entering p = 0 or p = 1 in a real problem, the binomial isn't the right question. You're doing deterministic counting.

What if my trials aren't independent?

Then binomial is wrong. The most common violation is sampling without replacement from a small population. Drawing 10 voters from a town of 200 to estimate vote share is hypergeometric, not binomial; the difference matters when the sample is more than ~5% of the population. Other violations include learning effects (success rate climbs over trials) and fatigue (success rate falls), or clustering when one event triggers others. For correlated trials, binomial undercovers the true variance, so confidence intervals come out too narrow.

How does the page handle large n without overflowing factorials?

It computes log C(n, k) via log-gamma rather than n! / (k! · (n − k)!). 171! already exceeds the float64 range, so the naive factorial fails at n = 171. The page evaluates log P(X = k) and exponentiates only at the end. n = 215, k = 200 with p = 0.875 evaluates cleanly because the intermediate values stay finite. Extreme tail probabilities can still underflow to zero, which is a precision floor, not a real probability of zero.

Related Math & Statistics Tools