Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Binomial Distribution






Binomial Distribution: Repeated Trials with Fixed Count


The binomial distribution arises from repeating the same Bernoulli experiment a fixed number of times under identical conditions. Each trial is independent, each has exactly two outcomes (success or failure), and the probability of success remains constant across trials. The experiment does not ask when success happens, but rather how many successes occur in the predetermined number of trials.

Key Terms

Binomial Distribution— counts successes in nn independent Bernoulli trials
Bernoulli Experiment— the single trial underlying each binomial count
Bernoulli Distribution— the n=1n=1 special case of the binomial
Sequence of Bernoulli Trials— the repeated structure of the binomial
Moment Generating Function— MX(t)=E[etX]M_X(t) = E[e^{tX}], encodes all moments
Expected Value— E[X]=npE[X] = np
Variance— Var⁡(X)=np(1−p)\operatorname{Var}(X) = np(1-p)

See All Probability Definitions →


The Probabilistic Experiment Behind binomial distribution

Four experiments each count successes. Which of the counts behaves like the number of heads in coin flips?
Each one repeats a try whose result is yes or no, and counts the yeses.
Only the coin flips meet every condition.
what is countedtrials fixed?same p?independent?binomial?
heads in 10 coin flipsyesyesyesyes
hearts in 5 cards dealt without replacementyesnonono
flips until the first headnoyesyesno
baskets in 20 shots by a tiring playeryesnoyesno
Each failure breaks one condition: a changing p, trials that affect each other, or a number of trials not fixed in advance.
Without replacement, the chance of a heart changes after every card. Flipping until the first head lets the coin decide how many trials there are. A tiring player's chance falls from shot to shot.
The definition
The binomial distribution gives the number of successes in nn independent trials, each with the same probability pp of success.
The binomial distribution models the number of successes obtained when the same experiment is repeated a fixed number of times under identical conditions. Each repetition — called a Bernoulli trial — has only two outcomes (success or failure), and the probability of success remains constant across trials. Crucially, the trials are independent.
So the number of heads in 1010 flips of a fair coin has a binomial distribution with n=10n = 10 and p=12p = \frac{1}{2}.
A binomial count records how many successes occur, never when.
What distinguishes the binomial distribution is that the number of trials is fixed in advance, and the random variable counts how many successes occur, not when they occur. The order of outcomes does not matter, only the total count does. This makes the binomial distribution a natural model for controlled, repeatable processes.

Example
Flipping a coin 1010 times and counting how many times it lands heads. Each flip is independent, the probability of heads stays the same, and the total number of flips is fixed before starting.
The model breaks as soon as one condition fails.
The binomial distribution captures variability caused by chance alone when conditions are stable. It breaks down if probabilities change from trial to trial, if trials influence each other, or if the number of trials is not predetermined.
The binomial needs all four: a fixed number of trials, two outcomes, a constant pp and independence.
The rest of the page covers notation, the parameters, the PMF and support, and the distribution's properties, examples and calculations.

Binomial Notation

Notation

Binomial Notation

