search

Found

info Overview

Get the exact binomial P(X=k) plus cumulative and upper-tail probability, mean, variance and mode. Log-gamma math stays stable for n up to 1000.

📘 How to Use

  1. Set the number of trials n and success probability p
  2. Enter the number of successes k you care about
  3. Read the PMF, cumulative and upper-tail probabilities plus mean and variance

Binomial Distribution Probability Calculator

1 - 1000
0.50

0 ≤ p ≤ 1

0 ≤ k ≤ n

※ P(X=k) = C(n,k) × p^k × (1-p)^(n-k); mean = np; variance = np(1-p).

P(X = k)
P(X ≤ k)
P(X ≥ k)

Distribution properties

Mean (np)
Variance (np(1-p))
Std Deviation
Mode
Copied!
Article

Binomial Distribution Probability Calculator | P(X=k) for n Trials

Enter trials n, success probability p and successes k to get the exact probability P(X=k), the cumulative P(X≤k), the upper tail P(X≥k), plus mean, variance, standard deviation and mode — all on one screen so you can compare the probability and the spread at a glance.

💡 About this tool

Any time you repeat an independent yes/no trial — flipping a coin, pulling a loot drop, sampling parts off a line, surveying voters — the count of "successes" follows a binomial distribution. The trouble is the binomial coefficient C(n,k): once n climbs past 50 or so, the factorials blow past floating-point limits and a naive calculator returns Infinity or NaN. This tool sidesteps that by computing everything through the log-gamma function (Lanczos approximation) in log space, so it stays numerically stable all the way up to n = 1000.

It does not just hand you the point probability. The PMF, the cumulative P(X≤k), and the upper tail P(X≥k) appear together — which is exactly what you need for acceptance sampling or for sanity-checking an A/B test, where "at least k" and "at most k" matter far more than "exactly k". Mean np and variance np(1−p) sit right beside them so the centre and the spread are never a separate lookup.

🧐 Frequently Asked Questions

What is the difference between PMF and CDF? The PMF P(X=k) is the probability of exactly k successes. The CDF P(X≤k) sums the PMF from 0 up to k. The upper tail P(X≥k) is "k or more", computed as 1 − P(X≤k−1).

Can I type the probability p instead of using the slider? The slider sets p from 0 to 1 in steps of 0.01, so you can dial in round values like 0.5 or small defect rates like 0.03.

What happens if k is larger than n? k is constrained to the integers 0 through n. An out-of-range value triggers a validation message and no result — you can't have 25 successes in 20 trials.

What does the mode tell me? It is the most likely number of successes, ⌊(n+1)p⌋. For n=20, p=0.5 the mode is 10.

Does it handle p=0 or p=1? Yes. With p=0 you always get 0 successes; with p=1 you always get n. The probability mass collapses onto that single outcome.

📚 Where the binomial shows up

Quality engineers reach for the binomial constantly: a lot of N parts with defect rate p is exactly a binomial, and the upper tail tells you the chance of seeing "k or more" defects in your sample — the backbone of acceptance-sampling plans. Game designers use the same math in reverse, asking how many pulls it takes before the cumulative probability of at least one rare drop crosses 50%. Two famous approximations make the binomial a gateway distribution: when n is large and p moderate it converges to the normal distribution (the basis of the z-test for proportions), and when n is large but p is tiny it converges to the Poisson — which is why rare-event counts are so often modelled as Poisson rather than binomial.