Binomial Distribution Calculator
Enter the chance of success on a single trial, how many trials are run and how many successes you are asking about. The result is the exact probability together with four cumulative ones, and a second tab works backwards to find the trials required.
Related calculators
Created by the Reeliy Editorial Team. Last updated: Oct 19, 2026
What the calculator does
The calculator works with a situation that repeats the same yes-or-no experiment many times: flipping a coin, rolling a die and asking whether a six came up, inspecting parts and asking whether each is defective. In Probability mode it tells you how likely a given number of successes is. In Trials required mode it works backwards and tells you how many attempts you need to be confident of seeing a result.
In Probability mode five numbers are reported, each both as a decimal and as a percentage: the chance of exactly x events, of at most x (X ≤ x), of more than x (X > x), of fewer than x (X < x), and of at least x (X ≥ x).
How to use it
- Enter the probability of success in a single trial. Type a decimal such as 0.3, or a fraction such as 1/6 for one face of a die.
- In Probability mode, enter the number of trials n and the number of events x. Both must be whole numbers, and x cannot exceed n.
- In Trials required mode, enter x and the desired probability as a decimal below 1, for example 0.95. The number of trials is not needed because it is what the tool solves for.
- Press Calculate.
The single-trial probability must be strictly between 0 and 1. A probability of 0 or 1 leaves nothing random to calculate.
When a binomial distribution applies
A count X follows a binomial distribution when all of these hold:
- there is a fixed number n of trials;
- each trial has only two outcomes, called success and failure;
- the chance of success p is the same on every trial;
- trials are independent, so one outcome does not influence the next.
The expected number of successes is n × p and the spread is measured by the variance n × p × (1 − p). For 20 fair coin flips that is a mean of 10 heads and a standard deviation of about 2.24.
If you draw items from a small batch without putting them back, the trials are not independent and a hypergeometric model is more appropriate than the binomial. The combination calculator helps with the counting involved.
The formulas
P(X = x) = C(n, x) · px · (1 − p)n − xC(n, x) = n! ÷ (x! (n − x)!) is the number of ways to choose which x trials succeed. See the combination calculator.
P(X ≤ x) = P(X = 0) + P(X = 1) + … + P(X = x)
The other three outputs follow from these two. Because the probabilities of all outcomes add up to one:
- P(X < x) = P(X ≤ x) − P(X = x)
- P(X > x) = 1 − P(X ≤ x)
- P(X ≥ x) = 1 − P(X < x)
A common slip is to mix up "at least" (X ≥ x, includes x) with "more than" (X > x, excludes it). They differ by exactly P(X = x).
Worked examples
Coin flips. You flip a fair coin 20 times and want 8 heads. With p = 0.5, n = 20, x = 8 the calculator shows:
| Event | Probability |
|---|---|
| Exactly 8 heads | 0.12013435 (12.01%) |
| At most 8 (X ≤ 8) | 0.25172234 (25.17%) |
| Fewer than 8 (X < 8) | 0.13158798 (13.16%) |
| At least 8 (X ≥ 8) | 0.86841202 (86.84%) |
| More than 8 (X > 8) | 0.74827766 (74.83%) |
Dice. Roll a die 10 times. With p = 1/6, the chance of exactly two sixes is 29.07%, of at most two sixes 77.52%, and of at least two sixes 51.55%. The chance of no six at all is (5/6)10, or 16.15%, so at least one six has probability 83.85%.
Quality control. A process makes 2% defective parts and you inspect 50. The expected number of defects is 50 × 0.02 = 1. The chance of exactly 3 defects is 6.07%, of 3 or fewer 98.22%, and of more than 3 only 1.78%. The chance of at least one defect is 1 − 0.9850 = 63.58%.
A complete distribution: 10 fair coin flips
| Heads (x) | P(X = x) | Heads (x) | P(X = x) |
|---|---|---|---|
| 0 | 0.10% | 6 | 20.51% |
| 1 | 0.98% | 7 | 11.72% |
| 2 | 4.39% | 8 | 4.39% |
| 3 | 11.72% | 9 | 0.98% |
| 4 | 20.51% | 10 | 0.10% |
| 5 | 24.61% |
Trials required mode
Sometimes the question is reversed: how many attempts do I need before I am likely to see a result? In this mode the calculator finds the smallest n for which the chance of at least x events is greater than the probability you asked for.
For x = 1 there is a closed form. The chance of at least one success in n trials is 1 − (1 − p)n, so you need n ≥ ln(1 − c) ÷ ln(1 − p), where c is the desired probability.
n ≥ ln(1 − 0.95) ÷ ln(5/6) = 16.43 → 17 rollsRolls of a die needed to be 95% sure of seeing at least one six.
Sixteen rolls give a 94.59% chance and seventeen give 95.49%, so the answer is 17. For rarer events the numbers grow quickly: with p = 0.001 you need 4,603 trials for a 99% chance of at least one success. For x above 1 the calculator searches directly. For example, to have a 90% chance of at least 5 successes when p = 0.4 you need 18 trials.
The desired probability must be above 0 and below 1, and x must be at least 1.
Precision and limits
- Results are rounded to 14 decimal places and may show fewer digits when the value has fewer significant digits, so 0.5 appears as 0.50 and 1 as 1.
- Very large n is handled, but floating-point arithmetic limits accuracy to roughly 12 to 14 significant digits; do not rely on the last digits for n in the thousands.
- Percentages are rounded to two decimals, so a tiny probability can show as 0% even though the decimal beside it is not zero.
- For large n with p not too close to 0 or 1 (a common rule of thumb is np and n(1 − p) both at least 10), the normal distribution calculator gives a quick approximation.
For rolling several dice and summing them, use the dice probability calculator; for odds notation see the odds calculator.
Frequently asked questions
What is the difference between binomial probability and binomial CDF?
The probability (PMF) is the chance of exactly x successes. The cumulative distribution function (CDF) is the chance of x or fewer successes, the sum of the exact probabilities from 0 up to x. This calculator reports both, plus the complements.
Can I enter the probability as a fraction?
Yes. Type 1/6 or 3/8 in the probability box and the calculator evaluates the fraction. Decimals such as 0.1667 also work, but the fraction avoids rounding error.
Why must the number of events be a whole number?
A binomial count is the number of successes, which cannot be fractional. The same applies to the number of trials.
How do I find the probability of between a and b successes?
Calculate P(X ≤ b) and subtract P(X ≤ a − 1), or equivalently use the X < a result for the lower end. For example, P(5 ≤ X ≤ 8) = P(X ≤ 8) − P(X < 5).
What does trials required mean?
It is the smallest number of independent attempts for which the probability of getting at least x successes exceeds the chance you specify.
References
- Johnson NL, Kemp AW, Kotz S. Univariate Discrete Distributions, 3rd ed. Wiley; 2005. Chapter 3: Binomial distribution.
- NIST/SEMATECH e-Handbook of Statistical Methods.
Cite this calculator and page
If you use this page in your work, you can cite it as:
Reeliy Editorial Team. (2026). Binomial Distribution Calculator. Reeliy. https://reeliy.com/calculators/binomial-probability-calculator“Binomial Distribution Calculator.” Reeliy, 2026, https://reeliy.com/calculators/binomial-probability-calculator.