The binomial distribution gives the exact probability of counting a certain number of successes across a fixed number of independent trials, when every trial carries the same success probability. You meet it whenever you flip a coin ten times and count the heads, test thirty patients who each either respond to a drug or do not, or inspect a batch of parts that each either pass or fail. Unlike an average, the binomial distribution hands you a full probability for every possible count — 0 successes, 1 success, 2 successes, all the way to n. This guide works through the conditions that make a variable binomial, the binomial distribution formula and the related binomial distribution formulas for cumulative probability, how Bernoulli’s distribution anchors the whole model, where the geometric distribution fits alongside it, and two fully worked numeric examples.

Key takeaways

Point Details
Four conditions define the model A fixed number of trials, two outcomes per trial, a constant success probability, and independence between trials — all four must hold for X ~ B(n, p).
Bernoulli's distribution is the n = 1 case A single trial with outcomes 1 (success, probability p) or 0 (failure, probability 1 − p); summing n of these builds a full B(n, p) variable.
Mean and spread come straight from n and p μ = np and σ = √(np(1 − p)); when p sits away from 0.5, the distribution leans — the skewness formula tells you which way.
"Exactly," "at most," and "at least" need different formulas P(X = k) is a single term; P(X ≤ k) and P(X ≥ k) sum multiple terms — mixing these up is the most common binomial mistake.
The geometric distribution answers a different question It counts trials until the first success, with no fixed n, instead of counting successes across a fixed n — a related but distinct model built on the same Bernoulli trials.

Quick Checklist: Confirming You Actually Have a Binomial Setup

Before you reach for the binomial distribution formula, check that your problem really satisfies all four conditions. Skipping this step is the single most common reason a binomial calculation turns out wrong.

Quick checklist: is this a binomial setup?

  • Count the trials n must be fixed and known in advance — you don’t stop early once you see enough successes.
  • Confirm exactly two outcomes Each trial resolves to "success" or "failure," nothing in between.
  • Confirm p is constant The probability of success cannot drift from one trial to the next.
  • Confirm independence One trial’s result can’t change the odds on any other trial — sampling without replacement from a small pool usually breaks this.
  • Read the question phrasing "Exactly k" needs one formula; "at most," "fewer than," or "at least" need a cumulative sum instead.

If any condition fails, a different model usually fits better — sampling without replacement from a finite pool calls for the hypergeometric distribution, and counting rare events over a continuous span of time or space calls for the Poisson distribution instead.

What Is the Binomial Distribution?

A random variable X follows a binomial distribution when four conditions hold at once: a fixed number of trials n, exactly two mutually exclusive outcomes per trial (“success” and “failure”), a constant success probability p on every trial, and independence between trials. OpenStax’s Introductory Statistics 2e groups the same requirements into three characteristics of a binomial experiment: a fixed number of trials n; exactly two possible outcomes per trial, with p denoting the probability of success and q = 1 − p the probability of failure; and “the n trials are independent and are repeated using identical conditions,” which folds constant-p and independence into a single characteristic rather than splitting them the way this guide’s checklist does. Either count describes the same model; this guide keeps “p stays constant” and “trials are independent” as two separate checks because conflating them is exactly how a sampling-without-replacement mistake slips in. Both agree on the resulting notation X ~ B(n, p), read “X follows a binomial distribution with parameters n and p,” where X can take any integer value from 0 to n.

The NIST/SEMATECH e-Handbook’s binomial distribution entry frames it the same way: the binomial model gives the probability of observing x successes in N trials, with p fixed across every trial. It calls the binomial “probably the most commonly used discrete distribution” — a fair label, given how often real decisions reduce to counting yes/no outcomes across a known number of attempts.

The binomial distribution is probably the most commonly used discrete distribution.

NIST/SEMATECH e-Handbook of Statistical Methods

The name itself is a hint at the mechanics: “bi-” for the two possible outcomes per trial, and “-nomial” for the terms being summed across trials. That makes the binomial distribution inherently discrete — X can only take whole-number values from 0 to n, never a fraction of a success — which is a different kind of object from a continuous model like the normal distribution, where any real number in a range is possible.