The binomial's marks are the family-declaration convention at its busiest: three spellings of the family name, a standing abbreviation for failure, and a pmf line that carries its own domain and its own parameter punctuation. All of them are catalogued among the probability symbols.
The declaration tilde and the capital/lowercase split come from random variable notation and distribution notation; the coefficient's spellings and its not-a-fraction stack from binomial coefficient notation; E[X]E[X] and Var⁡(X)\operatorname{Var}(X) — here npnp and npqnpq, derived in Expected Value and Variance below — from expected value and variance notation.
X∼Bin⁡(n,p)X \sim \operatorname{Bin}(n, p)
X follows a binomial distribution with n trials and success probability p
Three spellings of one family name: Bin⁡(n,p)\operatorname{Bin}(n,p) the standard abbreviation, Binomial⁡(n,p)\operatorname{Binomial}(n,p) written out when explicitness matters, and B(n,p)B(n,p) — common in school and exam-board texts. The argument order is fixed: trials first, success probability second, and the naked family name denotes the distribution itself while X∼X \sim attaches it to a variable.
Also writtenBi⁡(n,p)\operatorname{Bi}(n,p) in some older texts; the single-trial case drops to Bern⁡(p)\operatorname{Bern}(p) — the Bernoulli member the Expected Value derivation below decomposes into.
Do not confuseThe Beta function. Capital B(a,b)B(a, b) already names Euler's Beta in the same probabilistic neighborhood — the letter alone cannot say which is meant, which is why Bin⁡\operatorname{Bin} is the safer spelling wherever both objects circulate.
q=1−pq = 1 - p
q — the failure probability, one minus p
A standing abbreviation, not a new parameter: once pp is fixed, qq is determined, and the letter exists purely to compress formulas — the pmf's tail becomes qn−kq^{n-k} and the variance reads npqnpq instead of np(1−p)np(1-p).
CasesThe convention travels with the whole trials family — geometric and negative binomial formulas lean on the same qq — so a reader meeting qq cold should first look for the pp it silently complements.
Do not confuseA free parameter. Nothing is ever declared Bin⁡(n,p,q)\operatorname{Bin}(n, p, q) — writing qq into a declaration double-counts one degree of freedom; qq appears only inside formulas, always on pp's leash.
P(X=k)=(nk)pkqn−k,  k=0,…,nP(X{=}k) = \binom{n}{k} p^k q^{n-k},\ \ k = 0, \ldots, n
the pmf — with its domain riding on the same line
The trailing clause k=0,…,nk = 0, \ldots, n is part of the statement, not an afterthought: a pmf line carries its own support, and outside that list the probability is zero by convention. The three-factor logic is Probability Mass Function territory below; the coefficient's competing spellings belong to binomial coefficient notation.
Also writtenStatistics texts write P(k; n,p)P(k;\, n, p) — the semicolon fences the value off from the parameters: what stands left of it varies, what stands right of it is fixed by the model.
Do not confuseThe comma's job. In P(k;n,p)P(k; n, p) the semicolon separates a value from parameters; a comma in that position — P(k,n,p)P(k, n, p) — would read as a joint probability of three random quantities, a completely different claim one keystroke away.
DownloadPNG2×PDF
Notation · Cheat sheet
Distribution Notation at a Glance
The marks from the notation cards across the distribution pages: how each is read and what it means. Every group links to the full card on its page.
Distributions
(Ω,F,P)(\Omega, \mathcal{F}, \mathbb{P})
a probability space
Outcomes, events, and the probability measure.
PX(A)\mathbb{P}_X(A)
the distribution of X
Equals P(X∈A)\mathbb{P}(X \in A).
X=dYX \overset{d}{=} Y
equal in distribution
Same law, not necessarily the same values.
BinomialThis page
X∼Bin⁡(n,p)X \sim \operatorname{Bin}(n, p)
binomial, n trials, p
The number of successes in nn independent trials.
q=1−pq = 1 - p
q, the failure probability
An abbreviation, not a new parameter.
Geometric
Geom⁡(p)\operatorname{Geom}(p)
geometric with p
Two conventions: count trials, or count failures.
qk−1pq^{k-1}p vs qkpq^k p
the two pmfs
The exponent shows which convention is in use.
Negative binomial
NB⁡(r,p)\operatorname{NB}(r, p)
negative binomial
Trials until the rr-th success.
k=r,r+1,…k = r, r{+}1, \ldots
the support starts at r
Fewer trials cannot hold rr successes.
Hypergeometric
Hyp⁡(N,K,n)\operatorname{Hyp}(N, K, n)
hypergeometric
Population NN with KK successes; nn draws without replacement.
(Kk)(N−Kn−k)(Nn)\frac{\binom{K}{k}\binom{N-K}{n-k}}{\binom{N}{n}}
the pmf
Successes chosen, failures chosen, over all samples.
Poisson
Pois⁡(λ)\operatorname{Pois}(\lambda)
Poisson with rate lambda
Counts of events in a window.
λ\lambda
lambda
The expected count per window; it depends on the window size.
Discrete uniform
DU⁡(a,b)\operatorname{DU}(a, b)
discrete uniform
Each integer from aa to bb equally likely.
1b−a+1\frac{1}{b - a + 1}
one over the count
The +1+1 counts both endpoints.
Continuous uniform
X∼U(a,b)X \sim U(a, b)
uniform from a to b
The slots are the endpoints, not a centre and a spread.
1b−a\frac{1}{b - a}
one over the width
A flat density; no +1+1 here.
Exponential
Exp⁡(λ)\operatorname{Exp}(\lambda)
exponential with rate lambda
Some books put the scale β=1λ\beta = \frac{1}{\lambda} in the slot.
P(X>x)=e−λxP(X > x) = e^{-\lambda x}
the survival tail
The chance of waiting longer than xx.
Normal
N(μ,σ2)N(\mu, \sigma^2)
normal, mean mu
Second slot: usually the variance; some texts use σ\sigma.
Z∼N(0,1)Z \sim N(0, 1)
capital Z, standard normal
A score z=x−μσz = \frac{x - \mu}{\sigma} counts standard deviations.
φ(z),  Φ(z)\varphi(z), \; \Phi(z)
phi; capital Phi
The standard normal density and its CDF.
Same marks, different job
N(μ,σ2)N(\mu, \sigma^2)Check whether the second slot is the variance or the standard deviation.
Exp⁡(λ)\operatorname{Exp}(\lambda)Rate or scale: the two readings give means 1λ\frac{1}{\lambda} and λ\lambda.
U(a,b)U(a, b) vs DU⁡(a,b)\operatorname{DU}(a, b)Width b−ab - a against a count of b−a+1b - a + 1 values.
Φ\Phi vs φ\varphiCapital is the CDF, lowercase the density.
Distribution Notation at a Glance·/probability/distributionsLearn Math Class

Parameters


nn : fixed number of independent trials;

pp : probability of success in each trial;

This distribution models the number of successes when repeating the same binary experiment nn times under identical conditions. The two parameters fully describe the setup:

nn gives the structure — how many attempts, and pp defines the behavior of each — what chance success has.

It's useful to compare with the negative binomial, where instead of fixing how many trials you run, you fix how many successes you want and ask: how many trials will it take? Both deal with repeated binary outcomes, but what's held constant — trials vs. successes — flips.
Binomial PMFs with n = 10 and p = 0.2, 0.5, 0.8: the peak sits near np and the skew flips with pky12345678910p = 0.2: peak near 2, tail to the rightp = 0.5: symmetric about 5p = 0.8: mirror image of p = 0.2n fixes the range 0 to 10; p moves the peak to about np
How p shapes a binomial with n = 10

Three binomial distributions with the same n = 10, so the same possible values 0 to 10, and different p. With p = 0.2 (blue) the probabilities pile up near 2 with a tail to the right; with p = 0.5 (navy) they are symmetric about 5; with p = 0.8 (amber) the picture is the mirror image of p = 0.2. In each case the peak sits near the mean np: n sets the range, p sets where the mass goes.

With n = 10 the mean np is 2, 5 and 8 for the three curves, right where they peak.

Probability Mass Function (PMF) and Support (Range)


The probability mass function (PMF) of a binomial distribution is given by:

