Binomial Calculator
Binomial Calculator
The binomial distribution is the foundation of yes-or-no probability. It describes the number of successes in a fixed series of n independent trials, where each trial has the same probability p of success. Flip a coin ten times and count the heads, test 20 components and count the defective ones, or poll 100 voters and count those who say yes — all are binomial processes.
Three conditions define a binomial setting: a fixed number of trials n, two possible outcomes per trial (success or failure), a constant success probability p across trials, and independence between trials. When these hold, the distribution is completely described by n and p. Its mean is np and its variance is np(1−p), so it is easy to summarize with just two numbers.
Our binomial calculator takes n, p, and a target count k, then returns P(X = k), P(X ≤ k), P(X ≥ k), the mean, and the variance. These let you answer questions like "what is the chance of exactly 6 heads in 10 flips?" or "how likely is it that at least 8 of 20 products pass?"
The binomial model is everywhere in quality control, clinical trials, survey research, and sports. It is also the discrete counterpart to the normal distribution and, through the law of large numbers, connects directly to the Poisson when n is large and p is tiny.
The shape of the binomial distribution depends entirely on p. When p = 0.5 the distribution is symmetric and bell-like; as p moves toward 0 or 1 it becomes skewed, with the bulk of the probability near the low or high end of the range. This is why a biased coin (p far from 0.5) produces long runs that look suspicious even when they are perfectly ordinary under that bias. The mean np marks the center of mass, and the spread is set by np(1−p), which is largest at p = 0.5 and shrinks toward the extremes.
Understanding the variance formula is useful for design. Because variance peaks at p = 0.5, experiments and surveys are most informative, in the sense of producing the widest spread of possible outcomes, when the underlying probability is near a coin flip. When p is very small or very large, most trials produce the same result and there is little information to learn, which is why detecting a rare defect or a near-certain event requires many observations.
Enter the number of trials n (a non-negative integer), the success probability p (a number from 0 to 1), and the number of successes k (a non-negative integer no larger than n). The calculator returns the probabilities and the summary statistics.
Example 1 — Coin flips. n = 10, p = 0.5, k = 6. P(X = 6) ≈ 20.5%, the chance of exactly six heads in ten fair flips. P(X ≥ 6) ≈ 37.7%.
Example 2 — Quality control. A batch has n = 20 items, each with defect probability p = 0.1. What is the chance of exactly 2 defective items? Enter k = 2. P(X = 2) ≈ 28.5%. The mean number defective is 20 × 0.1 = 2.
Edge cases. p = 0 means success is impossible, so P(X = 0) = 100%. p = 1 means success is certain, so P(X = n) = 100%. k larger than n is rejected because you cannot have more successes than trials. n = 0 returns nothing meaningful and is rejected. Very large n works fine; the calculator evaluates combinations directly.
Example 3 — Free throws. A player hits 75% of free throws (p = 0.75) over n = 8 attempts. The chance of exactly 6 makes is about 31.1%, while the chance of 7 or more is about 50.0%, showing consistency pays off.
Example 4 — Survey yes responses. In a sample of n = 100 with true support p = 0.4, the chance of observing exactly 40 yes responses is about 8.2%, though the range 35-45 is far more likely as a cluster.
Example 5 — Certain failure. With p = 0, every trial fails, so P(X = 0) = 100% and P(X = k) for any k > 0 is 0%, a sane boundary of the model.
The binomial probability mass function is:
where the binomial coefficient counts the number of ways to choose k successes from n trials:
The mean and variance are:
Manual Step-by-Step
For n = 10, p = 0.5, k = 6:
- C(10,6) = 10! / (6!4!) = 210
- p^k = 0.5^6 = 0.015625; (1−p)^(n−k) = 0.5^4 = 0.0625
- P(X = 6) = 210 × 0.015625 × 0.0625 = 0.2051, or 20.51%
The calculator sums the same terms for cumulative probabilities without manual addition.
Probabilities for n = 10, p = 0.5
| k (successes) | P(X = k) | P(X ≤ k) |
|---|---|---|
| 0 | 0.10% | 0.10% |
| 2 | 4.39% | 5.47% |
| 4 | 20.51% | 37.70% |
| 5 | 24.61% | 62.30% |
| 6 | 20.51% | 82.81% |
| 8 | 4.39% | 98.93% |
The table shows the symmetric shape for p = 0.5, peaking at k = 5. The cumulative column reveals that 62.3% of outcomes have five or fewer successes, while only about 1.1% reach eight or more.
- Verify independence. If one trial affects the next (like drawing cards without replacement), use a hypergeometric model instead.
- Keep p between 0 and 1; the calculator rejects values outside that range.
- For large n and small p, switch to the Poisson approximation with lambda = np to avoid huge combinations.
- Use P(X ≥ k) for "at least" questions and P(X ≤ k) for "at most" questions.
- Remember the distribution is only symmetric when p = 0.5; otherwise it skews toward the smaller probability side.
- Check that n is truly fixed before applying the model to real decisions.
- Use the complement to find "at least" probabilities: P(X ≥ k) = 1 − P(X ≤ k−1), which the calculator computes directly.
- For very large n and small p, switch to the Poisson approximation with λ = np to avoid handling enormous combinations by hand.
- Verify that p is the same for every trial; a changing p means the trials are not binomial and the result will mislead.
- Report both the point probability and the cumulative probability so readers see the specific and the surrounding chances.
- In quality control, set the acceptance number k deliberately; it trades the risk of passing bad batches against the cost of scrapping good ones.
- Keep n and k as integers; fractional trials or successes are not defined for this discrete count model.
- The binomial requires constant p across all trials, which real processes often violate.
- Trials must be independent; sampling without replacement breaks this assumption.
- It models only two outcomes per trial, so multi-category results need a different distribution.
- For very large n the raw combinations can be enormous, though the calculator handles them numerically.
- It does not account for unknown or estimated p; using a rough p hides uncertainty in the result.
- The model says nothing about why trials succeed, only the probability of counts.
The binomial probabilities convert raw counts into risks you can act on. In acceptance sampling, a manufacturer decides how many defective items in a sample are acceptable before rejecting a lot. The calculator shows the chance of accepting a lot with a given true defect rate, which is the operating characteristic that balances cost against quality.
In clinical and A/B testing, the binomial models the count of responders out of n patients or users. The probability of observing k or more successes under a null hypothesis of low efficacy is the foundation of the p-value, telling you whether the observed response rate is surprising enough to trust.
For communication, lead with the cumulative probability rather than the point probability when the question is about thresholds. Stakeholders usually care whether "at least k" successes occur, not the exact count k, so P(X ≥ k) or P(X ≤ k) is the number that informs the decision.
Always state n and p explicitly when you report a binomial result. The same k can be routine or remarkable depending on those parameters, and omitting them makes the probability impossible to interpret or reproduce.
The binomial requires four things to hold exactly, and real data often strain at least one of them. Independence is the first to break. Drawing cards from a deck without replacement means each draw changes the probabilities of the next, so the count of hearts is hypergeometric, not binomial. Polling the same households repeatedly, or counting related individuals, also introduces dependence that the independent-trials formula ignores.
A constant p across trials is the second assumption, and it fails whenever the subject or condition changes midway. A learner who improves with each attempt has a rising p; a machine that wears out has a falling p. Using a single average p smooths over that trend and can misstate the chance of long runs of success or failure that a changing-p process would actually produce.
More than two outcomes per trial is the third limit. A multinomial setting, such as a preference among three brands, needs its own distribution; squeezing it into success versus failure loses the structure. And if the trial count n is not fixed in advance, as in "keep sampling until you get k successes," the model becomes negative binomial rather than binomial.
Even when the assumptions hold approximately, the normal approximation to the binomial is only safe when both np and n(1−p) are comfortably large, typically at least 10. For small n or extreme p, the discrete binomial probabilities differ noticeably from the smooth bell curve, and only the exact formula this calculator uses remains accurate. Checking these conditions is what keeps a binomial probability honest.
- What makes a situation binomial?
- Four things: a fixed number of trials, two outcomes per trial, the same success probability each time, and independence between trials.
- What does the binomial coefficient count?
- It counts the number of distinct sequences of n trials that contain exactly k successes, which is why it multiplies the probability of any one such sequence.
- Why is the variance np(1-p)?
- Each trial is a Bernoulli variable with variance p(1-p). Summing n independent trials adds their variances, giving np(1-p).
- What if my probability changes between trials?
- Then it is not binomial. You would need a beta-binomial or another model that allows p to vary.
- How is binomial different from Poisson?
- Binomial fixes the number of trials n; Poisson has no fixed trial count and models counts over an interval at a constant rate.
- Can p be greater than 1?
- No. Probability cannot exceed 1, so the calculator rejects p > 1 and p < 0.
- What is P(X >= k) for k = 0?
- It is always 100% because zero or more successes is guaranteed when n is at least zero.
- When should I approximate with the normal distribution?
- When n is large and p is not too close to 0 or 1 (commonly np and n(1-p) both at least 10), the binomial is well approximated by a normal curve.
- What does the mean np tell me?
- It is the expected number of successes across many repetitions of the whole n-trial experiment.
- Is k allowed to equal n?
- Yes. k = n gives the probability that every trial succeeds, which is p raised to the power n.
Clarity in reporting prevents the most common misreadings of a binomial probability. State n and p up front, because the same count k can be ordinary or astonishing depending on those two numbers. Write the probability with its natural language: "the chance of exactly 6 successes in 10 trials with p = 0.5 is about 20.5%," rather than dropping a bare percentage that loses its meaning out of context.
Distinguish the point probability from the cumulative one when you communicate a result. If a decision hinges on a threshold, such as accepting or rejecting a batch, the cumulative probability P(X ≤ k) or P(X ≥ k) is the relevant number, and reporting only P(X = k) can mislead a reader who actually cares about the surrounding counts. The calculator returns both, so use the one that matches the question asked.
Anchor any conclusion to the binomial assumptions as well. A brief note that the trials were independent and the success probability constant lets a reviewer judge whether the model genuinely applied. Omitting that context invites the mistaken inference that a computed probability is exact when the data only approximated the required conditions.
- [1]National Institute of Standards and Technology (NIST). (n.d.). Binomial Distribution. Engineering Statistics Handbook.
- [2]Wikipedia. (n.d.). Binomial Distribution.
- [3]Khan Academy. (n.d.). Binomial Probability.
- [4]Statistics How To. (n.d.). Binomial Distribution.
- [5]Wikipedia. (n.d.). Bernoulli Trial.
- [6]Wikipedia. (n.d.). Probability Distribution.
Last updated: July 20, 2026
UnByte — Independent Software Engineering
Every calculator references authoritative sources — Editorial policy