The binomial distribution calculator above computes the exact probability of k successes in n independent trials when each trial has the same success probability p. It returns the point probability P(X = k), all four cumulative variants around it, the mean and standard deviation, and a probability bar for the values of k nearest yours — so you can see whether your k sits in the fat middle or out in a thin tail.
Arb Digital maintains this one because binomial questions come up constantly in conversion work — how likely is it that 3 of 10 visitors convert at a 50% rate, or that a batch of 200 units contains 4 defects — and free tools usually return one number without saying which of the five possible questions it answered. The distinction between "exactly 3", "at most 3", "fewer than 3" and "at least 3" is where nearly every wrong answer comes from, so this calculator prints all of them at once.
What This Binomial Distribution Calculator Does
A binomial random variable counts successes in a fixed number of independent yes-or-no trials. Flip a coin ten times and count heads. Send an email to 500 people and count replies. Inspect 200 parts and count defects. The number of successes can only be a whole number between 0 and n, and the binomial formula gives the exact probability of each one.
The calculator evaluates that probability mass function directly, then sums it for the cumulative values. It reports P(X = k), P(X ≤ k), P(X < k), P(X ≥ k) and P(X > k) so no arithmetic is left to you, along with the mean np, the variance np(1 − p) and the standard deviation. It handles large n without losing accuracy, because the combination term is computed in logarithms rather than by multiplying factorials that overflow long before n reaches a thousand.
How to Use It
- Enter the number of trials. This is n — the fixed count of attempts, flips, visitors or units. It must be decided before you look at the results, not chosen afterwards.
- Enter the success probability. This is p for a single trial. Use the dropdown if your figure is a percentage, so 25 and 0.25 both work without converting by hand.
- Enter k, the number of successes you are asking about. It must lie between 0 and n.
- Read the right line. The hero figure is exactly k. The grid gives at most k and at least k, and the panel underneath adds fewer than k and more than k.
- Check the bar chart to see where your k falls in the distribution. A k out in the tail with a tiny probability often means the question was framed the wrong way round.
The Formula: How Binomial Probability Is Calculated
The binomial probability mass function is P(X = k) = C(n, k) × pk × (1 − p)n−k, and each part does a distinct job. The term pk is the probability of k specific successes; (1 − p)n−k is the probability of the remaining n − k trials all failing. Multiplied, they give the probability of one particular sequence — say success, failure, success, success, failure.
But you rarely care about one specific sequence. You care about any arrangement producing k successes, and that is what the binomial coefficient C(n, k) = n! ÷ (k! × (n − k)!) counts. With n = 10 and k = 3 there are 120 ways to place three successes among ten trials, each equally probable, so you multiply. Our factorial calculator handles that coefficient on its own if you need it separately.
The cumulative values are then simple sums. P(X ≤ k) adds the point probabilities from 0 up to k. P(X ≥ k) adds from k up to n, which is the same as 1 − P(X ≤ k − 1). The mean is np and the variance is np(1 − p), which means the variance is largest at p = 0.5 and shrinks toward zero as p approaches either extreme — an outcome that is nearly certain has very little room to vary.
A Worked Example You Can Check Yourself
The values loaded by default are the standard textbook case: ten fair coin flips, n = 10 and p = 0.5, asking for exactly three heads. Because p = 0.5, every one of the 210 = 1024 possible sequences is equally likely, so the answer is just the count of favourable sequences over 1024. There are C(10, 3) = 120 ways to get three heads, so P(X = 3) = 120 ÷ 1024 = 0.1171875 exactly. That is the figure the calculator prints, and you can verify it with nothing but long division.
The cumulative values follow the same logic. P(X ≤ 3) sums the counts for 0, 1, 2 and 3 heads: 1 + 10 + 45 + 120 = 176, over 1024, which is 0.171875. P(X ≥ 3) is 1 − P(X ≤ 2) = 1 − 56/1024 = 0.9453125. The mean is 10 × 0.5 = 5, the variance is 10 × 0.5 × 0.5 = 2.5, and the standard deviation is √2.5 = 1.5811. Every one of those is a whole-number fraction you can confirm by hand, which is exactly why this example is the default: if a binomial tool cannot return 120/1024, nothing else it says is worth reading.
A second case worth trying, because it is not symmetric and so cannot be checked by counting alone: n = 20, p = 0.3, k = 5 gives P(X = 5) = 0.178863. The NIST/SEMATECH e-Handbook chapter on exploratory data analysis documents the binomial alongside the other standard discrete distributions if you want the formal definitions.
The Four Conditions a Binomial Needs
The formula is only correct when four things hold, and real data breaks them more often than textbooks suggest.
Fixed n, decided in advance. If you keep sampling until you get a certain number of successes, the count is not binomial — n itself became random, and a different distribution applies. Stopping a test early "because it looked good" quietly violates this.
Two outcomes per trial. Each trial is success or failure with nothing in between. A three-way outcome needs a multinomial treatment, not a binomial one.
Constant p across all trials. This is the assumption that breaks most often in marketing data. If your conversion rate differs between mobile and desktop traffic, a single binomial across all visitors is using an average p that describes neither group. The result is a distribution that is too narrow — real spread exceeds what the formula predicts.
Independence. One trial's outcome must not affect another's. Sampling without replacement from a small population violates this directly: drawing 10 items from a batch of 40 changes the odds with every draw. The working rule is that the binomial stays reasonable when the sample is under about 5% of the population; beyond that a hypergeometric treatment is correct.
Exactly k, At Most k, At Least k: The Off-By-One That Ruins Answers
More binomial answers are wrong from misreading the question than from misapplying the formula. Four phrases in English map to four different sums, and two of them differ by exactly one term.
"At most 3" means P(X ≤ 3) and includes k = 3. "Fewer than 3" means P(X < 3) and excludes it. In the coin example those are 0.171875 and 0.0546875 — the second is barely a third of the first, purely because one term moved. "At least 3" means P(X ≥ 3) = 0.9453125 and includes k = 3, while "more than 3" means P(X > 3) = 0.828125.
This is why the tool prints all five values rather than making you pick a mode. It also explains a common complement-rule mistake: the opposite of "at least 3" is "at most 2", not "at most 3". The binomial is discrete, so the boundary value belongs to exactly one side and sliding it by one changes the answer by a full term. Continuous distributions do not have this problem, which is one reason the normal distribution calculator behaves differently at boundaries.
Why Large n Breaks Naive Calculators
Written literally, C(n, k) requires n!, and factorials grow explosively. 171! already exceeds the largest number JavaScript can represent, so any calculator computing the coefficient by direct multiplication returns infinity or nonsense once n passes roughly 170 — even though the final probability is an ordinary number between 0 and 1.
This tool works in logarithms instead. It computes ln C(n, k) with the log-gamma function, adds k ln p and (n − k) ln(1 − p), and exponentiates only at the end. The enormous intermediates never exist, so n = 5,000 with p = 0.02 is as accurate as n = 10. Testing another tool at n = 500 against a known result is a quick check: a surprising number fail silently, returning zero rather than an error.
When the Normal or Poisson Approximation Takes Over
Before computers, nobody summed hundreds of binomial terms by hand, so two approximations were standard. Both are still worth understanding, because they explain the shape of the distribution.
When n is large and p is not extreme — the usual rule of thumb is that np and n(1 − p) both exceed about 10 — the binomial comes close to a normal distribution with mean np and standard deviation √(np(1 − p)). This is why proportion-based sampling and margin-of-error formulas use normal maths on what is fundamentally binomial data, and it underpins the margin of error calculator and the sample size calculator. Approximating a discrete count with a continuous curve needs a continuity correction of half a unit at the boundary to be accurate.
When n is large but p is very small, so np stays modest, the binomial converges instead on a Poisson distribution with λ = np. That is the right lens for rare events in large populations — defects per batch, or clicks on a very low-CTR placement — and our Poisson distribution calculator handles that case directly. The Penn State Eberly College of Science statistics courses set out the conditions for each approximation. With exact computation available there is rarely a reason to approximate now, but knowing which shape your data drifts toward tells you a great deal about what to expect from it.
Arb Digital sets up measurement properly before a test starts — clean tracking, a sample size agreed in advance, and reporting that separates a genuine lift from ordinary run-to-run variation.
Browse All Free Tools Talk To Arb DigitalCommon Mistakes to Avoid
- Confusing "at least k" with "more than k" — they differ by the single term P(X = k), which in a peaked distribution can be most of the answer.
- Entering p as a percentage when the field expects a decimal — 25 instead of 0.25 is not a small error, it is an impossible probability. Use the unit dropdown instead of converting mentally.
- Applying the binomial to sampling without replacement from a small population, where the trials are not independent and a hypergeometric model is the correct one.
- Assuming a single p across visibly different segments — pooling groups with different true rates understates the real spread of the outcome.
- Choosing k after seeing the data — asking for the probability of the result you already observed is not a test of anything, because any specific outcome looks unlikely in advance.
Related Free Tools From Arb Digital
For rare events counted over time or space rather than fixed trials, use the Poisson distribution calculator. For continuous data, the normal distribution calculator is the right model. Work out simple event probabilities with the probability calculator, count arrangements with the factorial calculator, and plan how many trials you need with the sample size calculator. The free online tools hub lists every statistics calculator on the site.
Frequently Asked Questions
It models the number of successes in a fixed number of independent trials that each have the same probability of success. Typical uses are counting heads in a set number of coin flips, conversions among a fixed number of visitors, or defective units in a batch of a known size.
P(X ≤ k) includes the outcome of exactly k successes; P(X < k) excludes it. Because the binomial is discrete, those two sums differ by the whole term P(X = k), which near the centre of the distribution can be a large share of the total.
Yes. The binomial coefficient is evaluated with the log-gamma function rather than by multiplying factorials, so intermediate values never overflow. Calculators that compute factorials directly fail once n passes about 170 and often return zero without warning.
The mean is n times p and the variance is n times p times one minus p. The variance is at its maximum when p is 0.5 and shrinks toward zero as p approaches 0 or 1, because an outcome that is nearly certain has little room to vary.
When n is large and p is very small, so that the expected count stays modest, the binomial converges on a Poisson distribution with a rate equal to n times p. Poisson is also the natural choice when there is no fixed number of trials at all, such as counting events per hour.
Only approximately. Removing items changes the probability for later draws, breaking independence. The approximation is usually acceptable when the sample is less than about 5% of the population; beyond that the hypergeometric distribution is the correct model.
Because both include the outcome of exactly k successes, so that term is counted twice. The two sums add to 1 plus P(X = k). To get a genuine complement, pair "at least k" with "at most k minus 1".
This calculator performs a probability computation on the values you enter. Whether the binomial model fits your situation depends on how the data was collected, which the tool cannot assess.