Binomial Distribution Calculator

P(X = k) — exact probability—
P(X ≤ k) — at most k—
P(X ≥ k) — at least k—
Mean (n × p)—
Standard deviation—

How Binomial Distribution Calculator is calculated: P(X = k) = C(n, k) × pᵏ × (1−p)ⁿ⁻ᵏ; mean = n×p; SD = √(n×p×(1−p))

What is the binomial distribution?

The binomial distribution answers one of the most common questions in probability: if you repeat the same yes-or-no trial n times, each with the same chance p of success, how likely is each possible number of successes? Toss a coin ten times and the chance of exactly five heads is about 24.6%. Answer ten multiple-choice questions by guessing and the chance of getting exactly five right is far lower. The same formula covers both — only n and p change.

The distribution is built from three ingredients. The number of trials n sets how many chances there are. The probability p sets how likely each single trial is to succeed. The number of successes k is the outcome you are asking about. The probability of exactly k successes is C(n, k) × pᵏ × (1−p)ⁿ⁻ᵏ: the binomial coefficient counts the ways to get k successes, pᵏ is the chance those trials succeed, and (1−p)ⁿ⁻ᵏ is the chance the rest fail.

This calculator takes n, p and k and returns the exact probability P(X = k), the cumulative probabilities P(X ≤ k) and P(X ≥ k), the mean and the standard deviation. The results update live as you type. Everything runs in your browser, so nothing is uploaded and nothing is stored. It is built for students meeting the binomial distribution for the first time, and for anyone who needs a real answer to a repeated-trials question.

The binomial formula, worked with real numbers

Take the default example on this page: n = 10 trials, p = 50% success chance, k = 5 successes. The binomial coefficient C(10, 5) is 252. The chance of five successes and five failures in a particular order is 0.5⁵ × 0.5⁵ = 0.5¹⁰ = 1/1,024. Multiply: 252 ÷ 1,024 = 0.2461, which the calculator shows as 0.25. So the chance of exactly five heads in ten tosses is about one in four.

The cumulative probabilities add up the single outcomes. P(X ≤ 5) is the chance of five or fewer successes: the probabilities for k = 0, 1, 2, 3, 4 and 5 add up to 638 ÷ 1,024 = 0.6230, shown as 0.62. P(X ≥ 5) is the chance of five or more: the probabilities for k = 5 through 10 also add up to 0.62, because the coin is fair and the distribution is symmetric. Notice that P(X ≤ 5) and P(X ≥ 5) both include the k = 5 outcome, so they add up to more than 1 — that is correct, and it is a common source of confusion.

The mean is n × p, which is 10 × 0.5 = 5: on average you get five heads in ten tosses. The standard deviation is √(n × p × (1−p)), which is √2.5 = 1.58. That tells you the results typically land within about one and a half of the mean — most of the time you will see between 3 and 7 heads, and seeing 0 or 10 is very unlikely. The standard deviation calculator measures spread for a list of numbers; here the same idea measures how far the count of successes typically wanders from its mean.

The three inputs — n, p and k

n is the number of trials, and it must be a whole number. Ten coin tosses, twenty free throws, a hundred light bulbs tested — each trial is one independent attempt with the same chance of success. If the trials are not independent, or the chance changes from trial to trial, the binomial distribution does not apply, and no calculator can fix that: check the setup before you trust the answer.

p is the chance of success on a single trial, entered here as a percentage between 0 and 100. A fair coin is 50%; a multiple-choice question with four options, guessed at random, is 25%; a free throw by a good shooter might be 80%. A small change in p moves the whole distribution: with p = 30% and n = 20, the most likely number of successes is 6, not 10, and the chance of exactly 6 is 0.19.

k is the number of successes you are asking about, and it must be between 0 and n. Asking for the chance of 12 successes in 10 trials is meaningless, and the calculator shows a dash. If you want the chance of “at most” or “at least” a number, read the cumulative rows instead of the exact row — that is what they are for. A percentage calculator is handy for converting the decimal probabilities here into percentages: 0.25 is 25%.

A worked example: 10 tosses, 5 heads

Work through the default example in full. Ten tosses of a fair coin, p = 50%, asking about k = 5 heads. The exact probability is C(10, 5) × 0.5¹⁰ = 252 × 0.0009765625 = 0.2461, shown as 0.25. That is the most likely single outcome — no other number of heads is more likely — yet it still happens only about a quarter of the time.

The cumulative rows tell the rest of the story. P(X ≤ 5) is 0.62: there is a 62% chance of five heads or fewer. P(X ≥ 5) is also 0.62, by symmetry. The mean is 5 and the standard deviation is 1.58, so most results fall between 3 and 7 heads. The chance of 0 heads is 1 in 1,024, and the chance of 10 heads is the same — rare events at both ends.

Now change the probability and watch the distribution move. Take n = 20, p = 30%, k = 6. The exact probability is C(20, 6) × 0.3⁶ × 0.7¹⁴ = 38,760 × 0.000729 × 0.00678 = 0.19. The chance of six or fewer successes is 0.61, the chance of six or more is 0.58, the mean is 6 and the standard deviation is 2.05. The most likely outcome is now 6, not 10, because the success chance dropped — the distribution follows p wherever it goes.

Where the binomial distribution shows up