What Is a Bernoulli Trial, and How Does Bernoulli’s Distribution Fit In?

A single trial with only two possible outcomes — success with probability p, failure with probability 1 − p — is called a Bernoulli trial, after the Swiss mathematician Jacob Bernoulli, whose posthumously published 1713 work Ars Conjectandi laid foundational groundwork for probability theory, according to the MacTutor History of Mathematics archive at the University of St Andrews.

Bernoulli’s distribution is simply the special case of the binomial where n = 1:

P(X = 1) = p          (success)
P(X = 0) = 1 − p      (failure)

Its mean is p and its variance is p(1 − p). The link to the full binomial model is direct: a binomial variable with parameters n and p is nothing more than the sum of n independent Bernoulli(p) trials. Flip a coin ten times, and each flip is its own Bernoulli(0.5) trial; the running total of heads is B(10, 0.5). Some courses present Bernoulli’s distribution and the binomial distribution as two separate topics, but once you see the sum relationship, the two sets of formulas become the same formula at n = 1 versus general n.

What Is the Binomial Distribution Formula?

The binomial distribution formula gives the probability of exactly k successes across n trials, each with success probability p:

P(X = k) = C(n, k) × p^k × (1 − p)^(n − k)

Here n is the total number of trials, k is the specific count of successes you’re asking about (an integer from 0 to n), p is the probability of success on one trial, and C(n, k) is the binomial coefficient — “n choose k” — which counts how many distinct ways k successes can be arranged among n trials:

C(n, k) = n! / (k! × (n − k)!)

The formula multiplies three separate pieces of information. C(n, k) counts every valid arrangement of which trials succeed. p^k is the probability that each of those k chosen trials actually succeeds. (1 − p)^(n − k) is the probability that every remaining trial fails. Because the trials are independent, individual probabilities multiply; the binomial coefficient out front makes sure every arrangement gets counted exactly once rather than being double-counted or missed.

As a quick illustration: for n = 6 trials with p = 0.4, the probability of exactly k = 2 successes is C(6, 2) × 0.4² × 0.6⁴ = 15 × 0.16 × 0.1296 ≈ 0.3110, or about 31.1%. Working through C(n, k) by hand gets tedious once n grows past the teens; the combination calculator computes it directly if you only need that one piece.

The best-known instance of this formula is probably the fair coin: for n = 10 flips with p = 0.5, P(X = 5) = C(10, 5) × 0.5^10 = 252 / 1024 ≈ 0.2461, so even the single most likely outcome — 5 heads out of 10 — still comes up less than 1 time in 4.

Two edge cases are worth checking by hand once, because they show the formula degenerating sensibly rather than breaking. At k = 0, C(n, 0) = 1 and the formula collapses to P(X = 0) = (1 − p)^n — every single trial has to fail. At k = n, C(n, n) = 1 as well, and P(X = n) = p^n — every trial has to succeed. Both match intuition directly: with n = 6 and p = 0.4, P(X = 0) = 0.6^6 ≈ 0.0467 and P(X = 6) = 0.4^6 ≈ 0.0041, so getting all failures is roughly 11 times more likely than getting all successes when the success probability sits below 0.5.

What Are the Mean, Variance, and Shape of a Binomial Distribution?

Three numbers — mean, variance, and standard deviation — summarize where a binomial distribution centers and how far it spreads, and two more describe its shape.

Mean:                μ = n × p
Variance:            σ² = n × p × (1 − p)
Standard deviation:  σ = √(n × p × (1 − p))

These fall out of the Bernoulli building blocks directly: each Bernoulli(p) trial contributes mean p and variance p(1 − p), and because the n trials are independent, you sum both the means and the variances across all of them. The NIST/SEMATECH handbook also documents the distribution’s skewness, (1 − 2p) / √(np(1 − p)), and kurtosis, 3 − 6/n + 1/(np(1 − p)) — useful for judging how lopsided a given binomial distribution looks before you lean on a symmetric approximation.

