Skip to main content
Science & Math

Binomial Distribution Calculator

Binomial distribution calculator. Enter trials, success probability and successes for exact, at most, at least and between probabilities, plus mean.

Created by Muhammad Asif Zaheer
Reviewed by CalculatorPlanet Editorial Team

Published

Last updated

Result
P(X = 5) = 0.24609375 (24.6094%)
Probability of your question
0.246094
P(X = k)
0.246094
P(X ≤ k)
0.623047
P(X ≥ k)
0.623047
Mean (np)
5.0000
Variance (np(1 - p))
2.5000
Standard deviation
1.5811

How the Binomial Distribution Calculator Formula Works

The binomial distribution counts successes in a fixed number of independent trials with the same chance of success each time. If you try n times and each attempt succeeds with probability p, the chance of exactly k successes is C(n, k) pk (1 − p)n − k.

The three parts each do a job. pk is the probability that k specific trials all succeed. (1 − p)n − k is the probability that the other n - k trials all fail. C(n, k) = n! / (k!(n − k)!) counts how many different ways the k successes can be placed among the n trials. Multiplying them gives the chance of any arrangement.

For ranges, add exact probabilities: at most k means adding the terms from 0 to k, at least k is 1 minus the terms up to k - 1, and between a and b adds the terms from a to b. The mean is np and the variance is np(1 − p), whose square root is the standard deviation. For large n the calculator computes the terms with logarithms of factorials, which keeps them accurate.

P(X = k) = C(n, k) pk (1 − p)n − k; mean = np; variance = np(1 − p)
What goes in, what comes out
  • ntrialsNumber of independent trials (whole number).
  • p0 to 1Probability of success on each trial.
  • ksuccessesNumber of successes you are asking about.
  • k2successesUpper number of successes, for the between range.
Probability of your question
0.246094
Values shown are from the worked example below
n
trials
Number of independent trials (whole number).
p
0 to 1
Probability of success on each trial.
k
successes
Number of successes you are asking about.
k2
successes
Upper number of successes, for the between range.

Using the Binomial Distribution Calculator

  1. Enter number of trials (n)

    Any value between 1 and 100000.

  2. Enter probability of success on each trial (p, 0 to 1)

    Any value between 0 and 1.

  3. Enter find the probability of

    Choose from Exactly k successes, At most k, Fewer than k, At least k, More than k, Between k and k2 (inclusive).

  4. Enter successes (k)

    Type the figure you already have, then press Calculate.

  5. Enter upper successes (k2)

    Type the figure you already have, then press Calculate.

  6. Read the result

    Press Calculate to update the result. Until you do, the last result is dimmed and marked as out of date, so you always know which numbers belong to the values in the boxes.

A Real Worked Example

Flip a fair coin 10 times. What is the chance of exactly 5 heads? Here n = 10, p = 0.5 and k = 5. C(10, 5) = 252, and 0.55 × 0.55 = 1/1024.

The probability is 252 / 1024 = 0.246094, a little under 25%. The mean is np = 5, the variance is 2.5 and the standard deviation is 1.581. The cumulative probability of 5 or fewer is 0.623047.

1
trials
10
2
probability
0.5
3
mode
exact
4
successes
5
5
successesUpper
6
This calculator returns0.246094probability0.246094exactProbability0.623047cumulativeAtMost0.623047cumulativeAtLeast5mean2.5variance1.5811standardDeviation

At most 3 heads in 10 flips

Choose 'at most' with k = 3. Add the probabilities of 0, 1, 2 and 3 heads: 1 + 10 + 45 + 120 = 176 ways out of 1024.

P(X ≤ 3) = 176 / 1024 = 0.171875. The chance of 3 or more heads is far greater, at 0.945313.

trials: 10probability: 0.5mode: atMostsuccesses: 3successesUpper: 60.171875probability0.117188exactProbability0.171875cumulativeAtMost0.945313cumulativeAtLeast5mean2.5variance1.5811standardDeviation

At least 2 defects in 20 items at a 5% defect rate

