Maths

Binomial Distribution Calculator

Find exact, at-most and at-least binomial probabilities, with the mean and standard deviation.

By Nitin Raturi · Last reviewed

Your worksheet

How to use the Binomial Distribution Calculator

Find the probability of a number of successes in repeated yes-or-no trials.

  1. Enter the number of trials and the chance of success.
  2. Enter the number of successes.
  3. Choose exactly, at most, at least or another relation.
  4. Read the probability, mean and standard deviation.

Good to know

  • At most and more than always add to 1.

P(X = k) = C(n, k) pᵏ (1 − p)ⁿ⁻ᵏ, summed for at most, at least and more.

Number of trials (n)

How many times the experiment is repeated.

How to fill it in

  • Enter a whole number from 1 to 1,00,000.

Chance of success (p)

The probability of success on each single trial.

How to fill it in

  • Enter 0 to 1: 0.41 means 41%.

Example

With n = 20 and p = 0.41 the mean is 8.20 and the standard deviation 2.20.

Number of successes (k)

The count of successes you are asking about.

How to fill it in

  • Enter a whole number from 0 to n.

Example

In 10 fair coin tosses, exactly 5 heads has probability 0.2461; at least 7 heads, 0.1719.

Probability of

Whether you want exactly k, at most k, fewer than k, at least k or more than k.

How to fill it in

  • Choose =, ≤, <, ≥ or >.

Example

n = 200, p = 0.015: P(X = 5) = 0.1011.

P(X ≤ 12)

0.9738

With 20 trials and a 0.41 chance of success each, the probability of at most 12 successes is 0.9738 (97.38%).

P(X = 12)
0.0417
Mean (np)
8.2000
Standard deviation
2.1995
Most likely count
8

Independent trials with the same chance of success each time, and only two outcomes per trial.

How this calculator works

  1. Step 1WaysC(n, k)How many orders give k successes.
  2. Step 2Each waypᵏ (1 − p)ⁿ⁻ᵏProbability of one such order.
  3. Step 3AddΣ over the rangeFor at most, at least and so on.

A binomial experiment repeats the same yes-or-no trial a fixed number of times, with the same chance of success each time. The count of successes then follows the binomial distribution.

The chance of exactly k successes is the number of ways to choose which trials succeed, times the chance of any one such pattern.

Worked example: OpenStax Example 4.13

n = 20, p = 0.41: probability of at most 12 successes
P(X ≤ 12)
Σ C(20, k) 0.41ᵏ 0.59²⁰⁻ᵏ for k = 0 to 12
  1. Mean20 × 0.418.20
  2. Standard deviation√(20 × 0.41 × 0.59)2.20
  3. P(X ≤ 12)0.9738

OpenStax gives 0.9738, μ = 8.2 and σ = 2.20.

Read the result

  • Exactly 5 heads0.2461
  • At least 7 heads0.1719
Ten fair coin tosses

Even the most likely result is far from certain: exactly 5 heads in 10 tosses happens with probability 0.2461.

  • n = 200, p = 0.0150.1011Probability of exactly 5 cases.
  • Mean3.00Expected number of cases.

Assumptions and limits

  • Fixed nThe number of trials is set in advance.
  • Same pEvery trial has the same chance.
  • IndependentOne result does not change the next.
  • Two outcomesEach trial is success or failure.

The binomial counts successes in a fixed number of tries. Rates over time use the Poisson instead.

For events at an average rate, use the Poisson distribution calculator. With many tries, the normal distribution calculator gives a close approximation, and the permutation and combination calculator counts the ways.

Common mistakes

  • Mistake: Using it for draws without replacement from a small group.

    Instead: Use the hypergeometric distribution then.

  • Mistake: Mixing up at least and more than.

    Instead: At least k includes k; more than k does not.

Checking the method

A separate script works every probability as an exact fraction with exact combinations and reproduces OpenStax Examples 4.13 to 4.15.

Read how we test our calculators, or browse more maths calculators.

Frequently asked questions

What is P(X ≤ 12) for n = 20 and p = 0.41?

0.9738, as in OpenStax Example 4.13, with mean 8.20 and SD 2.20.

What is the chance of exactly 5 heads in 10 tosses?

0.2461: C(10, 5) ÷ 2¹⁰ = 252 ÷ 1,024.

And at least 7 heads?

0.1719, adding the chances of 7, 8, 9 and 10 heads.

How do I handle a rare event?

The same way. With n = 200 and p = 0.015, P(X = 5) = 0.1011.

What are the mean and standard deviation?

Mean = np and standard deviation = √(np(1 − p)).

Sources and methodology

The formulas are standard time-value-of-money results. We check every figure against golden values worked out independently, by closed form and by month-by-month simulation; see the methodology.

Written and maintained by Nitin Raturi, a software engineer (about the author). Last reviewed 4 Nov 2026; next review due by . Found an error? Tell us.

Changelog

  • : Initial release.