UTILS.
Private by default
🎯

Binomial Distribution Calculator

Compute binomial probabilities P(X = k), P(X ≤ k) and P(X ≥ k) for n trials with success probability p, plus the mean and standard deviation.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →

About this tool

The Binomial Distribution Calculator finds the probability of getting exactly, at most, or at least k successes in n independent trials that each succeed with probability p. Enter n, p and k (p as a decimal from 0 to 1 or as a percentage), and every result updates instantly in your browser with no data leaving your device.

The exact probability is P(X = k) = C(n, k)·pᵏ·(1 − p)^(n − k), where the binomial coefficient C(n, k) is built with a numerically stable loop, c = c·(n − k + i)/i for i = 1…k, to avoid factorial overflow at large n. The cumulative values are P(X ≤ k) = Σ from i = 0 to k and P(X ≥ k) = Σ from i = k to n. The mean is n·p, the variance is n·p·(1 − p), and the standard deviation is its square root.

Both n and k must be whole numbers with 0 ≤ k ≤ n and n ≥ 1, and p must lie between 0 and 1; anything else is flagged as invalid. The model assumes fixed n, constant p and independent trials — the classic "coin flips" or "defective parts" setting.

Frequently asked questions

What is the exact-probability formula?
P(X = k) = C(n, k)·pᵏ·(1 − p)^(n − k), where C(n, k) = n! / (k!(n − k)!) counts the ways to arrange k successes among n trials. It is computed with a stable loop so large n does not overflow.
What is the difference between P(X ≤ k) and P(X ≥ k)?
P(X ≤ k) sums the probabilities of 0 up to k successes (at most k); P(X ≥ k) sums k up to n successes (at least k). Both include exactly k, so they overlap at that single term.
Can I enter p as a percentage?
Yes. Choose the Percent mode and type, for example, 50 for a fair coin; in Decimal mode type 0.5. The tool converts internally and requires the result to be between 0 and 1.
What are the mean and standard deviation for?
The mean n·p is the expected number of successes, and the standard deviation √(n·p·(1 − p)) measures how much the count typically varies around that expectation across repeated experiments.

More tools