Binomial PMF
P(X=k)=(nk)pk(1−p)n−k,k=0,1,2,…,nP(X = k) = \binom{n}{k} p^k (1-p)^{n-k}, \quad k = 0, 1, 2, \ldots, n
Learn more about this formula: Binomial PMF →


where (nk)=n!k!(n−k)!\binom{n}{k} = \frac{n!}{k!(n-k)!} is the binomial coefficient.

Fixed Number of Trials: The binomial distribution models the number of successes in nn independent trials, where each trial has only two possible outcomes: success or failure.

Support (Range of the Random Variable):
* The random variable XX can take on values from 00 to nn (inclusive).
* These represent the possible number of successes: 0,1,2,…,n0, 1, 2, \ldots, n.
* The support is thus a finite set of n+1n+1 non-negative integers.

Logic Behind the Formula:
* (nk)\binom{n}{k}: The number of ways to choose kk successes from nn trials
* pkp^k: The probability that kk given trials all succeed
* (1−p)n−k(1-p)^{n-k}: The probability that the other n−kn-k trials all fail
* The total probability sums to 1:

∑k=0nP(X=k)=∑k=0n(nk)pk(1−p)n−k=1\sum_{k=0}^{n} P(X = k) = \sum_{k=0}^{n} \binom{n}{k} p^k (1-p)^{n-k} = 1

* This follows from the binomial theorem: (p+(1−p))n=1n=1(p + (1-p))^n = 1^n = 1

Binomial Distribution

Successes in n independent trials with probability p each

Explanation

The binomial distribution models the number of successes in nn independent trials, each with probability pp of success. The probability mass function is P(X=k)=(nk)pk(1−p)n−kP(X = k) = \binom{n}{k} p^k (1-p)^{n-k}, where (nk)\binom{n}{k} is the binomial coefficient. The expected value is E[X]=npE[X] = np and the variance is Var(X)=np(1−p)\text{Var}(X) = np(1-p). This distribution is commonly used for modeling coin flips (number of heads in nn tosses), quality control testing (defective items in a batch), and clinical trial success rates.

0.0000.0500.1000.1500.2000.250012345678910Value (k)Probability P(X = k)
Binomial PMF, n = 10, p = 0.5

The bars run from 0 to 10 successes and peak at 5, the value of np; with p equal to one half the pattern is symmetric, and each height is the binomial coefficient times p to the k times (1 minus p) to the n minus k. Move p away from one half and watch the peak slide and the bars lean on the PMF visualizer.

Summing these bars from the left gives the CDF.
Every binomial probability is the number of orders times the chance of one order.

Cumulative Distribution Function (CDF)


The cumulative distribution function (CDF) of a binomial distribution is given by:

Cumulative Distribution Function (CDF)
FX(k)=P(X≤k)=∑i=0k(ni)pi(1−p)n−iF_X(k) = P(X \leq k) = \sum_{i=0}^{k} \binom{n}{i} p^i (1-p)^{n-i}

Where:
nn = number of trials
pp = probability of success on each trial
kk = number of successes (where 0≤k≤n0 \leq k \leq n)
(ni)\binom{n}{i} = binomial coefficient "nn choose ii"

Intuition Behind the Formula


Definition: The CDF gives the probability of observing kk or fewer successes in nn trials.

Summation of Probabilities:
Since we want the probability of getting at most kk successes, we sum the individual probabilities from 0 successes up to kk successes:

Cumulative Distribution Function (CDF)
P(X≤k)=P(X=0)+P(X=1)+P(X=2)+⋯+P(X=k)P(X \leq k) = P(X=0) + P(X=1) + P(X=2) + \cdots + P(X=k)

Discrete Nature: Unlike continuous distributions, the binomial CDF is a step function that jumps at each integer value from 0 to nn. Between integers, the CDF remains constant.

Complementary Probabilities:
For calculations involving "more than kk successes," use:
Cumulative Distribution Function (CDF)
P(X>k)=1−P(X≤k)=1−FX(k)P(X > k) = 1 - P(X \leq k) = 1 - F_X(k)

For "at least kk successes":
Cumulative Distribution Function (CDF)
P(X≥k)=1−P(X≤k−1)=1−FX(k−1)P(X \geq k) = 1 - P(X \leq k-1) = 1 - F_X(k-1)

Pitfall: Treating at least as more than
For n=5n = 5, p=0.5p = 0.5, writing P(X≥3)=1−FX(3)=1−2632=632P(X \geq 3) = 1 - F_X(3) = 1 - \frac{26}{32} = \frac{6}{32} drops the 1010 sequences with exactly 33 successes. The right cut is 1−FX(2)=1−1632=121 - F_X(2) = 1 - \frac{16}{32} = \frac{1}{2}.

The two complement rules look almost the same, and the whole difference between them is one value of kk. A binomial count takes only whole-number values, so the wording of a question decides exactly which counts are kept: "more than", "at least", "fewer than" and "at most" each draw the line at a different place. The complement is taken on the other side of that line, and the CDF is read at the last count that falls outside the event. For a continuous variable a single point carries no probability and this bookkeeping would not matter; for the binomial, each count carries its own share of the total.

Binomial Distribution CDF

CDF for successes in n independent trials

CDF Explanation

The binomial CDF is F(k)=P(X≤k)=∑i=0k(ni)pi(1−p)n−iF(k) = P(X \leq k) = \sum_{i=0}^{k} \binom{n}{i} p^i (1-p)^{n-i}. This represents the probability of getting kk or fewer successes in nn trials. The CDF starts at F(0)=(1−p)nF(0) = (1-p)^n (the probability of zero successes) and increases with each additional possible outcome, reaching 1.0 at k=nk = n. The shape of the CDF reflects the underlying binomial distribution: symmetric when p=0.5p = 0.5, right-skewed when p<0.5p < 0.5, and left-skewed when p>0.5p > 0.5.
0.00.20.40.60.81.0012345678910Value (k)Cumulative Probability F(k)
Binomial CDF, n = 10, p = 0.5