Kurtosis close to 3 means a binomial distribution’s peak and tails behave roughly like a normal curve’s. Both correction terms in the formula shrink as n grows, so kurtosis tends toward 3 for any fixed p; which side it approaches from depends on p itself — for moderate p (roughly 0.21 < p < 0.79, where p(1 − p) > 1/6) it sits just below 3, and for p near 0 or 1 it sits above 3. For n = 20 and p = 0.3, kurtosis comes out to roughly 2.94 — just below 3, consistent with that rule, and close enough that the shape is already fairly bell-like despite being a discrete, bounded distribution.

Binomial distribution statistics for n = 20, p = 0.3
Statistic Formula Value
Mean (μ) n × p 6.0
Variance (σ²) n × p × (1 − p) 4.2
Standard deviation (σ) √(n × p × (1 − p)) ≈ 2.05
Mode the integer in [p(n+1) − 1, p(n+1)] 6
Skewness (1 − 2p) / √(np(1 − p)) ≈ 0.195 (slight right lean)

That positive skewness number is worth pausing on: whenever p is below 0.5, the binomial distribution leans slightly right, with a longer tail of higher-than-average counts; when p is above 0.5, it leans left instead. Only at p = 0.5 is the distribution exactly symmetric. The skewed distribution guide covers how to read and measure that lean in general, beyond this one discrete case.

How Do You Calculate Cumulative Binomial Probabilities?

Most real questions don’t ask for one exact count — they ask “at most,” “at least,” or “between.” The binomial distribution formulas for these cases all build on the same exact-probability term, just summed differently.

The three binomial distribution formulas
Question Formula Reads as
Exactly k P(X = k) = C(n, k) × pᵏ × (1 − p)ⁿ⁻ᵏ Probability mass function
At most k P(X ≤ k) = Σ P(X = i) for i = 0 … k Cumulative distribution function
At least k P(X ≥ k) = 1 − P(X ≤ k − 1) Survival function

“Exactly 5” and “at most 5” are not the same question and do not share an answer — confusing them is the most common error in a binomial calculation. “At most k” sums every term from 0 through k; “at least k” is easiest found by subtracting “at most k − 1” from 1, rather than summing a long upper tail directly.

Example. For 10 fair coin flips (n = 10, p = 0.5), what’s the probability of 3 or fewer heads? Sum P(X = 0) through P(X = 3), each sharing the common factor (0.5)^10 = 1/1024:

P(X = 0) = C(10, 0) × (0.5)^10 =   1 / 1024
P(X = 1) = C(10, 1) × (0.5)^10 =  10 / 1024
P(X = 2) = C(10, 2) × (0.5)^10 =  45 / 1024
P(X = 3) = C(10, 3) × (0.5)^10 = 120 / 1024

P(X ≤ 3) = (1 + 10 + 45 + 120) / 1024 = 176 / 1024 ≈ 0.1719

There’s roughly a 17.2% probability of 3 or fewer heads in 10 flips. The complementary “at least” question — the probability of 4 or more heads — is simply 1 − 0.1719 = 0.8281, found without summing seven more terms directly.

For large n, summing by hand gets impractical fast. A useful shortcut: when both n × p ≥ 5 and n × (1 − p) ≥ 5, the binomial distribution is well approximated by a normal distribution with the same mean and variance, with a ±0.5 continuity correction applied to each integer boundary. For small n or p near 0 or 1, that approximation breaks down and the exact binomial formula — or a z-table lookup after the normal approximation is actually valid — is the safer route.

A Worked Example: Inspecting a Batch of Light Bulbs

Setup. A factory’s defect rate is 10% per bulb (p = 0.10), independent from bulb to bulb. An inspector pulls a sample of n = 20 bulbs. What is the probability that exactly 2 are defective?

