Binomial Probability Calculator

Find the chance of a number of successes in a fixed number of tries, work out how many tries you need, find the success rate you'd need, or test whether a result is unusual. Every answer shows the exact fraction and the working.

What do you want to work out?

Type 0.25, 25% or 1/4.

"At least 3" includes 3. "More than 3" starts at 4.

Results update as you type. Press Calculate or Enter to save one to your recent list.

Practice questions

Five fresh questions each time, with worked answers. Teachers can print them as a worksheet with an answer key, or save it as a PDF from the print window.

    Is your problem binomial?

    Check four things before using the binomial formula. There's a fixed number of tries, decided in advance. Each try has two outcomes that matter, success or failure. The chance of success is the same every time. And the tries don't affect each other.

    Flipping a coin 10 times passes all four. Flipping until you get heads fails the first, because the number of tries isn't fixed. Drawing cards without putting them back fails the last two, because the deck changes after every card. That's a hypergeometric problem instead.

    The formula, piece by piece

    Binomial probability

    P(X = k) = C(n, k) × p^k × (1 − p)^(n − k)

    n is the number of tries, k is the number of successes, and p is the chance of success each time. p^k × (1 − p)^(n − k) is the chance of one particular order of successes and failures. C(n, k) counts how many different orders there are.

    Counting the orders

    C(n, k) = n! / (k! × (n − k)!)

    n! means n × (n − 1) × ... × 1, so 5! = 120. For 3 successes in 5 tries, C(5, 3) = 120 / (6 × 2) = 10. There's more on this in the combinations calculator.

    Average and spread

    Mean = n × p Standard deviation = √(n × p × (1 − p))

    Flip a fair coin 100 times and you'll average 50 heads, with a standard deviation of 5. About 95% of the time you'll get between 40 and 60 heads.

    At least one success

    P(X ≥ 1) = 1 − (1 − p)^n

    Rather than adding up every way to get one or more successes, work out the chance of none and subtract it from 1.

    A worked example by hand

    What's the chance of exactly 3 heads in 5 flips of a fair coin? Here n = 5, k = 3 and p = 0.5.

    First, C(5, 3) = 10. Then p^3 = 0.125 and (1 − p)^2 = 0.25. Multiply: 10 × 0.125 × 0.25 = 0.3125, which is 31.25%.

    Any one particular order, such as HHHTT, has a chance of 0.5^5 = 1/32, or 3.125%. There are 10 orders that give 3 heads, and 10 × 3.125% = 31.25%. That's the C(n, k) term at work.

    Real-world examples

    SituationnpResult
    Guessing 6 or more right on a 10-question, 4-option test101/41.97%
    Guessing 7 or more right on the same test101/40.35%
    A 75% free-throw shooter making exactly 8 of 101075%28.16%
    The same shooter making 8 or more of 101075%52.56%
    3 or fewer faulty items in 100, at a 2% fault rate1002%85.90%
    At least one recessive offspring of two carriers, in 4 offspring41/468.36%
    Items to check to catch a 10% fault rate, 95% sure2910%95.29%

    When approximations work and when they don't

    Before computers, big binomial problems were solved with the normal distribution. It still gives a quick estimate, but only when the expected number of successes and failures are both large enough. A common rule is that n × p and n × (1 − p) should both be at least 5. Some textbooks ask for 10. The often-quoted "n above 30" isn't the right test.

    Take 100 fair coin flips and ask for 45 heads or fewer. The exact answer is 18.41%. The normal approximation gives 18.41% with the continuity correction, which widens each count by half a step, and 15.87% without it.

    Now take 20 tries at a 5% chance and ask for at least 3 successes. The exact answer is 7.55%. The normal approximation gives 6.19%, because n × p is only 1. The Poisson approximation, designed for many tries with a small chance, gives 8.03%. Switch to Advanced mode to see all three next to the exact answer for your own inputs.

    Mistakes that give the wrong answer

    Leaving out C(n, k). Without it you get the chance of one particular order, not the chance of k successes in any order.

    Mixing up "at least" and "more than". At least 3 includes 3. More than 3 starts at 4. The calculator has both, plus "fewer than" and "between".

    Using binomial when the chance changes. Card draws without replacement, or anything where earlier results change later odds, break the rules. The formula still gives a number, but it's the wrong one.

    Reading a p-value as the chance your idea is true. A p-value is the chance of a result at least this unusual if your expected rate is right. It isn't the chance the expected rate is wrong.

    How we calculate

    For up to 1,000 tries, with a chance of success that's a simple fraction or has up to 4 decimal places, results use exact whole-number arithmetic (JavaScript BigInt), so the fraction you see is exact. Above that, the calculator works in logarithms to avoid rounding errors and adds terms outward from the most likely count until they no longer change the answer. Percentages are rounded only at the last step.

    The test uses the exact binomial test, and the range for the true rate uses the Clopper-Pearson interval, which is exact and slightly cautious. "Tries needed" and "Success rate needed" search for the smallest number of tries, or the lowest rate, that meets your target. Every number in the examples and tables on this page was checked against an independent calculation in Python using SciPy. If you spot a mistake, let us know and we'll correct it and note the change here.

    The calculator assumes independent tries with the same chance of success each time. If that doesn't hold, the answer won't be reliable.

    References

    • Sheldon Ross, A First Course in Probability, 10th edition, Pearson, 2019. Chapter 4 covers the binomial distribution.
    • William Feller, An Introduction to Probability Theory and Its Applications, Volume 1, 3rd edition, Wiley, 1968.
    • C. J. Clopper and E. S. Pearson, "The Use of Confidence or Fiducial Limits Illustrated in the Case of the Binomial", Biometrika, 26(4), 1934.
    • NIST/SEMATECH e-Handbook of Statistical Methods, section on the binomial distribution.
    • Charles Grinstead and J. Laurie Snell, Introduction to Probability, 2nd edition, American Mathematical Society, 1997.

    Related calculators

    Questions people ask

    What's the difference between the binomial and normal distributions?

    The binomial counts whole successes in a fixed number of tries, so you can't get 3.5 successes. The normal distribution is continuous and can approximate the binomial when n × p and n × (1 − p) are both at least 5. For small or lopsided problems the approximation can be well off, so use the exact answer when you can.

    Why does C(n, k) matter so much?

    It counts every order that gives k successes. For 3 successes in 5 tries there are 10 orders, so leaving it out makes the answer 10 times too small.

    What's the difference between "at least" and "more than"?

    "At least 3" includes 3. "More than 3" starts at 4. The same goes for "at most" and "fewer than". The calculator has all four, plus "between".

    How many tries do I need to be 95% sure of at least one success?

    Find the smallest n where 1 − (1 − p)^n is at least 0.95. With a 10% chance each time, that's 29 tries. The "Tries needed" mode works it out for any chance, target and number of successes.

    Can the chance of success be different on each try?

    Not in a binomial model. If the chance changes from try to try, you need the Poisson binomial distribution instead.

    What if k is bigger than n?

    The chance of exactly k successes is 0, because you can't have more successes than tries. The calculator asks you to fix the numbers so the question makes sense.

    Can I use this for an A/B test?

    You can use "Test a result" to check one group against a known rate, such as whether 60 sign-ups from 1,000 visitors beats a 5% baseline. Comparing two groups against each other needs a two-sample test, which this page doesn't do.

    Every result shows its working, so you can check it yourself. Make sure your inputs match the situation you're modelling.