Skip to content
Calcipedia
Binomial Distribution Calculator instructional illustration

Binomial Distribution Calculator

Calculate exact, cumulative, upper-tail, between-range, and exact two-sided binomial-test probabilities from n, k, and p.

Last updated

Binomial distribution calculator Find the exact probability of k successes, the cumulative probability of k or fewer successes, the upper-tail probability of k or more successes, and the mean and variance from a single set of n, k, and p inputs.

Quick examples

Start with a coin-toss example, a quality-control example, or a fair-coin benchmark, then adjust the trial count, success count, and success probability to match your own question.

A quick exact-probability check for a mid-range outcome.

Between probability

Use these optional bounds for questions like “between 3 and 6 successes” without changing the target k used above.

Result

0.250823

Exact probability of 4 successes in 10 trials at a 40% success rate.

0.250823

P(X = 4)

0.633103

P(X ≤ 4)

0.617719

P(X ≥ 4)

0.366897

P(X > 4)

4

Mean

2.4

Variance

1.55

Standard deviation

1

Exact two-sided p-value

0.777948

P(3 ≤ X ≤ 6)

4 successes

Most likely success count

P(X = 4) — exact probability0.250823
P(X ≤ 4) — cumulative0.633103
P(X ≥ 4) — upper tail0.617719
P(X > 4)0.366897
P(3 ≤ X ≤ 6) — between probability0.777948
Exact two-sided binomial-test p-value1
P(X < 4)0.382281
Mean (n · p)4
Variance (n · p · (1−p))2.4
Standard deviation1.55

How to read the result

P(X = k) is the exact point probability. P(X ≤ k) sums the lower tail, P(X ≥ k) includes the target count, and P(X > k) drops the kth outcome.

P(X = 4) = C(10, 4) × 0.4^4 × 0.6^6 = 0.250823

Nearby outcomes

The table below shows the selected outcome plus nearby success counts, which makes it easier to see whether 4 is close to the most likely count or already sitting in a thinner tail.

Probability of between 3 and 6 successes, inclusive: 0.777948.

SuccessesP(X = x)P(X ≤ x)P(X ≥ x)Context
10.0403110.0463570.993953Nearby
20.1209320.167290.953643Nearby
30.2149910.3822810.83271Nearby
40.2508230.6331030.617719Target and mode
50.2006580.8337610.366897Nearby
60.1114770.9452380.166239Nearby
70.0424670.9877050.054762Nearby
Binomial test lens The exact two-sided binomial-test p-value for 4 successes is 1. The selected count sits close to the centre of the distribution, so neither tail is especially small. Approximation note Normal approximation is a rough cross-check when n·p and n·(1−p) are both comfortably above 5. Here n·p = 4 and n·(1−p) = 6. P(X < k) would be 0.382281.
← All Statistics calculators

Probability Distributions

Binomial distribution calculator — exact, cumulative, and upper-tail probabilities

The binomial distribution models the number of successes in a fixed number of independent trials, each with the same probability of success.

When to use the binomial distribution

The binomial distribution applies when: (1) there are a fixed number of trials n; (2) each trial has exactly two outcomes — success or failure; (3) the probability of success p is constant; and (4) trials are independent.

Classic examples: the number of heads in n coin flips, the number of defective items in a sample of n products, the number of patients who respond to treatment out of n patients.

That also matches the search intent behind binomial distribution calculator, binomial probability calculator, and exact probability of k successes. Users usually want the exact probability, the cumulative probability, and the upper tail in one place so they can compare results without switching tools.

Three key probabilities

P(X = k) is the exact probability of getting exactly k successes. P(X ≤ k) is the cumulative probability of getting k or fewer successes. P(X ≥ k) is the upper-tail probability of getting k or more successes.

P(X > k) is the strict upper tail, which excludes the k-th outcome. That distinction matters when you compare a one-sided binomial probability with a p-value or a strict exceedance threshold.

P(a ≤ X ≤ b) is the between probability for a range of success counts. It is useful when the question is not exactly k, at most k, or at least k, but a practical band such as between 3 and 6 successes.

