Binomial Distribution Calculator
Solve binomial problems fast. Compute probability for n trials and x successes, or find trials needed to reach a target probability level.
Enter the Details
Result will appear here...
What the binomial distribution calculator does
The binomial distribution describes how many successes you get in a fixed number of yes-or-no trials. This calculator works out those probabilities from the chance of success, the number of trials, and the number of successes you are asking about. It can also run backward, finding how many trials you would need to reach a target probability.
It fits any situation built from repeated attempts with two outcomes, from coin flips to pass-or-fail tests. Below is how it works and when it applies.
How to use it
- In probability mode, enter the chance of success as a decimal, the number of trials, and the number of successes.
- In trials required mode, enter the chance of success, the number of successes you want, and the target probability.
- Press Calculate for the result, or Reset to clear it.
When a situation is binomial
The binomial distribution needs four things to hold. There is a fixed number of trials, decided in advance. Each trial has just two outcomes, success or failure. The chance of success is the same on every trial. And the trials are independent, so one result does not affect the next.
Flipping a coin 20 times and counting heads fits perfectly: 20 fixed trials, heads or tails, the same chance each time, and each flip independent. So does counting how many of a batch of products pass a test, or how many people in a fixed sample say yes. When any of the four conditions breaks, drawing cards without replacing them, for instance, since that changes the odds, the binomial no longer applies.
How the probability is worked out
The chance of exactly x successes in n trials combines two things: how likely one particular arrangement of x successes is, and how many such arrangements there are:
P(x) = C(n, x) × px × (1 minus p)(n minus x)
The middle piece is the chance of x successes and the rest failures in one specific order. The C(n, x) in front, the number of combinations, counts how many different orders give x successes, since it does not matter which trials succeeded. Multiplying the two gives the total probability of that many successes however they fall.
The five probabilities it reports
Often you want more than the chance of an exact count, so the calculator reports five related probabilities at once: exactly x, at most x, fewer than x, more than x, and at least x. Together they answer almost any question about the number of successes.
The exact probability is the chance of hitting x on the nose. The others are cumulative, adding up ranges of outcomes: at most x sums every count up to and including x, while at least x sums x and everything above. Cumulative probabilities are usually what real questions need, like the chance of at least 8 correct answers rather than exactly 8.
The trials required mode
The second mode turns the question around. Instead of asking the probability for a set number of trials, it asks how many trials you need to reach a target probability of getting at least a certain number of successes. It works by trying larger and larger numbers of trials until the cumulative probability crosses your target.
This is useful for planning. If you want to be 95 percent sure of at least one success, this mode tells you how many attempts that takes, which is the kind of question that comes up in testing, quality checks, and designing experiments.
A worked example
Suppose you flip a fair coin 10 times, so the chance of heads is 0.5 and there are 10 trials, and you ask about 6 heads. The chance of exactly 6 heads works out to about 20.5 percent, and the chance of at least 6 heads is about 37.7 percent.
Now the trials required mode: to be at least 95 percent sure of getting at least one head, you would need 5 flips, since five flips leave under a 5 percent chance of no heads at all. Four flips are not quite enough, which is exactly the sort of thing the mode pins down.
Entering your values
Enter the chance of success as a decimal between 0 and 1, so 25 percent is 0.25. In probability mode the number of successes cannot exceed the number of trials. The probabilities are shown both as decimals and percentages. For very large numbers of trials, the factorials involved grow beyond what can be held exactly, so keep the trial counts moderate.
Questions people ask
What is the binomial distribution?
The distribution of the number of successes in a fixed number of independent yes-or-no trials with a constant chance of success.
When can I use it?
When there is a fixed number of trials, each with two outcomes, the same chance of success every time, and independent results. Coin flips and pass-or-fail tests fit; drawing cards without replacement does not.
What is the difference between exactly and at least?
Exactly x is the chance of hitting that count precisely. At least x adds up the chances of x and every larger count. Most real questions want a cumulative range like at least or at most.
Is a coin flip a binomial situation?
Yes. A fixed number of flips, heads or tails, the same odds each time, and independent flips are exactly the four conditions the binomial needs.
References
A quick note on where the methods here come from. The binomial distribution is set out in the NIST/SEMATECH e-Handbook of Statistical Methods, the US government's public statistics reference. OpenStax Introductory Statistics is a free, widely used textbook covering the binomial distribution.
- NIST/SEMATECH e-Handbook of Statistical Methods (the binomial distribution). https://www.itl.nist.gov/div898/handbook/
- OpenStax, Introductory Statistics (the binomial distribution). https://openstax.org/details/books/introductory-statistics-2e
Ankit Khatiwada is a researcher and graduate student in Computer Science at Saarland University, with strengths in statistics, data analysis, data engineering, and full stack development. His work sits at the intersection of quantitative reasoning and applied technology, making him a strong fit for tools that depend on clear numerical logic. At Eon Tools, he reviews number and statistical tools.