Binomial Distribution Calculator

Find the probability of getting exactly k successes in n independent trials, and the cumulative probabilities of at most, fewer than, at least, or more than k.

Binomial Distribution Calculator

Exact and cumulative binomial probabilities, mean, variance and a distribution chart.

Between 0 and 1 (e.g. 0.25).

Results

P(X = 6)

0.205078

P(X < 6)
0.623047
P(X ≤ 6)
0.828125
P(X > 6)
0.171875
P(X ≥ 6)
0.376953
Mean (expected value)
5
Variance
2.5Std. deviation 1.581139

Probability distribution

00.050.10.150.20.25012345678910Number of successes (k)
Probability table
kP(X = k)P(X ≤ k)
00.0009765630.000976563
10.009765630.0107422
20.04394530.0546875
30.1171880.171875
40.2050780.376953
50.2460940.623047
60.2050780.828125
70.1171880.945313
80.04394530.989258
90.009765630.999023
100.0009765631

How to use the binomial distribution calculator

  1. Enter the number of independent trials n.
  2. Enter the probability of success on each trial p as a decimal between 0 and 1.
  3. Enter the number of successes k you are interested in.
  4. Read the exact and cumulative probabilities and see where k falls in the chart.

How the calculation works

A binomial experiment has a fixed number of independent trials, each with the same probability of success. The probability of exactly k successes is the number of ways to choose which k trials succeed, C(n, k), times the probability of any one such sequence, pk(1 − p)n−k. Cumulative probabilities add these terms.

To stay accurate for large n (where C(n, k) overflows and pk underflows), the calculator works with logarithms and only exponentiates the final term. Very small probabilities are shown in scientific notation.

Formula

Exact probability
P(X = k) = C(n, k) pk (1 − p)n−k
Binomial coefficient
C(n, k) = n! ÷ (k! (n − k)!)
Cumulative
P(X ≤ k) = Σi=0..k P(X = i)
Mean and variance
μ = np    σ² = np(1 − p)

Worked examples

6 heads in 10 fair coin flips

C(10, 6) = 210. P(X = 6) = 210 × 0.510 = 210 ÷ 1024 = 0.205078. P(X ≤ 6) = 848 ÷ 1024 = 0.828125. Mean = 5, variance = 2.5.

At least one defect in 20 items at 5% defect rate

P(X ≥ 1) = 1 − P(X = 0) = 1 − 0.9520 = 0.641514.

Assumptions and limitations

  • Requires independent trials with a constant probability of success. Sampling without replacement from a small population follows the hypergeometric distribution instead.
  • n is limited to 100,000 to keep the page responsive.

Frequently asked questions

What is the difference between P(X ≤ k) and P(X < k)?

P(X ≤ k) includes k itself, while P(X < k) stops at k − 1. For example, P(X ≤ 3) = P(0) + P(1) + P(2) + P(3), but P(X < 3) = P(0) + P(1) + P(2). For a discrete distribution the difference is exactly P(X = k).

When can I use the binomial distribution?

When there is a fixed number of trials, each trial has two outcomes, trials are independent, and the success probability is the same every time.

What is binomial PDF vs CDF?

The PDF (strictly, the probability mass function) gives P(X = k). The CDF gives the cumulative P(X ≤ k).

Formulas last reviewed . Read our calculation methodology or report a problem.

All math calculators