Binomial distribution calculator

Enter the number of trials n, the success probability p and the count k. You get the exact probability, the cumulative and tail probabilities, the mean and standard deviation, and a chart.

A whole number from 1 to 100000.
A decimal from 0 to 1, for example 0.5.
A whole number from 0 to n.
P(X = k)0.24609375
P(X ≤ k)
0.623046875
P(X < k)
0.376953125
P(X ≥ k)
0.623046875
P(X > k)
0.376953125
Mean (n·p)
5
Variance (n·p·(1 − p))
2.5
Standard deviation
1.58113883

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Enter n, p and k.
  2. Read P(X = k) first, then the cumulative and tail probabilities.
  3. In the chart the bar for k is highlighted.

How it works

The probabilities for every count 0…n are built from P(0) = (1 − p)ⁿ with the ratio between neighbours, in logarithms so large n does not overflow. Each tail is summed directly instead of as 1 minus the other tail, so very small probabilities keep their digits. The mean is n·p and the variance n·p·(1 − p).

Worked example

Ten fair coin tosses, n = 10, p = 0.5, k = 5: P(X = 5) = 252 / 1024 = 0.24609375, P(X ≤ 5) = 638 / 1024 = 0.623046875 and P(X ≥ 5) is the same 638 / 1024 by symmetry. The mean is 5.

Tips

  • For large n with p not near 0 or 1 the shape is close to the normal distribution.
  • For rare events with many trials, compare with the Poisson calculator.

Frequently asked questions

When does a binomial distribution apply?

When there is a fixed number n of independent trials, each with the same chance p of success, and you count the successes, such as heads in 10 coin tosses.

What is the formula?

P(X = k) = C(n, k) · pᵏ · (1 − p)ⁿ⁻ᵏ, where C(n, k) = n! / (k!(n − k)!) is the number of ways to choose which trials succeed.

How do I get “at least” and “between” probabilities?

Use P(X ≥ k) for at least k. For a range from a to b, subtract: P(a ≤ X ≤ b) = P(X ≤ b) − P(X < a).

Why is the chart missing for large n?

The chart shows the main part of the distribution, about 4.5 standard deviations either side of the mean. When that would need more than 150 bars it is left out, but the numbers are still exact.

More in Math

All tools in this category: Math ·Updated November 3, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.