Choose 'at least' with n = 20, p = 0.05 and k = 2. The complement is easier: P(0) + P(1) = 0.358486 + 0.377354 = 0.735840.

So P(X ≥ 2) = 1 − 0.735840 = 0.264160. The expected number of defects is np = 1.

trials: 20probability: 0.05mode: atLeastsuccesses: 2successesUpper: 60.26416probability0.188677exactProbability0.924516cumulativeAtMost0.26416cumulativeAtLeast1mean0.95variance0.9747standardDeviation

Between 7 and 9 free throws out of 10 at an 80% rate

Choose 'between' with n = 10, p = 0.8, k = 7 and k2 = 9. The three terms are 0.201327 (7), 0.301990 (8) and 0.268435 (9).

Their sum is 0.771752, so there is about a 77% chance of making between 7 and 9. The mean is 8 and the standard deviation is 1.265.

trials: 10probability: 0.8mode: betweensuccesses: 7successesUpper: 90.771752probability0.201327exactProbability0.3222cumulativeAtMost0.879126cumulativeAtLeast8mean1.6variance1.2649standardDeviation

At least 5 faulty units in 100 at a 2% rate

Choose 'at least' with n = 100, p = 0.02 and k = 5. P(X ≤ 4) = 0.949170, so P(X ≥ 5) = 0.050830.

About 5.1% of batches would show 5 or more. The mean is 2 and the standard deviation is 1.4.

trials: 100probability: 0.02mode: atLeastsuccesses: 5successesUpper: 60.05083probability0.035347exactProbability0.984516cumulativeAtMost0.05083cumulativeAtLeast2mean1.96variance1.4standardDeviation

Exactly 2 sixes in 6 rolls of a die

A six has probability about 0.1667 on each roll (1/6). With n = 6 and k = 2, C(6, 2) = 15.

The probability is 15 × 0.16672 × 0.83334 = 0.2010. Using the exact fraction 1/6 gives 0.2009, so the rounded input accounts for the last digit.

trials: 6probability: 0.1667mode: exactsuccesses: 2successesUpper: 60.200987probability0.200987exactProbability0.937682cumulativeAtMost0.263305cumulativeAtLeast1.0002mean0.8335variance0.9129standardDeviation

What Else to Know

What the Binomial Distribution Describes

The binomial distribution counts the number of successes in a fixed number of independent trials, where every trial has the same probability of success. It answers questions such as: if I flip a coin 10 times, what is the chance of exactly 5 heads, and if a machine has a 2% defect rate, how likely is it that a sample of 100 contains 5 or more defects?

Binomial distribution chart for 10 fair coin flips with the probability of exactly 5 heads, 0.2461, highlighted

Four conditions must hold: a fixed number of trials, two possible outcomes for each one, independence between trials and a constant probability of success. The checklist table above sets them out with an example of each that fails.

The calculator takes the number of trials n and the probability p, and returns exact, cumulative and range probabilities together with the mean, variance and standard deviation.

The Formula, Piece by Piece

The probability of exactly k successes is C(n, k) x pk × (1 − p)n − k. Reading it left to right: C(n, k) is the number of ways to choose which k trials succeed, pk is the probability of k successes, and (1 − p)n − k is the probability that all remaining trials fail.

Binomial probability formula C(n,k) p^k (1-p)^(n-k) explained for 5 heads in 10 flips equals 252 over 1024

For 5 heads in 10 fair flips, C(10, 5) = 252, and each particular sequence has probability 0.510 = 1/1024. So the answer is 252 / 1024 = 0.2461.

Pascal's triangle rows 0 to 8 showing binomial coefficients C(n,k) used in binomial probability

The binomial coefficient C(n, k) = n! / (k!(n − k)!) is the number from Pascal's triangle, which the coefficient table above lists up to n = 12. The calculator uses logarithms of factorials for large n, so it stays accurate up to 100,000 trials.

Exact, At Most, At Least and Between

Most real questions ask about a range. At most k means 0 up to k successes, so you add the exact probabilities in that range. At least k is the complement of at most k - 1, which is usually faster. Between a and b adds the exact terms from a to b inclusive. Fewer than k and more than k leave out k itself.

