What this calculator does
Find the chance of getting a certain number of successes when you repeat the same yes-or-no test several times. That pattern is called the binomial distribution. It applies when you repeat the test a fixed number of times, with the same chance of success each time. Flipping a coin ten times and counting heads is one example. Checking twenty parts from a production line for defects is another. So is counting how many of 50 free throws go in.
Give the calculator three numbers: the number of tries (trials) n, the chance of success on each try p, and a number of successes k. It returns the chance of exactly k successes. It also gives four cumulative chances, which add up a range of outcomes: at most, at least, fewer than and more than k. You also get the mean (average), the variance and the standard deviation (the typical spread) of the number of successes. For up to 100 trials, it lists every possible outcome too.
Where it's used
Why this math matters outside the classroom:
- Guessing on tests. A student guessing on 10 four-choice questions has about a 5.8% chance of getting exactly 5 right.
- Defect rates. A factory with a 2% defect rate expects 0.4 defects in a box of 20, with a 0.98²⁰ ≈ 66.8% chance of none.
- Free throws. A 70% free-throw shooter who takes 5 shots makes all 5 with probability 0.7⁵, about 16.8%.
- Airline bookings. An airline expects 180 × 0.95 = 171 of 180 ticketed passengers to show up if each shows with probability 0.95.
- Coin flips. The chance of exactly 5 heads in 10 fair coin flips is C(10, 5) ÷ 2¹⁰ = 252/1024, about 24.6%.
Grade level and standards: Grade 12 to college; Common Core State Standards for Mathematics HSS.MD.A.3, HSS.CP.B.9. © Copyright 2010. National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.
How to use it
- Enter the number of trials, n.
- Enter the chance of success on a single trial, p, as a decimal from 0 to 1.
- Enter the number of successes, k, that you're interested in.
- Read the exact and cumulative chances and the working. For n up to 100, you'll also see a table of every outcome.
What the inputs mean
- Number of trials (n)
- How many times the test is repeated. Whole numbers from 1 to 1,000,000.
- Probability of success on each trial (p)
- The chance of success on each trial. It must be the same for every trial.
- Number of successes (k)
- The number of successes to check. It must be a whole number between 0 and n.
Formula and method
P(X = k) = C(n, k) × p^k × (1 − p)^(n − k) P(X ≤ k) = P(X = 0) + P(X = 1) + … + P(X = k) P(X ≥ k) = 1 − P(X ≤ k − 1) Mean = n × p, Variance = n × p × (1 − p), SD = √Variance
X is the number of successes you actually get, and P(…) means "the chance that". n is the number of trials, p is the chance of success on each one and k is the count you're asking about. C(n, k) is the number of ways to choose k trials out of n. SD is the standard deviation, and √ is the square root.
Any one particular order with k successes and n − k failures has a chance of p^k × (1 − p)^(n − k). That's because the trials don't affect each other (they're independent). There are C(n, k) ways to choose which trials are the successes. So the chance of exactly k successes multiplies the two.
The cumulative chances add up the single terms. Instead of adding one term at a time, the calculator uses a special function called the regularized incomplete beta function. It gives the same total accurately and quickly, even for a million trials. It also works out the upper tails (the "more than" side) directly. That way, very small chances keep their precision.
Worked example
A fair coin is flipped 10 times. What is the chance of exactly 6 heads, and of at most 6?
- Count the ways: C(10, 6) = 210.
- Each sequence has probability 0.5^6 × 0.5^4 = 1/1024.
- P(X = 6) = 210 × 1/1024 = 0.205078125.
- Adding up 0 to 6 heads gives P(X ≤ 6) = 848/1024 = 0.828125, so P(X > 6) = 0.171875.
- P(X ≥ 6) = 0.376953125 and P(X < 6) = 0.623046875.
Result: There's about a 20.5% chance of exactly 6 heads, and an 82.8% chance of 6 or fewer. The mean is 5 heads, the variance 2.5, and the standard deviation about 1.581139.
Understanding the result
P(X = k) is the chance of hitting k exactly. When n is large, any single value becomes unlikely. So cumulative chances such as 'at least k' usually tell you more.
The mean, n × p, is the average number of successes over the long run. The standard deviation shows the typical spread around it. Results within about two standard deviations of the mean are common. Results much further out are rare.
Assumptions and limitations
- The number of trials is fixed in advance.
- Each trial has only two outcomes, success or failure.
- The chance of success is the same on every trial, and the trials don't affect one another.
- Drawing from a small group without putting things back (such as drawing cards without replacing them) isn't binomial. That's because p changes from draw to draw. That situation needs the hypergeometric distribution.
- n is limited to 1,000,000 trials, and the full table only shows for n up to 100.
- Chances smaller than about 10^-300 show as 0, because of the limits of how computers store numbers (double precision).
Frequently asked questions
What is the difference between P(X ≤ k) and P(X < k)?
P(X ≤ k) includes k itself, and P(X < k) doesn't. For whole-number counts, P(X < k) equals P(X ≤ k − 1). The two differ by exactly P(X = k). That's why it matters which wording a question uses.
When can I use the normal distribution instead?
You can when n × p and n × (1 − p) are both fairly large. A common rule of thumb is at least 10. Then the binomial distribution looks close to a normal (bell) curve with the same mean and standard deviation. This calculator works out exact binomial chances, so you don't need the shortcut.
What does 'at least one success' mean in binomial terms?
It's P(X ≥ 1), which equals 1 − P(X = 0) = 1 − (1 − p)^n. Enter k = 1 and read P(X ≥ 1). For example, the chance of at least one six in four rolls of a die is about 0.5177.
Can p be 0 or 1?
Yes. With p = 0 every trial fails, so X is always 0. With p = 1 every trial succeeds, so X is always n. The calculator returns those certain outcomes exactly.
How this calculator is checked
Method: Binomial probability mass function; cumulative probabilities via the regularized incomplete beta function identity P(X ≤ k) = 1 − I_p(k + 1, n − k). The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.
Embed this calculator
Put this Binomial Distribution Calculator on your own website or blog for free. Paste this code where you want it to appear: