Skip to content

Binomial Distribution Calculator

Enter the number of trials n, the probability of success p and a number of successes k to get every binomial probability — exactly k, at most, fewer than, at least, more than, or a range — with the mean, variance, a full probability table and a bar chart. Free, no sign-up.

Adds P(k ≤ X ≤ this value) to the results.

Results

ProbabilityMeaningValue
P(X = 12)exactly 120.1201
P(X ≤ 12)at most 120.8684
P(X < 12)fewer than 120.7483
P(X ≥ 12)at least 120.2517
P(X > 12)more than 120.1316

10

Mean (np)

5

Variance (np(1 − p))

2.2361

Standard deviation

np = 10 and n(1 − p) = 10 are both at least 10, so the normal approximation N(10, 2.2361²) is reasonable. With a continuity correction it gives P(X ≤ 12) ≈ 0.8682, against the exact 0.8684.

Probability distribution

Binomial probabilities for n = 20, p = 0.5
kP(X = k)P(X ≤ k)P(X ≥ k)
09.54 × 10−79.54 × 10−71.0000
11.91 × 10−52.00 × 10−51.0000
20.00020.00021.0000
30.00110.00130.9998
40.00460.00590.9987
50.01480.02070.9941
60.03700.05770.9793
70.07390.13160.9423
80.12010.25170.8684
90.16020.41190.7483
100.17620.58810.5881
110.16020.74830.4119
120.12010.86840.2517
130.07390.94230.1316
140.03700.97930.0577
150.01480.99410.0207
160.00460.99870.0059
170.00110.99980.0013
180.00021.00000.0002
191.91 × 10−51.00002.00 × 10−5
209.54 × 10−71.00009.54 × 10−7

How to Use the Binomial Distribution Calculator

  1. 1. Enter the number of trials. n is how many times the experiment runs: 20 coin flips, 50 patients, 10 questions.
  2. 2. Enter the probability of success. p is the chance that one trial succeeds, between 0 and 1 — 0.5 for a fair coin, 0.25 for guessing among four options.
  3. 3. Enter k, and optionally a second value. k is the number of successes you are asking about. Fill in the second box to get the probability of a range as well.
  4. 4. Read the probabilities. You get P(X = k) and all four cumulative versions, the mean, variance and standard deviation, a note on the normal approximation, and — for n up to 200 — the full table and a bar chart.

What the Binomial Distribution Models

The binomial distribution counts successes in a fixed number of independent trials that each succeed with the same probability: heads in 20 coin flips, correct guesses on a multiple-choice test, or patients who respond to a treatment. Four conditions must hold — a fixed n, two outcomes per trial, a constant p, and trials that do not influence each other.

The probability of exactly k successes is P(X = k) = C(n, k) pk (1 − p)n − k, where C(n, k) = n! / (k! (n − k)!) counts the ways of choosing which trials succeed. The mean is np and the variance np(1 − p). The calculator evaluates the cumulative probabilities exactly through the regularised incomplete beta function, so even P(X ≥ 95) in 100 fair flips — about 6.26 × 10−23 — comes out right instead of as zero.

Translating a question into a probability
WordingNotationIncludes k?
exactly kP(X = k)Only k
at most k, no more than kP(X ≤ k)Yes
fewer than k, less than kP(X < k) = P(X ≤ k − 1)No
at least k, k or moreP(X ≥ k)Yes
more than k, greater than kP(X > k) = P(X ≥ k + 1)No
between a and b, inclusiveP(a ≤ X ≤ b)Both ends

Because the binomial is discrete, "at least 12" and "more than 12" are different questions with different answers. Turning the wording into one of these six forms is usually the hardest part of a binomial problem.

Worked Example: Coin Flips and Guessing

Flip a fair coin 20 times (n = 20, p = 0.5). The chance of exactly 12 heads is C(20, 12) × 0.520 = 125,970 / 1,048,576 = 0.1201. The chance of 12 or more is P(X ≥ 12) = 0.2517, and of at most 12 is 0.8684. Between 8 and 12 heads inclusive, P(8 ≤ X ≤ 12) = 0.7368. The mean is 10, the variance 5 and the standard deviation 2.2361.

Now a 20-question multiple-choice test with four options per question, answered by pure guessing (n = 20, p = 0.25). The expected score is 5, and the chance of passing with 10 or more correct is P(X ≥ 10) = 0.0139 — about 1 in 72.

When the normal approximation works

For large n the binomial looks normal, with mean np and standard deviation √(np(1 − p)). The usual rule is to approximate only when np ≥ 10 and n(1 − p) ≥ 10 — some textbooks accept 5 — and to apply a continuity correction of 0.5. For the coin example both counts are exactly 10, and the approximation gives P(X ≤ 12) ≈ Φ((12.5 − 10) / 2.2361) = 0.8682, against the exact 0.8684. With exact values a click away, the approximation is now mainly a teaching device.

Frequently Asked Questions

How do I calculate a binomial probability?
Use P(X = k) = C(n, k) pk (1 − p)n − k: the number of ways to place k successes among n trials, times the probability of any one such sequence. Cumulative probabilities add these terms. Enter n, p and k above and the calculator evaluates all of them at once.
What is the difference between P(X < k) and P(X ≤ k)?
P(X ≤ k) includes k and P(X < k) does not, so P(X ≤ k) = P(X < k) + P(X = k). For 20 fair coin flips, P(X ≤ 12) = 0.8684 while P(X < 12) = 0.7483 — the difference is P(X = 12) = 0.1201.
What are the conditions for a binomial distribution?
A fixed number of trials, two possible outcomes on each, the same probability of success every time, and independent trials. Drawing without replacement from a small population breaks the constant-p condition, so use the hypergeometric distribution there instead.
What are the mean and standard deviation of a binomial distribution?
The mean is np, the variance np(1 − p), and the standard deviation √(np(1 − p)). For n = 20 and p = 0.25 the mean is 5, the variance 3.75 and the standard deviation 1.9365.
Does the calculator work for large n?
Yes. n can run into the millions, because cumulative probabilities come from the incomplete beta function instead of from adding up thousands of terms, so precision does not degrade as n grows. The table and bar chart are drawn for n up to 200, where they stay readable.
When should I use a Poisson or normal distribution instead?
Use the Poisson for counts of events in an interval when there is no fixed number of trials; it also approximates the binomial when n is large and p small. Use the normal approximation only as a cross-check, and only when np and n(1 − p) are both at least 10.

Related Tools

More in Statistics Calculators

See all Statistics Calculators