Cumulative binomial probability chart of at most 3 heads in 10 flips equal to 0.171875 with bars added

With n = 20 and p = 0.05, the chance of at least 2 defects is 1 minus P(0) minus P(1) = 0.2642. With n = 10 and p = 0.8, between 7 and 9 successes has probability 0.7718.

Binomial chart n 10 p 0.8 with 7 to 9 successes highlighted, a combined probability of 0.7718

The calculator returns your chosen probability first, and also lists P(X = k), P(X ≤ k) and P(X ≥ k) for the same k, so you can read off the neighbouring answers. A table of each type is above.

Binomial at least 2 defects with n 20 and p 0.05 using the complement rule to get 0.2642

Mean, Variance and Standard Deviation

The expected number of successes is np. For 100 trials at 2%, that is 2. The variance is np(1 − p), which measures how much the count varies from run to run, and the standard deviation is its square root.

Binomial n 100 p 0.5 distribution chart with mean 50 and standard deviation 5 marked by shaded bars

These tell you what a typical outcome looks like. With n = 100 and p = 0.5 the mean is 50 and the standard deviation is 5, so most results fall between about 40 and 60. The table above lists the figures for common n and p.

The mean is a long-run average and need not be a possible count: 20 trials at p = 0.05 has a mean of 1, but 20 trials at p = 0.025 has a mean of 0.5.

Coins, Dice, Tests and Defects

Fair coin flips use p = 0.5. Rolling a six on a die uses p = 1/6. Guessing a four-option multiple-choice question uses p = 0.25. A manufacturing defect with a known rate uses that rate as p.

Binomial chart of the number of sixes in 6 die rolls with exactly 2 sixes at probability 0.2009

The tables above work through each one: heads in 10 flips, sixes in rolls of a die, the odds of passing a 10-question guessing test and the chance of at least one success in n trials, 1 − (1 − p)n.

A reminder about independence: picking items from a very small lot without replacement changes the odds with each pick, so the binomial is only an approximation in that case. The same is true when a person's chance of success changes with practice.

Normal and Poisson Approximations

When n is large, the binomial resembles a bell curve with mean np and standard deviation √(np(1 − p)). A common rule of thumb is to use it when both np and n(1 − p) are at least 10. The calculator returns exact values, so you do not need the approximation, but it is useful for checking by hand.

When n is large and p is small, so that the mean np stays moderate, the binomial is close to a Poisson distribution with that mean. The Poisson distribution calculator covers that case, and also events counted in a time interval where there is no fixed number of trials.

Reference Tables

Symbols and terms in the binomial distribution
SymbolNameMeaning
nNumber of trialsFixed number of independent attempts
pProbability of successChance of success on each trial, the same every time
q = 1 − pProbability of failureChance of failure on each trial
kNumber of successesThe count you are asking about
C(n, k)Binomial coefficientWays to choose which k trials succeed: n! / (k!(n − k)!)
XRandom variableNumber of successes in n trials
P(X = k)Probability mass functionChance of exactly k successes
P(X ≤ k)Cumulative probabilityChance of k or fewer successes
npMeanExpected number of successes
np(1 − p)VarianceSpread of the number of successes
How the calculator handles each type of probability
QuestionNotationHow it is found
Exactly kP(X = k)One term: C(n, k) pk (1 − p)n − k
At most kP(X ≤ k)Sum of the terms from 0 to k
Fewer than kP(X < k)Sum of the terms from 0 to k - 1
At least kP(X ≥ k)1 minus P(X ≤ k - 1), or the sum from k to n
More than kP(X > k)1 minus P(X ≤ k)
Between a and bP(a ≤ X ≤ b)Sum of the terms from a to b
Heads in 10 fair coin flips (n = 10, p = 0.5)
Heads kWays C(10, k)P(X = k)P(X ≤ k)P(X ≥ k)
010.0009770.0009771.000000
1100.0097660.0107420.999023
2450.0439450.0546880.989258
31200.1171880.1718750.945312
42100.2050780.3769530.828125
52520.2460940.6230470.623047
62100.2050780.8281250.376953
71200.1171880.9453120.171875
8450.0439450.9892580.054688
9100.0097660.9990230.010742
1010.0009771.0000000.000977
Distribution of X for n = 10, p = 0.3
kP(X = k)P(X ≤ k)
00.0282480.028248
10.1210610.149308
20.2334740.382783
30.2668280.649611
40.2001210.849732
50.1029190.952651
60.0367570.989408
70.0090020.998410
80.0014470.999856
90.0001380.999994
100.0000061.000000
Binomial coefficients C(n, k) for n = 1 to 12 (selected k)
nk = 0k = 1k = 2k = 3k = 4k = 5k = 6
111
2121
31331
414641
515101051
61615201561
717213535217
8182856705628
919368412612684
1011045120210252210
1111155165330462462
1211266220495792924
Mean, variance and standard deviation for common n and p
npMean npVariance np(1 - p)Standard deviation
100.55.002.5001.581
100.33.002.1001.449
200.510.005.0002.236
200.12.001.8001.342
500.525.0012.5003.536
500.210.008.0002.828
1000.550.0025.0005.000
1000.022.001.9601.400
10000.0110.009.9003.146
10000.5500.00250.00015.811
At least one success in n trials: 1 - (1 - p)^n
Trials np = 0.01p = 0.05p = 0.1p = 0.2p = 0.5
10.01000.05000.10000.20000.5000
20.01990.09750.19000.36000.7500
30.02970.14260.27100.48800.8750
50.04900.22620.40950.67230.9688
100.09560.40130.65130.89260.9990
200.18210.64150.87840.98851.0000
500.39500.92310.99481.00001.0000
1000.63400.99411.00001.00001.0000
Rolling a die n times: P(exactly k sixes), p = 1/6
Rolls nk = 0k = 1k = 2k = 3k = 4
10.83330.1667
20.69440.27780.0278
30.57870.34720.06940.0046
40.48230.38580.11570.01540.0008
50.40190.40190.16080.03220.0032
60.33490.40190.20090.05360.0080
80.23260.37210.26050.10420.0260
100.16150.32300.29070.15500.0543
120.11220.26920.29610.19740.0888
Guessing a 10-question multiple-choice test (4 options, p = 0.25)
Correct answersP(exactly)P(at least)
00.05631.0000
10.18770.9437
20.28160.7560
30.25030.4744
40.14600.2241
50.05840.0781
60.01620.0197
70.00310.0035
80.00040.0004
90.00000.0000
100.00000.0000
Checklist: is this a binomial situation?
ConditionMeaningExample that fails
Fixed number of trialsn is set in advanceFlip until you get heads
Two outcomes per trialSuccess or failureA die roll counted by face value
Independent trialsOne result does not affect anotherDrawing cards without replacement from a small deck
Same probability each timep never changesA shooter who improves with each shot
Common binomial mistakes
MistakeEffectFix
Using % for pA p of 50 is rejectedEnter 0.5, not 50
Confusing 'at least' with 'exactly'The wrong tailPick the matching option
Dropping the C(n, k) factorProbability is too smallCount the arrangements
Sampling without replacement from a small groupTrials are not independentUse a hypergeometric model
Forgetting the 'at most k' includes kOff by one termUse 'fewer than' to exclude k

Frequently Asked Questions About the Binomial Distribution Calculator

What is the binomial probability formula?

The probability of exactly k successes in n independent trials is P(X = k) = C(n, k) pk (1 − p)n − k, where p is the chance of success on each trial and C(n, k) = n! / (k!(n − k)!). For 5 heads in 10 fair flips, it is 252 × 0.510 = 0.2461.

How do you calculate binomial probability?

Choose n, p and k, then count the ways to place k successes among n trials with C(n, k), multiply by p to the k, then by (1 − p) to the n − k. The calculator does this for exact, cumulative and between-range questions and shows the answer to six decimals.

What is a binomial distribution?

A binomial distribution describes the number of successes in a fixed number of independent trials, each with the same probability of success. Flipping a coin 10 times and counting heads, or checking 50 items for defects when each has a 2% chance, are examples.

What are the conditions for a binomial distribution?

There must be a fixed number of trials, two possible outcomes per trial (success or failure), independent trials and the same probability of success each time. If any of these fails, the binomial model does not fit. The checklist table above lists a failing example for each.

What does n, p and k mean?

In the binomial formula, n is the number of trials, p is the probability of success on a single trial (a number between 0 and 1) and k is the number of successes you are asking about. Enter p as a decimal: 0.25 for 25%.

How do I find the probability of at least k successes?

Add the probabilities of k, k + 1, up to n successes, or take 1 minus the probability of k - 1 or fewer. With 20 trials at p = 0.05, P(X ≥ 2) = 1 - P(X ≤ 1) = 0.2642. Choose the 'at least' option in the calculator.

How do I find the probability of at most k successes?

Add the probabilities of 0, 1, up to k successes. For 10 fair coin flips, P(X ≤ 3) = 0.0010 + 0.0098 + 0.0439 + 0.1172 = 0.1719. This is the cumulative binomial probability, available as the 'at most' option.

How do I find the probability between two values?

Add the exact probabilities from the lower to the upper number of successes, inclusive. With n = 10 and p = 0.8, P(7 ≤ X ≤ 9) = 0.2013 + 0.3020 + 0.2684 = 0.7718. Choose 'between' and fill in both numbers.

What is cumulative binomial probability?

Cumulative probability is the chance of getting k or fewer successes, P(X ≤ k), found by adding the exact probabilities from 0 up to k. The calculator shows it beside the exact probability, along with the 'at least' tail, so you can read all three answers for the same k at once.

What is the mean of a binomial distribution?

The mean, or expected number of successes, is np. For 100 trials at p = 0.02 it is 2. It does not need to be a whole number: 20 trials at p = 0.05 has a mean of 1, and 30 trials at p = 0.05 has a mean of 1.5. It is a long-run average, not a prediction.

What is the variance of a binomial distribution?

The variance is np(1 − p) and the standard deviation is its square root. For n = 10 and p = 0.5, the variance is 2.5 and the standard deviation is 1.581. The calculator reports both with every result, along with the mean, so you can see how spread out the counts will be.

What is the standard deviation of a binomial distribution?

It is the square root of np(1 − p). With n = 100 and p = 0.02 it is the square root of 1.96, which is 1.4. About two thirds of outcomes fall within one standard deviation of the mean for moderate n.

What is a binomial coefficient?

The binomial coefficient C(n, k) counts the ways to choose which k of the n trials are successes. It equals n! / (k!(n − k)!), so C(10, 5) = 252. These numbers form Pascal's triangle, and the coefficient table above lists them up to n = 12.

How do you calculate the probability of getting heads in coin flips?

Use p = 0.5. For exactly 5 heads in 10 flips, the probability is C(10, 5) × 0.510 = 252 / 1024 = 0.2461. For at least one head in 10 flips, it is 1 − 0.510 = 0.9990. Both are in the tables above.

How do you find the probability of rolling a number several times?

Treat rolling the target number as a success with p = 1/6 and the number of rolls as n. For exactly 2 sixes in 6 rolls the probability is C(6, 2) × (1/6)2 × (5/6)4 = 0.2009. The dice table lists the common values.

How do you calculate the probability of passing a test by guessing?

With 4 options per question, p = 0.25. For 10 questions the chance of at least 6 correct is 0.0197. The quiz table lists the exact and 'at least' values for 0 to 10 correct. Use the calculator for other test lengths and option counts.

What is the probability of at least one success?

It is 1 minus the probability of no successes: 1 − (1 − p)n. With p = 0.05 and 20 trials, it is 1 − 0.9520 = 0.6415. The table above shows it for many combinations of n and p.

When can I use the normal approximation?

A common rule of thumb is when both np and n(1 − p) are at least 10 (some books use 5). The binomial is then roughly bell-shaped with mean np and standard deviation √(np(1 − p)). The calculator gives exact values, so the approximation is not needed.