For a significance test, the p-value is 2 × min(P(X ≤ k), P(X ≥ k)) for a two-tailed test, or the relevant one-tailed probability.

Between probabilities and nearby success counts

Many binomial probability questions are range questions. A quality-control team may ask for the chance of between 0 and 2 defects, while a classroom probability problem may ask for between 3 and 5 heads. The between-probability controls on this page answer that directly without forcing you to add individual rows by hand.

The nearby-outcomes table shows the target count, the most likely success count, and the probability mass around the selected k. This is the practical difference between a thin answer and a useful binomial probability calculator: you can see whether the selected outcome is isolated, part of a broad middle region, or already drifting into a tail.

For large trial counts, the page shows a focused window around k rather than every possible count. That keeps the calculator readable on mobile while still exposing the local distribution shape that matters for interpretation.

Using the page as a binomial test calculator

A binomial test calculator does more than report P(X = k). It frames the observed count against the full null distribution so you can decide whether the result is unusually low, unusually high, or well within the range of ordinary sampling variation.

That is why this page keeps the lower tail, upper tail, and an exact two-sided binomial-test p-value together. One-sided questions such as at most k successes or at least k successes use the relevant tail directly, while the two-sided view checks outcomes that are at least as unlikely as the observed count under the same n and p.

This helps with common real questions: whether a batch defect count is worse than expected, whether a treatment response count is surprisingly low, or whether a coin-flip result is unusual enough to question a claimed success probability.

Further reading

Normal approximation and continuity correction

When n is large and p is not extremely close to 0 or 1, the binomial distribution can be approximated by a normal distribution with mean np and variance np(1 − p). A common rule of thumb is n·p ≥ 5 and n·(1 − p) ≥ 5.

For better accuracy near the boundary between discrete and continuous models, many statisticians apply a continuity correction when comparing binomial counts with the normal curve. Exact binomial probabilities are still the safest choice whenever the calculator can compute them directly.

The normal approximation is best treated as a cross-check. If one tail is very small, p is near 0 or 1, or the trial count is modest, the exact binomial answer is the better match for the question.

Further reading

Worked example: coin flips and quality control

A fair-coin problem is the classic binomial example: if the chance of heads is 50% and you flip the coin 8 times, this calculator can tell you the exact probability of 3 heads, the probability of 3 or fewer heads, and the probability of 3 or more heads.

The same structure works for defect counts, pass/fail batches, or response rates. If 10% of items are expected to be defective, a binomial distribution calculator can answer how likely it is to see exactly 2 defects in 20 items or how unusual that lower-tail result would be.

That is why searchers often look for a binomial probability calculator when they really want the exact probability of k successes, a cumulative probability, and a practical yes-or-no interpretation all at once.

How to read the result table

The exact probability row is the probability of one specific outcome. The cumulative row adds every outcome from 0 through k, while the upper-tail row adds every outcome from k through n.

If the exact probability is small but the cumulative probability is not, that usually means k is close to the middle of the distribution and there are many nearby outcomes with similar probability. If the upper-tail probability is small, the result sits in the upper end of the distribution and may be unusual under the stated success rate.

The mean and variance help you compare the observed success count with the centre and spread of the distribution. The mean is np, the variance is np(1−p), and the standard deviation is the square root of that variance.

Why nearby outcomes still matter

Competent probability work rarely stops at one row. Looking at the nearby outcomes tells you whether the chosen k is close to the mode, sitting on a gentle shoulder of the distribution, or already deep in a thin tail.

That matters because two scenarios can share a similar P(X = k) while implying different decisions once you inspect the surrounding mass. A tail threshold, a pass/fail quality rule, or a one-sided hypothesis question depends on the neighbouring outcomes, not just the single point probability.

That is also why this page reports the exact two-sided p-value alongside tail probabilities and the most likely success count. The combination helps you compare the observed outcome with its local alternatives before treating the result as surprising.

One-tailed versus two-tailed binomial tests