Binomial probability calculation process Four connected steps: identify n equals 20 and p equals 0.10; compute the binomial coefficient C(20,2) equals 190; compute the probability factors 0.01 times approximately 0.1501; multiply to get the final probability of approximately 0.2852. 1 Identify n, p, k n = 20 trials, p = 0.10defect probability, k =2 defectives. 2 Compute C(n, k) C(20, 2) = 20! / (2! ×18!) = 190. 3 Compute theprobabilityfactors (0.10)² = 0.01; (0.90)¹⁸≈ 0.1501. 4 Multiplyeverythingtogether P(X = 2) = 190 × 0.01 ×0.1501 ≈ 0.2852.
Figure 1. Four steps from the two parameters to the final probability for the 20-bulb inspection.
  1. Compute the binomial coefficient.
C(20, 2) = 20! / (2! × 18!) = (20 × 19) / 2 = 190
  1. Compute the two probability factors.
(0.10)² = 0.01
(0.90)^18 ≈ 0.1501
  1. Multiply all three pieces together.
P(X = 2) = 190 × 0.01 × 0.1501 ≈ 0.2852

Decision. There is roughly a 28.5% probability of finding exactly 2 defective bulbs in this sample — the single most likely outcome for this scenario, since μ = 20 × 0.10 = 2 defectives on average, with σ = √(20 × 0.10 × 0.90) ≈ 1.34. A sample that turned up, say, 7 or 8 defectives would sit roughly 3.7 to 4.5 standard deviations above that average — reason enough to suspect the 10% defect-rate assumption itself, not just bad luck.

Try the Calculator

Enter n = 20, p = 0.10, k = 2, and mode “Exactly” to reproduce this result, or switch to “At most” or “At least” to check a cumulative question instead.

Calculator

Binomial Distribution Calculator

Enter values and compute the result.

For a larger view with the same three modes, open the full binomial distribution calculator.

How Does the Geometric Distribution Differ From the Binomial Distribution?

The geometric distribution is built from the same Bernoulli trials as the binomial, but it answers a different question entirely. Instead of fixing n and counting successes, the geometric distribution counts how many trials it takes to reach the first success, with no fixed stopping point in advance. OpenStax’s Introductory Statistics 2e defines its probability mass function as:

P(X = k) = (1 − p)^(k − 1) × p     for k = 1, 2, 3, ...

where k is the trial number on which the first success lands. Its mean is 1/p and its variance is (1 − p)/p² — both grow as p shrinks, which makes sense: a rarer success means a longer expected wait.

Example. A salesperson closes 20% of calls (p = 0.2). What’s the probability the first sale happens on exactly the 5th call?

P(X = 5) = (0.8)^4 × 0.2 = 0.4096 × 0.2 ≈ 0.0819

About an 8.2% probability the first sale lands precisely on call 5. The expected number of calls until that first sale is 1/0.2 = 5 calls, and the probability the first sale happens somewhere within the first 5 calls is 1 − (1 − p)^5 = 1 − 0.8^5 ≈ 0.6723, or 67.2%.

Binomial distribution vs. geometric distribution
Feature Binomial Geometric
Question asked How many successes in n trials? How many trials until the first success?
Number of trials Fixed, known in advance (n) Random — the variable itself
Random variable Count of successes, 0 to n Trial index of the first success, 1, 2, 3, …
Mean n × p 1 / p
Variance n × p × (1 − p) (1 − p) / p²

Both distributions need independent Bernoulli trials with a constant p — the distinction is entirely in what gets counted. “Flip 10 times and count heads” is binomial; “flip until the first head and count the flips” is geometric. The geometric distribution is also the discrete sibling of the exponential distribution: both model a wait for a first event and both carry the memoryless property, where the probability of waiting further doesn’t depend on how long you’ve already waited.

The geometric distribution shows up anywhere the question is “how long until the first X,” rather than “how many Xs in a fixed window.” A quality-control line asking how many units get inspected before the first defect turns up, a subscription business asking how many billing cycles pass before a customer’s first cancellation, and a search algorithm’s expected number of probes before the first match in a random list are all geometric setups rather than binomial ones — none of them fix n in advance.