Quality control is the classic use. A factory tests 100 items from a batch where 2% are faulty, and wants the chance that at most 3 are faulty. That is a binomial question with n = 100, p = 2%, and the cumulative probability P(X ≤ 3). If that chance is high, the batch ships; if it is low, the batch is inspected again. The decision is a number, not a guess.

Medicine uses it for trials and tests. If a drug works for 70% of patients, the chance that at least 8 out of 10 treated patients improve is a binomial calculation with n = 10, p = 70%. Diagnostic tests are judged the same way: a test that is right 95% of the time will still be wrong about once in twenty tests, and the binomial distribution tells you how often a run of tests contains a wrong result.

Exams and games are the everyday uses. Guessing on a 20-question test with four options per question gives p = 25%, and the chance of passing by guessing alone is the cumulative probability above the pass mark — tiny, which is why guessing does not work. A basketball player who makes 80% of free throws has a binomial distribution over any set of attempts, and the probability calculator can turn the counts here into the chance of a specific run of makes and misses.

Binomial distribution vs normal distribution

The binomial distribution is exact, and it is discrete: it only takes whole-number values from 0 to n. The normal distribution is continuous and bell-shaped, and it approximates the binomial when n is large and p is not too close to 0 or 1. For n = 10 and p = 50%, the normal approximation is rough; for n = 100 and p = 50%, it is good. The rule of thumb is that the approximation works when both n×p and n×(1−p) are at least 10.

The mean and standard deviation are the bridge between the two. A binomial with mean μ = n×p and standard deviation σ = √(n×p×(1−p)) can be approximated by a normal distribution with the same mean and standard deviation, and the normal distribution then gives the probabilities. That is why this calculator shows the mean and the standard deviation alongside the exact probabilities — they are the two numbers the approximation needs.

Use the exact binomial whenever you can, especially for small n or for p near 0 or 1, where the normal approximation breaks down. For n = 5 and p = 50%, the chance of zero successes is exactly 0.03 — one in thirty-two — and the normal curve would give a misleading answer at the edge. The binomial calculation is cheap and exact, so there is no reason to approximate until n is large enough that the factorials become unwieldy.

Common binomial distribution mistakes

The first mistake is confusing P(X = k) with P(X ≤ k). The chance of exactly 5 heads in 10 tosses is 0.25; the chance of 5 or fewer is 0.62. They answer different questions, and using one when you need the other is the most common error with this distribution. Read the row label before you quote a number.

The second mistake is forgetting that the trials must be independent with the same p. Drawing cards without replacing them changes the odds after every draw, so the binomial does not apply — that is a hypergeometric problem. Tossing a coin, testing light bulbs from a huge batch, or guessing on separate questions all qualify, because one trial does not change the next.

The third mistake is entering p as a decimal when the calculator expects a percentage, or the other way round. This calculator takes p as a percentage from 0 to 100, so a fair coin is 50, not 0.5. Typing 0.5 would mean a 0.5% chance of success, which gives a completely different answer. Check the box label before you type.

The fourth mistake is treating the mean as the most likely outcome. The mean of 5 for ten fair tosses is the average over many runs, and 5 is also the most likely single outcome here — but that is a coincidence of the symmetric case. With n = 20 and p = 30%, the mean is 6 and the most likely outcome is also 6, but with n = 10 and p = 30%, the mean is 3 and the most likely outcome is 3 as well — yet in general the mean need not be a whole number at all, and the most likely outcome is the whole number nearest to it.

How to use this binomial distribution calculator

Type the number of trials n, the success probability p as a percentage, and the number of successes k. The exact probability, the two cumulative probabilities, the mean and the standard deviation update live as you type. Try changing p and watch the distribution shift; try changing n and watch it spread out.

Read the exact row when you want the chance of one specific outcome, and the cumulative rows when you want “at most” or “at least”. The mean tells you the long-run average, and the standard deviation tells you how much the result typically varies from run to run. If a row shows a dash, k is outside 0 to n, or p is outside 0 to 100 — fix the input and the results will appear.

Everything runs in your browser. No account, no sign-up, no data sent anywhere. Use it to check homework, to judge a quality-control sample, or to work out the odds in a game. If you need the number of ways to get k successes, a factorial calculator can check the binomial coefficient, and the formula is shown on this page so you can verify the result by hand.

Frequently Asked Questions

The chance of exactly 5 heads in 10 tosses of a fair coin is C(10, 5) × 0.5¹⁰ = 252 ÷ 1,024 = 0.2461, about 25%. The chance of 5 or fewer heads is 0.62, and the chance of 5 or more is also 0.62. The mean is 5 and the standard deviation is 1.58.

The mean of a binomial distribution is n × p, and the standard deviation is √(n × p × (1 − p)). For n = 10 and p = 50%, the mean is 5 and the standard deviation is √2.5 = 1.58. The standard deviation measures how far the count of successes typically wanders from the mean.

P(X ≤ k) is the chance of k or fewer successes, and P(X ≥ k) is the chance of k or more. Both include the k outcome itself, so they add up to more than 1. For n = 10, p = 50%, k = 5, both are 0.62.

No — the binomial distribution needs independent trials with the same success probability p. Drawing cards without replacing them changes the odds after every draw, so the binomial does not apply; that is a hypergeometric problem. Tossing coins or testing items from a very large batch does qualify, because one trial does not change the next.

More free tools

More calculators and utilities from Sortrun — free, no sign-up.