The staircase adds the PMF bars from the left: each step at k rises by P(X = k), so F(k) is the probability of at most k successes and reaches 1 at k equal to n. The steps are largest around the mean, where the PMF peaks. Read P(X ≤ k) at any step on the discrete CDF explorer.

The expected value comes from the same bars.

Expected Value (Mean)


As explained in the general case for calculating expected value, the expected value of a discrete random variable is computed as a weighted sum where each possible value is multiplied by its probability:

Expected Value (Discrete)
E[X]=∑xx⋅P(X=x)E[X] = \sum_{x} x \cdot P(X = x)
Learn more about this formula: Expected Value (Discrete) →


For the binomial distribution, we apply this general formula to the specific probability mass function of this distribution.

Formula


Binomial Mean
E[X]=npE[X] = np
Learn more about this formula: Binomial Mean →


Where:
nn = number of independent trials
pp = probability of success on each trial

Derivation and Intuition


The binomial random variable XX can be expressed as the sum of nn independent Bernoulli random variables: X=X1+X2+⋯+XnX = X_1 + X_2 + \cdots + X_n, where each XiX_i represents the outcome of trial ii (1 for success, 0 for failure).

Each Bernoulli variable has expected value E[Xi]=pE[X_i] = p.

By the linearity of expectation:

Expected Value (Mean)
E[X]=E[X1+X2+⋯+Xn]=E[X1]+E[X2]+⋯+E[Xn]=p+p+⋯+p=npE[X] = E[X_1 + X_2 + \cdots + X_n] = E[X_1] + E[X_2] + \cdots + E[X_n] = p + p + \cdots + p = np
The linearity argument above, one equality at a time, each with the fact it uses.
DownloadPNG2×PDF
ShowE[X]=npE[X] = np
1
E[X]=E[X1+X2+⋯+Xn]E[X] = E[X_1 + X_2 + \cdots + X_n]
decomposeXX is the sum of nn independent Bernoulli variables, Xi=1X_i = 1 for a success on trial ii and 00 for a failure
2
=E[X1]+E[X2]+⋯+E[Xn]= E[X_1] + E[X_2] + \cdots + E[X_n]
key stepLinearity of expectation
3
=p+p+⋯+p= p + p + \cdots + p
BernoulliEach Bernoulli variable has expected value E[Xi]=pE[X_i] = p
4
=np= np
countnn equal terms
E[X]=npE[X] = np
Deriving the binomial meanLearn Math Class
The gold step does the work: linearity turns one expectation of a sum into nn expectations of single trials, each equal to pp.
The result E[X]=npE[X] = np captures a simple and intuitive fact: if you perform nn trials, each with probability pp of success, you expect on average to get npnp successes. This is the most natural interpretation of "average number of successes."

Example


Consider flipping a fair coin 10 times, where n=10n = 10 and p=0.5p = 0.5:

Expected Value (Mean)
E[X]=10×0.5=5E[X] = 10 \times 0.5 = 5

Pitfall: Expecting exactly np successes
Reading E[X]=5E[X] = 5 as the number of heads ten flips will give overstates it: P(X=5)=2521024≈0.246P(X = 5) = \frac{252}{1024} \approx 0.246, so about three runs in four end with some other count.

The expected number of heads in 10 flips is 5, which aligns perfectly with our intuition about a fair coin.

The expected value describes the long run: if the ten flips were repeated many times, the count of heads would vary from one run to the next, and the average of those counts would settle near 55. A single run of ten flips can end with any count from 00 to 1010, and the PMF gives the chance of each.

To compute the expected value of a binomial distribution for your own parameters, step by step, use the binomial expected value calculator.

Variance and Standard Deviation


The variance of a discrete random variable measures how spread out the values are around the expected value. It is computed as:

Variance and Standard Deviation
Var(X)=E[(X−μ)2]=∑x(x−μ)2P(X=x)\mathrm{Var}(X) = \mathbb{E}[(X - \mu)^2] = \sum_{x} (x - \mu)^2 P(X = x)

Or using the shortcut formula:

Variance and Standard Deviation
Var(X)=E[X2]−μ2\mathrm{Var}(X) = \mathbb{E}[X^2] - \mu^2

For the binomial distribution, we apply this formula to derive the variance.

Formula


Binomial Variance
Var(X)=np(1−p)\mathrm{Var}(X) = np(1-p)
Learn more about this formula: Binomial Variance →


Where:
nn = number of independent trials
pp = probability of success on each trial
(1−p)=q(1-p) = q = probability of failure on each trial

Derivation and Intuition


Since the binomial random variable can be expressed as the sum of nn independent Bernoulli variables: X=X1+X2+⋯+XnX = X_1 + X_2 + \cdots + X_n, and for independent variables variances add:

Variance and Standard Deviation
Var(X)=Var(X1)+Var(X2)+⋯+Var(Xn)\mathrm{Var}(X) = \mathrm{Var}(X_1) + \mathrm{Var}(X_2) + \cdots + \mathrm{Var}(X_n)

Each Bernoulli variable has variance Var(Xi)=p(1−p)\mathrm{Var}(X_i) = p(1-p).

Therefore:

Binomial Variance
Var(X)=np(1−p)\mathrm{Var}(X) = np(1-p)
Learn more about this formula: Binomial Variance →