Use a one-tailed binomial probability when you only care about one side of the distribution. That is the right choice for at least k successes, at most k successes, or a lower-tail defect threshold.

Use a two-tailed binomial test when unusually high and unusually low counts are both evidence against the null hypothesis. In that case, the exact one-tailed values in this calculator give you the building blocks for the two-tailed p-value.

The distinction between P(X = k), P(X ≤ k), P(X ≥ k), and P(X > k) is the part most likely to change the conclusion, so the page keeps all four visible instead of hiding them behind a single summary number.

When the binomial model is not a good fit

The binomial model assumes independent trials, a fixed number of trials, and the same success probability on every trial. If those assumptions fail, the result can be misleading even when the arithmetic is correct.

Examples include changing probabilities over time, sampling without replacement from a small population, clustered outcomes, or outcomes that are not really just success and failure.

If the question sounds more like a count of rare events across exposure time, a Poisson distribution calculator may be a better match. If the question is about standardized deviation from a mean, a normal distribution calculator may be the better companion tool.

Frequently asked questions

What is the difference between P(X = k) and P(X ≤ k)?

P(X = k) is the exact (point) probability of getting exactly k successes. P(X ≤ k) is the cumulative probability of k or fewer successes — the sum of P(X = 0) through P(X = k). P(X ≤ k) is needed for one-tailed hypothesis tests.

When does the binomial approximate to the normal distribution?

When n is large and p is not close to 0 or 1, the normal approximation applies. A common rule: n·p ≥ 5 and n·(1−p) ≥ 5. For small n or extreme p, use exact binomial probabilities as computed here.

Can this calculator handle large n?

Yes. The calculator uses logarithmic arithmetic to compute binomial coefficients for large n without numerical overflow, handling n in the hundreds or thousands accurately.

How do I calculate a binomial p-value?

For a one-tailed test, use the relevant cumulative tail from this calculator. For a two-tailed test, a common shortcut is 2 × min(P(X ≤ k), P(X ≥ k)), although formal hypothesis tests may apply additional context or continuity corrections.

What does the exact two-sided p-value mean here?

It measures how much probability sits on outcomes that are at least as unlikely as the observed count under the same binomial model. That gives you an exact two-sided binomial-test view rather than a normal-approximation shortcut.

Does the calculator round n and k?

Yes. The calculator uses whole-number trial and success counts, so n and k are rounded to the nearest integers before the probability is evaluated.

How do I decide between one-tailed and two-tailed probabilities?

Use a one-tailed probability when you only care about results on one side of the distribution, such as at least k successes or at most k successes. Use a two-tailed probability when unusually high and unusually low counts are both relevant. For hypothesis tests, follow the alternative hypothesis: one-sided tests use one tail, while two-sided tests combine both tails.

How do I find the probability between two binomial values?

Enter the lower and upper success counts in the between-probability fields. The calculator sums P(X = lower) through P(X = upper), inclusive, so it can answer range questions such as P(3 ≤ X ≤ 6) without requiring manual addition.

What does the mean tell me in a binomial distribution?

The mean np tells you the centre of the distribution, or the long-run average number of successes you would expect from the stated number of trials and success probability.

What does the variance tell me in a binomial distribution?

The variance np(1−p) tells you how spread out the outcomes are around the mean. A larger variance means more scatter in the likely number of successes.

What if the probability is 0% or 100%?

Those are edge cases. If p is 0%, only zero successes are possible. If p is 100%, the number of successes must equal the number of trials.

Why should I look at nearby outcomes instead of only P(X = k)?

Because nearby counts reveal how quickly the distribution thins out around the selected outcome. That makes it easier to judge whether k is close to the most likely count, still in a broad middle region, or already in a tail that matters for a decision threshold or hypothesis test.

Is this the same as a binomial test calculator?

It is the same underlying distribution, but a binomial test calculator often adds a hypothesis-testing frame, such as a null hypothesis, a one-tailed or two-tailed p-value, and an interpretation of statistical significance.

Also in Statistics

Related

More from nearby categories

These related calculators come from the same leaf category, nearby sibling categories, or the same top-level topic.