What Are Real-World Applications of the Binomial Distribution?

The binomial model shows up anywhere trials are independent, outcomes are binary, and the success probability holds steady:

  • Clinical trials. If a treatment has a 60% response rate and is given to 30 patients, the binomial distribution gives the probability that at least 20 respond, which feeds directly into study-power calculations.
  • Quality control. Acceptance-sampling plans use cumulative binomial probabilities to decide whether a production lot passes or fails inspection based on a sample count of defects.
  • Genetics. Under Mendelian inheritance, a cross between two heterozygous parents gives each offspring a fixed 3/4 probability of the dominant phenotype — independent trials with constant p, a textbook binomial setup.
  • Polling. When a sample is small relative to the population, binary survey answers (agree/disagree) behave like independent Bernoulli trials, and the binomial model governs the resulting counts.
  • Finance. Binomial-tree option-pricing models assume a stock price moves up with probability p or down with probability 1 − p at each discrete step.
  • A/B testing. Each website visitor either converts or doesn’t on a fixed-size sample of traffic, so the binomial distribution underlies the significance tests used to compare conversion rates between two page variants.

Not every counting problem is binomial, though. Drawing cards from a deck without replacement, or inspecting every unit in a small finite lot, breaks the independence condition — that’s hypergeometric distribution territory instead. And counting rare events over a continuous stretch of time or space, like customer arrivals per hour, fits the Poisson distribution better, since there’s no natural “n” to fix in advance.

How Do You Calculate Binomial and Geometric Probabilities in Excel, Python, and R?

Excel:   =BINOM.DIST(k, n, p, FALSE)     exact P(X = k)
         =BINOM.DIST(k, n, p, TRUE)      cumulative P(X <= k)

Python:  from scipy.stats import binom, geom
         binom.pmf(k, n, p)               # exact P(X = k)
         binom.cdf(k, n, p)                # cumulative P(X <= k)
         geom.pmf(k, p)                    # geometric, trial-count form, k >= 1

R:       dbinom(k, size = n, prob = p)     # exact P(X = k)
         pbinom(k, size = n, prob = p)     # cumulative P(X <= k)
         dgeom(x, prob = p)                # geometric, failure-count form, x >= 0

Microsoft’s documentation for BINOM.DIST confirms the fourth argument switches between the exact probability mass function and the cumulative distribution function. SciPy’s scipy.stats.binom reference and scipy.stats.geom reference document the pmf, cdf, and sf methods for each. R’s documentation for the binomial distribution functions and the geometric distribution functions cover dbinom/pbinom/qbinom and dgeom/pgeom/qgeom respectively — and flag the failure-count parameterization called out in the callout above.

Common Mistakes When Using the Binomial Distribution

  • Using the exact formula when a cumulative one is needed. “Exactly 5” and “at most 5” are different quantities with different formulas; read the question’s wording (“exactly,” “at most,” “fewer than,” “at least”) before picking one.
  • Assuming independence when sampling without replacement. Drawing items from a finite pool without replacing them changes p after each draw. The hypergeometric distribution is the correct model unless the sample is small relative to the population (a common rule of thumb: under 10%).
  • Treating Bernoulli’s distribution as unrelated to the binomial. It’s the n = 1 case, full stop — the formulas are identical once you substitute n = 1.
  • Conflating the geometric and binomial distributions. Fixed n and counting successes is binomial; no fixed n and counting trials to the first success is geometric. The formulas, means, and variances for the two are genuinely different.
  • Misapplying the normal approximation. It needs both n × p ≥ 5 and n × (1 − p) ≥ 5 to be reliable; for small n or extreme p, use the exact binomial formula or the calculator above instead.
  • Forgetting that p must stay fixed across trials. If a real-world success probability drifts — a machine wearing down over a production run, a sales rep improving with practice — the binomial model no longer applies cleanly, even though the trials still look independent and binary on the surface.
  • Mixing up the two geometric distribution parameterizations. Python’s SciPy counts the trial number of the first success starting at 1; R’s base functions count the number of failures before it, starting at 0. Confirm which convention a tool uses before trusting its mean or variance output.