The same decomposition used for the variance, line by line with the reason for each.
DownloadPNG2×PDF
ShowVar(X)=np(1−p)\mathrm{Var}(X) = np(1-p)
1
X=X1+X2+⋯+XnX = X_1 + X_2 + \cdots + X_n
decomposeThe binomial variable is a sum of nn independent Bernoulli variables
2
Var(X)=Var(X1)+Var(X2)+⋯+Var(Xn)\mathrm{Var}(X) = \mathrm{Var}(X_1) + \mathrm{Var}(X_2) + \cdots + \mathrm{Var}(X_n)
key stepFor independent variables, variances add
3
Var(Xi)=p(1−p)\mathrm{Var}(X_i) = p(1-p)
BernoulliThe variance of each Bernoulli variable
4
Var(X)=np(1−p)\mathrm{Var}(X) = np(1-p)
countnn equal terms
Var(X)=np(1−p)\mathrm{Var}(X) = np(1-p)
Deriving the binomial varianceLearn Math Class
The gold step needs independence: only because the trials are independent do the nn variances simply add.
The result Var(X)=np(1−p)\mathrm{Var}(X) = np(1-p) shows that variance depends on both the number of trials and the probability structure.

COROLLARY
The term p(1−p)p(1-p) is maximized when p=0.5p = 0.5 (a fair coin), meaning maximum variability occurs when success and failure are equally likely.

As pp approaches 0 or 1, variance decreases because outcomes become more predictable.

Standard Deviation


Variance and Standard Deviation
σ=np(1−p)\sigma = \sqrt{np(1-p)}

Example


Consider flipping a fair coin 100 times, where n=100n = 100 and p=0.5p = 0.5:

Variance and Standard Deviation
Var(X)=100×0.5×0.5=25\mathrm{Var}(X) = 100 \times 0.5 \times 0.5 = 25

Variance and Standard Deviation
σ=25=5\sigma = \sqrt{25} = 5

The variance of 25 and standard deviation of 5 indicate that while we expect 50 heads on average, typical outcomes will deviate by about 5 heads in either direction.

Did you know: Bernoulli asked for 25,550 draws
In 1713 Jacob Bernoulli showed that 25,550 draws from an urn with 3 white balls in every 5 make it 1000 to 1 that the white share lands within 150\frac{1}{50} of 35\frac{3}{5}. His bound was loose: the binomial variance shows that about 6,500 draws already do it.

Dividing the count by nn turns it into the proportion of successes, Xn\frac{X}{n}, whose standard deviation is p(1−p)n\sqrt{\frac{p(1-p)}{n}}. This shrinks as the trials pile up: the count of heads strays further from npnp in absolute terms, while the share of heads closes in on pp. The same formula tells how many trials a given precision needs, since halving the spread of the proportion takes four times as many trials.

The count spreads only like n\sqrt{n}, so the proportion of successes tightens around pp as trials accumulate.

Mode and Median

Mode


The mode is the value of kk (number of successes) with the highest probability—the peak of the PMF.

For the binomial distribution, the mode depends on (n+1)p(n+1)p:

If (n+1)p(n+1)p is an integer:
The distribution has two modes: (n+1)p−1(n+1)p - 1 and (n+1)p(n+1)p

If (n+1)p(n+1)p is not an integer:
The mode is ⌊(n+1)p⌋\lfloor (n+1)p \rfloor (the floor of (n+1)p(n+1)p)

Binomial Mode
Mode=⌊(n+1)p⌋\text{Mode} = \lfloor (n+1)p \rfloor
Learn more about this formula: Binomial Mode →


Intuition: The mode sits near the expected value npnp, representing the most likely number of successes. When p=0.5p = 0.5, the distribution is symmetric and the mode equals the mean (for appropriate nn). As pp moves toward 0 or 1, the mode shifts accordingly.

Example
For n=10n = 10 and p=0.3p = 0.3:
(n+1)p=11×0.3=3.3(n+1)p = 11 \times 0.3 = 3.3
Mode = ⌊3.3⌋=3\lfloor 3.3 \rfloor = 3
Getting exactly 3 successes is more likely than any other outcome.

Example
For n=9n = 9 and p=0.5p = 0.5:
(n+1)p=10×0.5=5(n+1)p = 10 \times 0.5 = 5 (integer)
Modes = 4 and 5 (both equally likely)

Did you know: Exactly half heads gets rarer
100 fair flips give exactly 50 heads only about 8% of the time, and 10,000 flips give exactly 5,000 heads less than 1% of the time. The spread grows like n\sqrt{n}, so the tallest bar shrinks like 1n\frac{1}{\sqrt{n}}.

For a fair coin and an even number of flips nn, the mode is n2\frac{n}{2}: exactly half heads is the single most likely count. As nn grows, the mode stays in the middle of the PMF, but the bars spread over the n+1n + 1 possible counts from 00 to nn, while the total height of all the bars is always 11. What changes is how tall the tallest bar can remain.

Median


The median is the value mm such that P(X≤m)≥0.5P(X \leq m) \geq 0.5 and P(X≥m)≥0.5P(X \geq m) \geq 0.5.

For the binomial distribution, there is no simple closed-form expression for the median, but it can be found numerically by solving:

Mode and Median
∑k=0m(nk)pk(1−p)n−k≥0.5\sum_{k=0}^{m} \binom{n}{k} p^k (1-p)^{n-k} \geq 0.5

Properties of the median:
• The median is always within one unit of the mean npnp
• For symmetric cases (p=0.5p = 0.5) with even nn, median = mode = mean
• For skewed distributions, median lies between mean and mode

Example
For n=10n = 10 and p=0.5p = 0.5:
Mean = 10×0.5=510 \times 0.5 = 5
The median is also 5 (by symmetry)

