Binomial Distribution Calculator

Enter trials, success probability and successes to get exact binomial probabilities.

Calculator
Result

What this tool does

The probability of exactly k successes in n independent trials, each with success probability p, is C(n, k) × pᵏ × (1 − p)ⁿ⁻ᵏ. Getting exactly 4 heads in 10 fair coin flips has probability 210 ÷ 1,024 = 0.2051, and at most 4 heads is 0.3770. Enter your own n, p and k above.

Applies the binomial formula for a fixed number of independent yes-or-no trials.

Gives P(X = k) and the four cumulative probabilities, plus the mean and spread.

How to use it

  1. Enter the number of trials n.
  2. Enter the probability of success p, between 0 and 1.
  3. Enter the number of successes k.
  4. Read the probabilities and, for small n, the full table.

Why use this calculator

Gives the exact probability of k successes in n trials and all four cumulative forms (less than, at most, at least, more than) in one go. Binomial probabilities come up in quality control, surveys, medicine, games and statistics courses. The formula needs large factorials, and "at least" questions mean summing many terms, which is slow and error-prone by hand.

Why we built it

We built the binomial distribution calculator to give the exact probability and all four cumulative forms together, with the mean and spread. Count outcomes with the permutations and combinations calculator and combine events with the probability calculator.

Who this tool is for

  • Statistics students and teachers
  • Quality-control and survey analysts
  • Anyone estimating the odds of repeated yes-or-no events

When to use it

  • Finding the chance of at least k defects in a batch.
  • Solving a statistics homework problem.
  • Estimating the odds of a number of wins in repeated games.
  • Checking a survey result against a claimed rate.

How it works

P(X = k) = C(n, k) pᵏ (1 − p)ⁿ⁻ᵏ, where C(n, k) = n! ÷ (k!(n − k)!). Cumulative probabilities add these terms: P(X ≤ k) sums from 0 to k, and P(X ≥ k) = 1 − P(X < k). The mean is np, the variance np(1 − p) and the standard deviation its square root. The calculator works with logarithms of factorials so large n does not overflow.

Example: n = 10, p = 0.5, k = 4. P(X = 4) = 210 × 0.5¹⁰ = 0.205078. P(X ≤ 4) = 386 ÷ 1,024 = 0.376953, P(X ≥ 4) = 0.828125, mean 5 and standard deviation 1.5811.

It assumes the trials are independent and p is the same each time. Sampling without replacement from a small population needs a hypergeometric model instead.

A worked example

These are the values the calculator opens with, so you can see exactly what it does with them. Change any value on the page and the result updates; the figures below come from the same calculation.

Example inputs for the binomial distribution calculator
InputValue
Number of trials10
Probability of success on each trial0.5
Number of successes4

With those inputs, the calculator returns:

  • P(X = 4): 0.205078
  • P(X < k): 0.171875
  • P(X ≤ k): 0.376953
  • P(X ≥ k): 0.828125
  • P(X > k): 0.623047
  • Mean (n × p): 5
  • Variance (n × p × (1 − p)): 2.5
  • Standard deviation: 1.5811

What you give it, and what you get back

Input and output of Binomial Distribution Calculator
ItemDetails
n, p, kTrials (1 to 5,000), probability of success and number of successes.
OutputP(X=k), P(X<k), P(X≤k), P(X≥k), P(X>k), mean, variance, standard deviation and a table for n up to 30.

Issues you may run into

Common problems with Binomial Distribution Calculator
What you seeWhy it happensWhat to do
A probability shows as 1.2e-7Very small probabilities are shown in scientific notation.Read it as 0.00000012.
k is larger than nYou cannot have more successes than trials.Reduce k or increase n.
My trials are not independentThe binomial model needs independence.Use a different distribution for sampling without replacement.

Assumptions and limitations

Frequently asked questions

What is a binomial distribution?

The distribution of the number of successes in a fixed number of independent trials that each succeed with the same probability.

How do I calculate binomial probability?

Use C(n, k) × pᵏ × (1 − p)ⁿ⁻ᵏ, or enter n, p and k in the calculator.

What does at least k mean?

P(X ≥ k): the probability of k or more successes. It is one minus the probability of fewer than k.

What are the mean and standard deviation of a binomial?

The mean is n × p and the standard deviation is the square root of n × p × (1 − p).

When can I use a binomial distribution?

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

Is my information sent anywhere?

No. The calculation runs in your browser and nothing leaves the page.