Statohub’s Take on the Binomial Distribution

Statohub’s position is that the binomial distribution earns its reputation as the workhorse discrete model honestly — four conditions, one formula, and a huge share of real binary-outcome problems satisfy all four. The discipline worth building is checking those four conditions explicitly before calculating, and reading the question’s wording carefully enough to know whether it’s asking for an exact count or a cumulative one. Both habits prevent the two most common binomial errors long before any arithmetic happens.

Put the Binomial Distribution to Work With Statohub’s Tools

The calculator above handles exact, at-most, and at-least binomial probabilities directly — enter n, p, and k, and it returns the result in whichever mode you need. A standalone version with the same three modes lives at the full binomial distribution calculator page. The Probability & Distributions hub rounds out the neighboring models: the normal distribution this one approximates at large n, the exponential distribution the geometric distribution parallels, and the probability formula guide for the addition, multiplication, and expected-value rules every binomial calculation still obeys. Statohub’s full calculators hub covers every other probability and statistics tool on the site.

Sources

Sources

  1. NIST/SEMATECH e-Handbook of Statistical Methods — 1.3.6.6.18. Binomial Distribution NIST
  2. OpenStax — 4.3 Binomial Distribution, Introductory Statistics 2e OpenStax
  3. OpenStax — 4.4 Geometric Distribution, Introductory Statistics 2e OpenStax
  4. SciPy — scipy.stats.binom reference SciPy
  5. SciPy — scipy.stats.geom reference SciPy
  6. The R Project — stats::Binomial documentation The R Project
  7. The R Project — stats::Geometric documentation The R Project
  8. Microsoft Support — BINOM.DIST function Microsoft
  9. MacTutor History of Mathematics, University of St Andrews — Jacob Bernoulli biography University of St Andrews

FAQ

Frequently asked questions

What is the binomial distribution?
The binomial distribution gives the probability of observing exactly k successes in n independent trials, each with a constant success probability p. It is one of the most widely used discrete probability distributions, applying any time you count binary outcomes across a fixed number of trials.
What is the binomial distribution formula?
The probability of exactly k successes is P(X = k) = C(n, k) × pᵏ × (1 − p)ⁿ⁻ᵏ, where C(n, k) = n! / (k! × (n − k)!) is the binomial coefficient. This binomial distribution formula multiplies the number of ways to arrange k successes by the probability of each specific arrangement occurring.
How is Bernoulli's distribution related to the binomial distribution?
Bernoulli's distribution is the n = 1 special case of the binomial distribution: a single trial that returns 1 (success) with probability p or 0 (failure) with probability 1 − p. Summing n independent Bernoulli(p) trials produces a full B(n, p) binomial variable, so every binomial experiment is really a sequence of Bernoulli trials.
How does the geometric distribution differ from the binomial distribution?
The geometric distribution counts how many trials are needed to reach the first success, making the trial count itself random. The binomial distribution counts how many successes occur across a fixed number of trials n. Both rely on independent Bernoulli trials with constant p, but a fixed n with binomial distribution formulas, versus no fixed n with the geometric distribution formula, means they answer different questions and should not be swapped.
What are the binomial distribution formulas for cumulative probability?
There are three: P(X = k) for an exact count, P(X ≤ k) as the sum of P(X = i) for i from 0 to k for "at most k," and P(X ≥ k) = 1 − P(X ≤ k − 1) for "at least k." These binomial distribution formulas are sums of the same underlying probability mass function, and the calculator above applies whichever one matches the mode you select.
When can I use the normal approximation to the binomial distribution?
The normal approximation is reliable when both n × p ≥ 5 and n × (1 − p) ≥ 5. Under those conditions, B(n, p) is approximately normal with mean np and variance np(1 − p), and a ±0.5 continuity correction improves accuracy. For small n or p near 0 or 1, use the exact binomial formula instead.