Example
For n=10n = 10 and p=0.3p = 0.3:
Mean = 10×0.3=310 \times 0.3 = 3
The median is also 3 (close to the mean)

Unlike continuous distributions where finding the median requires integration, for discrete distributions like binomial, the median is found by summing probabilities until reaching 0.5.

Binomial PMF with n = 9, p = 0.5: k = 4 and k = 5 are equally likely, about 0.246 each, so there are two modesky12345678910(n + 1)p = 5 is an integer:modes 4 and 5, 0.246 eachn = 9, p = 0.5: two equal tallest bars, two modes
A binomial with two modes

The section’s second example, n = 9 and p = 0.5. Here (n + 1)p = 5 is an integer, and the two amber bars at k = 4 and k = 5 have exactly the same height, about 0.246 each; no other value comes close. Both are modes. With n = 10 and p = 0.3, where (n + 1)p = 3.3 is not an integer, there would be a single tallest bar at 3.

Whenever (n + 1)p is a whole number, the binomial has two neighbouring modes.

Applications and Examples


Practical Example


Suppose you flip a fair coin n=5n = 5 times, where the probability of heads (success) is p=0.5p = 0.5. The probability of getting exactly k=3k = 3 heads is:

P(X=3)=(53)(0.5)3(0.5)5−3=10⋅0.125⋅0.25=0.3125P(X = 3) = \binom{5}{3} (0.5)^3 (0.5)^{5-3} = 10 \cdot 0.125 \cdot 0.25 = 0.3125

Pitfall: Dropping the binomial coefficient
Computing P(X=3)P(X = 3) as (0.5)3(0.5)2=0.03125(0.5)^3 (0.5)^2 = 0.03125 gives the chance of one sequence, such as HHHTT. There are (53)=10\binom{5}{3} = 10 such sequences, so P(X=3)=0.3125P(X = 3) = 0.3125.

This means there's a 31.25% chance of getting exactly 3 heads in 5 coin flips.

The possible outcomes range from k=0k = 0 (no heads) to k=5k = 5 (all heads), with probabilities determined by the formula above.

Every bar of the PMF is computed with the same three-factor product, whatever the values of nn, pp and kk. The question fixes how many successes are wanted; the formula then has to account for all the orders in which those successes can appear among the trials, not just the order in which they happen to be written down.
TTTH: 0, T: 3P = 1/8TTHH: 1, T: 2P = 1/8THTH: 1, T: 2P = 1/8THHH: 2, T: 1P = 1/8HTTH: 1, T: 2P = 1/8HTHH: 2, T: 1P = 1/8HHTH: 2, T: 1P = 1/8HHHH: 3, T: 0P = 1/8
Three tosses: eight sequences grouped by number of heads

A run of coin flips is a binomial experiment: with three tosses the eight equally likely sequences group into one way to get 0 heads, three ways for 1, three for 2 and one for 3, which are the binomial coefficients. The probability of exactly two heads is 3 over 8. Select a number of heads and count the matching sequences on the coin toss sample space explorer.

The calculator below handles any n and p.

Interactive Calculator


This interactive calculator computes probabilities for the binomial distribution, modeling the number of successes in a fixed number of independent trials. Enter your number of trials (nn), success probability (pp), and choose whether you want the full distribution or specific probabilities like P(X=k)P(X=k), P(X≤k)P(X≤k), or P(X≥k)P(X≥k). The calculator instantly shows you the probability distribution, mean, variance, and standard deviation.

1. Select the probability type you want to calculate (all values or specific query)
2. Enter n (number of trials) - must be a positive integer
3. Enter p (probability of success) - must be between 0 and 1
4. If using a specific query, enter k (target number of successes)
5. Click Calculate to see results

Binomial Distribution Calculator

Calculate probabilities and distribution properties

Total number of independent trials

Probability of success on each trial

,

Related Distributions


The binomial distribution sits at the centre of the discrete family. One relative is its building block, two are what it turns into as the number of trials grows, and the rest ask a different question about the same kind of trials.

Bernoulli: a single trial


A Bernoulli variable is one trial that gives 11 with probability pp and 00 otherwise, so it is the binomial with n=1n = 1. In the other direction, a binomial count is the sum of nn independent Bernoulli variables with the same pp. It follows that independent counts with the same pp add up to another binomial: if X∼Bin⁡(n1,p)X \sim \operatorname{Bin}(n_1, p) and Y∼Bin⁡(n2,p)Y \sim \operatorname{Bin}(n_2, p) are independent, then

Related Distributions
X+Y∼Bin⁡(n1+n2,p)X + Y \sim \operatorname{Bin}(n_1 + n_2, p)

Poisson: many trials, rare success


Let nn grow and pp shrink so that the mean npnp stays at a fixed value λ\lambda. The binomial probabilities then approach those of the Poisson distribution:

Related Distributions
(nk)pk(1−p)n−k→λke−λk!as n→∞ with np=λ\binom{n}{k} p^k (1-p)^{n-k} \to \frac{\lambda^k e^{-\lambda}}{k!} \quad \text{as } n \to \infty \text{ with } np = \lambda

With n=100n = 100 and p=0.04p = 0.04 the chance of no success is 0.96100≈0.01690.96^{100} \approx 0.0169, and the Poisson value with λ=4\lambda = 4 is e−4≈0.0183e^{-4} \approx 0.0183. The Poisson needs only the mean, which is why it replaces the binomial when nn is large and pp is small.

Normal: many trials, fixed chance


Keep pp fixed and let nn grow. The count spreads out around npnp and its bar chart takes the bell shape of the normal distribution with the same mean and variance:

