Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Probability of exactly k successes
0.117188
P(X = k)
Binomial coefficient C(n,k) 120
P(X ≤ k) (cumulative) 0.171875
P(X ≥ k) 0.945312
Mean (n·p) 5
Variance 2.5
Standard deviation 1.5811

What is the Binomial Probability Calculator?

This calculator finds the probability of getting exactly k successes in n independent trials, where each trial has the same probability of success p. Situations that follow this pattern — coin flips, free-throw makes, defective items on a line, or yes/no survey answers — are described by the binomial distribution. Along with the exact probability it also returns the cumulative probabilities \(P(X \le k)\) and \(P(X \ge k)\), plus the distribution's mean, variance, and standard deviation.

How to use it

Enter the number of trials n (a positive whole number), the number of successes you are interested in k (between 0 and n), and the probability of success on a single trial p (a decimal between 0 and 1, e.g. 0.5 for a fair coin). Press calculate to see the probability of exactly k successes and the related summary statistics.

The formula explained

The binomial probability mass function is $$P(X=k) = \binom{n}{k} p^k (1-p)^{n-k}.$$ Here \(\binom{n}{k}\) — the binomial coefficient "n choose k" — counts how many distinct arrangements of k successes are possible, \(p^k\) is the chance those k trials all succeed, and \((1-p)^{n-k}\) is the chance the remaining trials all fail. Multiplying them gives the total probability of that specific count.

Diagram breaking the binomial formula into combinations, success and failure parts
The formula multiplies the number of ways to choose k successes by the probability of those successes and failures.

Worked example

Flip a fair coin 10 times (n=10, p=0.5) and ask for exactly 3 heads (k=3). \(\binom{10}{3}=120\), so $$P(X=3) = 120 \times 0.5^3 \times 0.5^7 = 120 \times 0.5^{10} = \frac{120}{1024} \approx 0.1172.$$ The distribution's mean is \(n \cdot p = 5\) and its standard deviation is \(\sqrt{10 \cdot 0.5 \cdot 0.5} \approx 1.5811\).

Bar chart of a binomial distribution with the most likely outcome highlighted
A binomial distribution plots \(P(X=k)\) for every possible number of successes k.

How to Calculate Binomial Probability by Hand

Given \(n\) independent trials, each with success probability \(p\), the chance of exactly \(k\) successes is computed in four steps.

  1. Count the arrangements (binomial coefficient). Compute \(\binom{n}{k}=\dfrac{n!}{k!\,(n-k)!}\), the number of distinct ways to choose which \(k\) of the \(n\) trials succeed. For example \(\binom{10}{8}=45\).
  2. Raise the success probability. Compute \(p^{k}\) — the probability that those \(k\) chosen trials all succeed.
  3. Raise the failure probability. Compute \((1-p)^{n-k}\) — the probability that the remaining \(n-k\) trials all fail.
  4. Multiply the three factors. \(P(X=k)=\binom{n}{k}\,p^{k}(1-p)^{n-k}\).

For a cumulative probability, sum the individual terms: \(P(X\le k)=\sum_{i=0}^{k}\binom{n}{i}p^{i}(1-p)^{n-i}\), and \(P(X\ge k)=1-P(X\le k-1)\).

Summary statistics of the distribution

For a binomial distribution you can also report:

  • Mean: \(\mu = np\)
  • Variance: \(\sigma^{2} = np(1-p)\)
  • Standard deviation: \(\sigma = \sqrt{np(1-p)}\)

Example: for \(n=10,\ p=0.8\) the mean is \(\mu=10\times0.8=8\), the variance is \(\sigma^{2}=10\times0.8\times0.2=1.6\), and the standard deviation is \(\sigma=\sqrt{1.6}\approx1.265\).

Key Terms & Variables

Term Symbol Meaning
Number of trials \(n\) The fixed count of independent, identical Bernoulli trials (e.g. 10 free throws, 20 sampled parts).
Number of successes \(k\) The exact number of "success" outcomes whose probability you want, with \(0\le k\le n\).
Success probability \(p\) The probability of success on any single trial, between 0 and 1; the failure probability is \(1-p\).
Binomial coefficient \(\binom{n}{k}\) "n choose k" — the number of ways to pick which \(k\) of the \(n\) trials succeed: \(\dfrac{n!}{k!(n-k)!}\).
Probability mass function (PMF) \(P(X=k)\) The probability of exactly \(k\) successes: \(\binom{n}{k}p^{k}(1-p)^{n-k}\).
Cumulative probability (lower) \(P(X\le k)\) Probability of \(k\) or fewer successes — the sum of the PMF from 0 to \(k\).
Cumulative probability (upper) \(P(X\ge k)\) Probability of \(k\) or more successes, equal to \(1-P(X\le k-1)\).
Mean (expected value) \(\mu=np\) The average number of successes expected over many repetitions of the \(n\) trials.
Variance \(\sigma^{2}=np(1-p)\) A measure of spread of the number of successes around the mean.
Standard deviation \(\sigma=\sqrt{np(1-p)}\) The square root of the variance, expressed in the same units as the count of successes.

FAQ

What is the difference between \(P(X=k)\) and \(P(X \le k)\)? \(P(X=k)\) is the chance of exactly k successes, while \(P(X \le k)\) sums the probabilities for 0 up to k successes (cumulative).

Can p be greater than 1? No. A probability must be between 0 and 1; values outside that range are clamped.

Does each trial have to be independent? Yes — the binomial model assumes a fixed number of independent trials with a constant success probability.

Last updated: