Binomial Distribution Calculator
Binomial distribution calculator. Enter trials, success probability and successes for exact, at most, at least and between probabilities, plus mean.
Published
Last updated
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)- 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.
- 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
Enter number of trials (n)
Any value between 1 and 100000.
Enter probability of success on each trial (p, 0 to 1)
Any value between 0 and 1.
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).
Enter successes (k)
Type the figure you already have, then press Calculate.
Enter upper successes (k2)
Type the figure you already have, then press Calculate.
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.
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.
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.
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.
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.
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.
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?

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.

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.

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.

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.

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.

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.

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.

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
| Symbol | Name | Meaning |
|---|---|---|
| n | Number of trials | Fixed number of independent attempts |
| p | Probability of success | Chance of success on each trial, the same every time |
| q = 1 − p | Probability of failure | Chance of failure on each trial |
| k | Number of successes | The count you are asking about |
| C(n, k) | Binomial coefficient | Ways to choose which k trials succeed: n! / (k!(n − k)!) |
| X | Random variable | Number of successes in n trials |
| P(X = k) | Probability mass function | Chance of exactly k successes |
| P(X ≤ k) | Cumulative probability | Chance of k or fewer successes |
| np | Mean | Expected number of successes |
| np(1 − p) | Variance | Spread of the number of successes |
| Question | Notation | How it is found |
|---|---|---|
| Exactly k | P(X = k) | One term: C(n, k) pk (1 − p)n − k |
| At most k | P(X ≤ k) | Sum of the terms from 0 to k |
| Fewer than k | P(X < k) | Sum of the terms from 0 to k - 1 |
| At least k | P(X ≥ k) | 1 minus P(X ≤ k - 1), or the sum from k to n |
| More than k | P(X > k) | 1 minus P(X ≤ k) |
| Between a and b | P(a ≤ X ≤ b) | Sum of the terms from a to b |
| Heads k | Ways C(10, k) | P(X = k) | P(X ≤ k) | P(X ≥ k) |
|---|---|---|---|---|
| 0 | 1 | 0.000977 | 0.000977 | 1.000000 |
| 1 | 10 | 0.009766 | 0.010742 | 0.999023 |
| 2 | 45 | 0.043945 | 0.054688 | 0.989258 |
| 3 | 120 | 0.117188 | 0.171875 | 0.945312 |
| 4 | 210 | 0.205078 | 0.376953 | 0.828125 |
| 5 | 252 | 0.246094 | 0.623047 | 0.623047 |
| 6 | 210 | 0.205078 | 0.828125 | 0.376953 |
| 7 | 120 | 0.117188 | 0.945312 | 0.171875 |
| 8 | 45 | 0.043945 | 0.989258 | 0.054688 |
| 9 | 10 | 0.009766 | 0.999023 | 0.010742 |
| 10 | 1 | 0.000977 | 1.000000 | 0.000977 |
| k | P(X = k) | P(X ≤ k) |
|---|---|---|
| 0 | 0.028248 | 0.028248 |
| 1 | 0.121061 | 0.149308 |
| 2 | 0.233474 | 0.382783 |
| 3 | 0.266828 | 0.649611 |
| 4 | 0.200121 | 0.849732 |
| 5 | 0.102919 | 0.952651 |
| 6 | 0.036757 | 0.989408 |
| 7 | 0.009002 | 0.998410 |
| 8 | 0.001447 | 0.999856 |
| 9 | 0.000138 | 0.999994 |
| 10 | 0.000006 | 1.000000 |
| n | k = 0 | k = 1 | k = 2 | k = 3 | k = 4 | k = 5 | k = 6 |
|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | |||||
| 2 | 1 | 2 | 1 | ||||
| 3 | 1 | 3 | 3 | 1 | |||
| 4 | 1 | 4 | 6 | 4 | 1 | ||
| 5 | 1 | 5 | 10 | 10 | 5 | 1 | |
| 6 | 1 | 6 | 15 | 20 | 15 | 6 | 1 |
| 7 | 1 | 7 | 21 | 35 | 35 | 21 | 7 |
| 8 | 1 | 8 | 28 | 56 | 70 | 56 | 28 |
| 9 | 1 | 9 | 36 | 84 | 126 | 126 | 84 |
| 10 | 1 | 10 | 45 | 120 | 210 | 252 | 210 |
| 11 | 1 | 11 | 55 | 165 | 330 | 462 | 462 |
| 12 | 1 | 12 | 66 | 220 | 495 | 792 | 924 |
| n | p | Mean np | Variance np(1 - p) | Standard deviation |
|---|---|---|---|---|
| 10 | 0.5 | 5.00 | 2.500 | 1.581 |
| 10 | 0.3 | 3.00 | 2.100 | 1.449 |
| 20 | 0.5 | 10.00 | 5.000 | 2.236 |
| 20 | 0.1 | 2.00 | 1.800 | 1.342 |
| 50 | 0.5 | 25.00 | 12.500 | 3.536 |
| 50 | 0.2 | 10.00 | 8.000 | 2.828 |
| 100 | 0.5 | 50.00 | 25.000 | 5.000 |
| 100 | 0.02 | 2.00 | 1.960 | 1.400 |
| 1000 | 0.01 | 10.00 | 9.900 | 3.146 |
| 1000 | 0.5 | 500.00 | 250.000 | 15.811 |
| Trials n | p = 0.01 | p = 0.05 | p = 0.1 | p = 0.2 | p = 0.5 |
|---|---|---|---|---|---|
| 1 | 0.0100 | 0.0500 | 0.1000 | 0.2000 | 0.5000 |
| 2 | 0.0199 | 0.0975 | 0.1900 | 0.3600 | 0.7500 |
| 3 | 0.0297 | 0.1426 | 0.2710 | 0.4880 | 0.8750 |
| 5 | 0.0490 | 0.2262 | 0.4095 | 0.6723 | 0.9688 |
| 10 | 0.0956 | 0.4013 | 0.6513 | 0.8926 | 0.9990 |
| 20 | 0.1821 | 0.6415 | 0.8784 | 0.9885 | 1.0000 |
| 50 | 0.3950 | 0.9231 | 0.9948 | 1.0000 | 1.0000 |
| 100 | 0.6340 | 0.9941 | 1.0000 | 1.0000 | 1.0000 |
| Rolls n | k = 0 | k = 1 | k = 2 | k = 3 | k = 4 |
|---|---|---|---|---|---|
| 1 | 0.8333 | 0.1667 | |||
| 2 | 0.6944 | 0.2778 | 0.0278 | ||
| 3 | 0.5787 | 0.3472 | 0.0694 | 0.0046 | |
| 4 | 0.4823 | 0.3858 | 0.1157 | 0.0154 | 0.0008 |
| 5 | 0.4019 | 0.4019 | 0.1608 | 0.0322 | 0.0032 |
| 6 | 0.3349 | 0.4019 | 0.2009 | 0.0536 | 0.0080 |
| 8 | 0.2326 | 0.3721 | 0.2605 | 0.1042 | 0.0260 |
| 10 | 0.1615 | 0.3230 | 0.2907 | 0.1550 | 0.0543 |
| 12 | 0.1122 | 0.2692 | 0.2961 | 0.1974 | 0.0888 |
| Correct answers | P(exactly) | P(at least) |
|---|---|---|
| 0 | 0.0563 | 1.0000 |
| 1 | 0.1877 | 0.9437 |
| 2 | 0.2816 | 0.7560 |
| 3 | 0.2503 | 0.4744 |
| 4 | 0.1460 | 0.2241 |
| 5 | 0.0584 | 0.0781 |
| 6 | 0.0162 | 0.0197 |
| 7 | 0.0031 | 0.0035 |
| 8 | 0.0004 | 0.0004 |
| 9 | 0.0000 | 0.0000 |
| 10 | 0.0000 | 0.0000 |
| Condition | Meaning | Example that fails |
|---|---|---|
| Fixed number of trials | n is set in advance | Flip until you get heads |
| Two outcomes per trial | Success or failure | A die roll counted by face value |
| Independent trials | One result does not affect another | Drawing cards without replacement from a small deck |
| Same probability each time | p never changes | A shooter who improves with each shot |
| Mistake | Effect | Fix |
|---|---|---|
| Using % for p | A p of 50 is rejected | Enter 0.5, not 50 |
| Confusing 'at least' with 'exactly' | The wrong tail | Pick the matching option |
| Dropping the C(n, k) factor | Probability is too small | Count the arrangements |
| Sampling without replacement from a small group | Trials are not independent | Use a hypergeometric model |
| Forgetting the 'at most k' includes k | Off by one term | Use '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] Wikipedia contributors. “Binomial distribution.” Wikipedia. Accessed 2026-10-05.
Related calculators
- Amps to Kilowatts CalculatorConvert amps to kilowatts for DC, single-phase and three-phase circuits, with power factor, kVA, kWh per day or month and an optional energy cost.Open
- Box Plot CalculatorBox plot calculator with steps: get Q1, median, Q3, whiskers, fences and outliers from data or five numbers, with a text box and whisker plot.Open
- Boyle's Law CalculatorBoyle's law calculator: solve P1 V1 = P2 V2 for pressure or volume in atm, kPa, bar, mmHg, psi, L, mL or m3, with gauge pressure and examples.Open
- Coefficient of Variation CalculatorCoefficient of variation calculator with steps. Enter data or a mean and SD to get CV%, standard deviation and variance, sample or population.Open