Related Distributions
Bin⁡(n,p)≈N(np, np(1−p))\operatorname{Bin}(n, p) \approx N(np,\ np(1-p))

The fit is good when npnp and n(1−p)n(1-p) are both at least 1010. This is the central limit theorem applied to a sum of Bernoulli trials.

Hypergeometric: the same count without replacement


Draw nn items from a population of NN that holds KK successes. If each item is put back before the next draw, the number of successes is binomial with p=KNp = \frac{K}{N}. If items are not put back, it is hypergeometric. When NN is much larger than nn, removing a few items barely changes the mix, and the hypergeometric probabilities come close to the binomial ones.

Geometric and negative binomial: the same trials, counted differently


The binomial fixes the number of trials and counts the successes. The geometric distribution fixes one success and counts the trials needed to reach it, and the negative binomial does the same for rr successes. The two views answer one question in two ways, because the rr-th success arrives by trial nn exactly when the first nn trials hold at least rr successes. For Y∼NegBin⁡(r,p)Y \sim \operatorname{NegBin}(r, p) and X∼Bin⁡(n,p)X \sim \operatorname{Bin}(n, p):

Related Distributions
P(Y≤n)=P(X≥r)P(Y \leq n) = P(X \geq r)

Of these, the Poisson and normal links are used most: the first handles rare events, the second handles large counts where the exact sum is long to compute.

Binomial at a Glance

This summary gathers the binomial distribution on one card of ten rows. Each row names one part of the distribution with a line on what it gives and a link to the section that explains it, then states the formula or fact and adds a note or a worked number.

The first rows fix the setup: the number of trials, the chance of success on each, and the counts that can occur. Then come the probability of an exact count, the running total up to a count, the mean, the variance with the standard deviation, and the mode and median. The last rows give the single-trial special case, the Poisson approximation for rare events and the fair-coin example.
DownloadPNG2×PDF
AspectFormula or statementNote or example
ParametersThe two numbers that fix the whole distribution, as the parameters section explains.nn, the number of trials (a positive integer); p∈[0,1]p \in [0, 1], the success probability per trialtrials are independent; pp is constant across trials
SupportThe success counts that can occur, set out with the PMF and its support.k∈{0,1,2,…,n}k \in \{0, 1, 2, \ldots, n\}finite: exactly n+1n + 1 possible success counts
PMFThe probability of exactly kk successes, built factor by factor in the PMF section.P(X=k)=(nk)pk(1−p)n−k,k=0,1,2,…,n\displaystyle P(X = k) = \binom{n}{k} p^k (1-p)^{n-k}, \quad k = 0, 1, 2, \ldots, nways to arrange kk successes times the probability of one such sequence; sums to 11 by the binomial theorem
CDFThe probability of at most kk successes; the CDF section also turns it into more-than and at-least probabilities.FX(k)=P(X≤k)=∑i=0k(ni)pi(1−p)n−i\displaystyle F_X(k) = P(X \leq k) = \sum_{i=0}^{k} \binom{n}{i} p^i (1-p)^{n-i}step function on integers; no simple closed form
Expected valueThe long-run average number of successes, derived in the expected value section.E[X]=npE[X] = npsum of nn Bernoulli means by linearity
VarianceHow widely the count spreads around npnp, worked out in variance and standard deviation.Var(X)=np(1−p)\mathrm{Var}(X) = np(1-p); σ=np(1−p)\sigma = \sqrt{np(1-p)}largest at p=0.5p = 0.5; shrinks as pp approaches 00 or 11
Mode and medianThe most likely count and the middle of the distribution, found in mode and median.Mode=⌊(n+1)p⌋\text{Mode} = \lfloor (n+1)p \rfloor, or two adjacent modes when (n+1)p(n + 1)p is an integer; the median lies within 11 of npnpsymmetric when p=0.5p = 0.5: mode, median and mean coincide
Special caseWith one trial the binomial is the Bernoulli distribution, as the key terms point out.Bin⁡(1,p)=Bernoulli⁡(p)\operatorname{Bin}(1, p) = \operatorname{Bernoulli}(p)n=1n = 1 reduces to a single Bernoulli trial
Poisson approximationMany trials with a small chance each give counts close to the Poisson distribution with rate npnp.Bin⁡(n,p)≈Poisson⁡(np)\operatorname{Bin}(n, p) \approx \operatorname{Poisson}(np) when nn is large and pp is smalllaw of rare events; rule of thumb n>20n > 20, p<0.05p < 0.05
Canonical exampleThe coin-flip setting the page keeps returning to; the expected value section works out its mean.flipping a fair coin 1010 times: n=10n = 10, p=0.5p = 0.5E[X]=5E[X] = 5, Var(X)=2.5\mathrm{Var}(X) = 2.5, σ≈1.58\sigma \approx 1.58
Binomial distribution at a glance·All probability formulasLearn Math Class
Most binomial questions come down to two rows: an exact count uses the probability of one value, while at most, more than and at least use the running total or its complement. The mean and the variance then say where the count should land and how far it may stray.

Common Pitfalls

Three mistakes account for most wrong answers in binomial problems. Each one is marked where it happens in the sections above; here each is worked through in full, with the wrong and the right working side by side.
DownloadPNG2×PDF
1Treating at least as more than
The question asks for at least kk successes, and the complement rule for more than kk is used, so the CDF is read at kk instead of at k−1k - 1.
Start
For n=5n = 5 and p=0.5p = 0.5,
Wrong turn
Error here
P(X≥3)=1−FX(3)P(X \geq 3) = 1 - F_X(3)

=1−2632=632= 1 - \frac{26}{32} = \frac{6}{32}
Right path
At least 33 means 33, 44 or 55 successes, so the complement is at most 22.
P(X≥3)=1−FX(2)P(X \geq 3) = 1 - F_X(2)

=1−1632=12= 1 - \frac{16}{32} = \frac{1}{2}
Why it happensThe two rules 1−FX(k)1 - F_X(k) and 1−FX(k−1)1 - F_X(k-1) differ by a single symbol, and for continuous variables the difference between >> and ≥\geq never matters, so the habit of ignoring it carries over.
How to checkAdd the PMF values of the counts in the event. P(X=3)+P(X=4)+P(X=5)=10+5+132=12P(X = 3) + P(X = 4) + P(X = 5) = \frac{10 + 5 + 1}{32} = \frac{1}{2}.
2Expecting exactly np successes
The mean npnp is read as the number of successes the experiment will produce, or as a count that is very likely to come up.
Wrong turn
Error here
Ten flips of a fair coin have E[X]=10×0.5=5E[X] = 10 \times 0.5 = 5, so ten flips give 55 heads.
Right path
55 is the most likely count, but it is far from certain.
P(X=5)=(105)(0.5)10P(X = 5) = \binom{10}{5} (0.5)^{10}

=2521024≈0.246= \frac{252}{1024} \approx 0.246
About three runs of ten flips in four end with some other count. The value 55 is the long-run average of the counts over many runs.
Why it happensIn everyday language "expected" means "predicted", while in probability it means a weighted average of all the possible values.
How to checkAsk whether npnp is a possible count at all. Five flips of a fair coin have E[X]=5×0.5=2.5E[X] = 5 \times 0.5 = 2.5, a number of heads that can never occur.
3Dropping the binomial coefficient
The probability of exactly kk successes is computed as pk(1−p)n−kp^k (1-p)^{n-k} alone, without the factor (nk)\binom{n}{k}.
Wrong turn
Error here
For 55 fair coin flips,
P(X=3)=(0.5)3(0.5)2=0.03125P(X = 3) = (0.5)^3 (0.5)^2 = 0.03125
Right path
(0.5)3(0.5)2(0.5)^3 (0.5)^2 is the probability of one particular sequence, such as HHHTT. The coefficient counts the (53)=10\binom{5}{3} = 10 sequences with three heads.
P(X=3)=10×0.03125P(X = 3) = 10 \times 0.03125

=0.3125= 0.3125
Why it happensThe product of powers already looks like the probability of three successes and two failures, and counting the orders is a separate step that is easy to skip.
How to checkThe PMF values must add up to 11. Without the coefficients, the six values for k=0,1,…,5k = 0, 1, \ldots, 5 are all (0.5)5=132(0.5)^5 = \frac{1}{32}, and they add up to only 632\frac{6}{32}.
Common pitfalls with the binomial distribution·/probability/distributions/discrete/binomialLearn Math Class
Each slip miscounts the successes. At least kk includes kk itself, so the complement uses F(k−1)F(k - 1); the mean npnp is a long-run average, not the count to expect, and it need not even be a possible count; and every arrangement of the kk successes is counted by (nk)\binom{n}{k}. Adding the PMF values of the event, or checking that all the PMF values add up to 11, catches each slip.

Skills You Should Learn

Each skill opens its step-by-step method page. Skills marked "On this page" are taught above.
Taught on this page
More distribution methods

Binomial Distribution FAQ

What does q mean in binomial formulas?

+
q is shorthand for 1 − p, not a second parameter. Once p is fixed, q is determined; the letter exists only to compress formulas, turning the pmf's tail into q^(n−k) and the variance into npq. Nothing is ever declared Bin(n, p, q) — writing q into a declaration double-counts a single degree of freedom.Read more →

Does B(n, p) mean the binomial or the Beta function?

+
It depends on the source, which is why B alone is risky. School and exam-board texts write B(n, p) for the binomial; elsewhere capital B(a, b) is Euler's Beta function, and both circulate in the same probabilistic neighborhood. Bin(n, p) is the unambiguous spelling, with Binomial(n, p) when explicitness matters more than brevity.Read more →

What does the semicolon mean in P(k; n, p)?

+
It fences the value off from the parameters: what stands left of the semicolon varies, what stands right is fixed by the model. So P(k; n, p) is the probability of k successes given n trials and success probability p. A comma in that slot would read as a joint probability of three random quantities.Read more →

Why does the pmf line include “k = 0, …, n”?

+
Because the support is part of the statement, not decoration. The clause declares exactly which values the variable can take; outside that list the probability is zero by convention. Dropping it leaves the formula looking as though it applies to any k, including negative values or values above n, where the model breaks down.Read more →

Why does getting exactly half heads become less likely with more flips?

+
Because the probability spreads over more counts. Exactly 5050 heads in 100100 fair flips is still the single most likely count, yet it happens only about 8% of the time, and exactly 5,0005{,}000 heads in 10,00010{,}000 flips less than 1% of the time. The spread of the count grows like n\sqrt{n}, so the tallest bar shrinks like 1n\frac{1}{\sqrt{n}}, even while the share of heads closes in on one half.Read more →

When is the binomial distribution symmetric?

+
Only when p=0.5p = 0.5, setting aside the trivial p=0p = 0 and p=1p = 1. With p<0.5p < 0.5 the mass piles up on the low counts with a tail to the right; with p>0.5p > 0.5 the picture is the mirror image, because counting failures instead of successes turns Bin⁡(n,p)\operatorname{Bin}(n, p) into Bin⁡(n,1−p)\operatorname{Bin}(n, 1 - p). For n=10n = 10, p=0.2p = 0.2 peaks at 22 and p=0.8p = 0.8 at 88. The lean weakens as nn grows.Read more →