When should I use Poisson instead of binomial?

Poisson is a good approximation of the binomial when n is large and p is small, with the mean np held moderate. It also stands alone for counting events in a fixed interval. See the Poisson distribution calculator linked below for that model.

What is the difference between binomial and normal distributions?

The binomial is discrete: it counts whole successes in a fixed number of trials. The normal is continuous. For large n the binomial resembles a normal curve, but small n or p near 0 or 1 gives a skewed shape, so exact binomial values are better.

What is the difference between binomial and Bernoulli?

A Bernoulli trial is a single trial with two outcomes. A binomial random variable counts the number of successes in n independent Bernoulli trials with the same probability. With n = 1 the binomial reduces to a Bernoulli trial, so the Bernoulli distribution is the simplest special case of the binomial.

Why is my probability of 'exactly k' so small?

Exact probabilities spread over every possible count, so each is a fraction of the total. Even the most likely count rarely exceeds 0.25 for large n. A cumulative probability, such as at least or at most, covers many counts and is larger.

What is the most likely number of successes?

The mode is the whole number at or just below (n + 1)p. For n = 10 and p = 0.5 the mode is 5, with probability 0.2461. For n = 20 and p = 0.05 it is 1, with probability 0.3774. The distribution table shows where the peak falls.

Can I use this for quality control?

Yes, when each item independently has the same chance of being defective. With 100 items and a 2% defect rate, the chance of 5 or more defects is 0.0508. The calculator gives the cumulative tail directly. For samples drawn without replacement from a small lot, the hypergeometric model is better.

Can I use this for polls and surveys?

Roughly, if people are chosen independently and each has the same chance of a given answer. For a small population sampled without replacement, the binomial is only an approximation. The calculator treats each trial as independent with a fixed p.

What is the largest n the calculator accepts?

Up to 100,000 trials. Large values are computed with logarithms of factorials to avoid overflow, so results stay accurate. For counts that big, the normal approximation is also very close, but the calculator still returns the exact binomial figure rather than an estimate.

What if p is 0 or 1?

If p is 0, there are never any successes and P(X = 0) = 1. If p is 1, every trial succeeds and P(X = n) = 1. The calculator accepts p from 0 to 1 and returns these degenerate cases correctly.

How do I calculate the probability of exactly 3 successes?

Use C(n, 3) x p3 × (1 − p)n − 3. With n = 10 and p = 0.5, C(10, 3) = 120, so the probability is 120 / 1024 = 0.1172. Choose 'exactly' and enter k = 3 in the calculator.

How do I find the probability of no successes?

It is (1 − p)n. With 10 trials at p = 0.5, the chance of no successes is 0.510 = 0.000977, and with 20 trials at p = 0.05 it is 0.3585. Enter k = 0 and the 'exactly' option in the calculator.

How do I calculate the probability of at least one success?

Subtract the chance of none from 1: 1 − (1 − p)n. For 20 trials at p = 0.05, this is 1 − 0.3585 = 0.6415. Choose 'at least' with k = 1 in the calculator for the same answer.

What is the cumulative distribution function of the binomial?

The cumulative distribution function gives P(X ≤ k), the sum of the exact probabilities from 0 to k. For n = 10 and p = 0.5, F(5) = 0.6230. The calculator shows this as 'at most k' next to the exact probability.

What is the probability mass function of a binomial?

The probability mass function gives the probability of each exact count: P(X = k) = C(n, k) pk (1 − p)n − k. For n = 10 and p = 0.5 it ranges from 0.0010 at 0 or 10 to 0.2461 at 5. The chart above plots it.

How do I calculate a binomial probability by hand?

Work out C(n, k) from factorials, raise p to the power k, raise 1 - p to the power n - k and multiply. For 4 heads in 6 flips, C(6, 4) = 15 and 0.56 = 0.015625, so the probability is 15 × 0.015625 = 0.2344.

References

  1. [1] Wikipedia contributors. “Binomial distribution.” Wikipedia. Accessed 2026-10-05.