Quick answer
The binomial probability is P(X = k) = C(n, k) p^k (1 − p)^(n − k). For 10 fair-coin flips, P(exactly 5 heads) = 0.246094 and P(at most 5) = 0.623047, with a mean of 5 and variance of 2.5.
Enter the number of trials, the success probability and the number of successes. The calculator returns the exact and cumulative probabilities, mean and variance. Use this binomial distribution calculator to check your own figures.
Related tools: Poisson Distribution Calculator: Poisson probabilities for a given mean rate. Normal Distribution Calculator: Probabilities for a normal distribution. Sampling Distribution of the Mean Calculator: Probability for a sample mean using the central limit theorem.
How to use the Binomial Distribution Calculator
- Enter trials (n) (a whole number, between 1 and 1000).
- Enter success probability (p) (between 0 and 1).
- Enter successes (k) (a whole number, 0 or more).
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Trials (n) | A whole number | ≥ 1, ≤ 1000 |
| Success probability (p) | A number | ≥ 0, ≤ 1 |
| Successes (k) | A whole number | ≥ 0 |
Formula and method
Formula
P(X = k) = C(n, k) p^k (1 − p)^(n − k)
IEEE-754 double precision; shown to at most 6 decimal places.
Direct evaluation with exact binomial coefficients (BigInt) converted to floating point.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Trials (n) = 10; Success probability (p) = 0.5; Successes (k) = 5.
| Result | Value |
|---|---|
| P(X = 5) | 0.246094 |
| P(X ≤ k) | 0.623047 |
| Mean | 5 |
| Variance | 2.5 |
Example 2
Inputs: Trials (n) = 3; Success probability (p) = 0.5; Successes (k) = 3.
| Result | Value |
|---|---|
| P(X = 3) | 0.125 |
| P(X ≤ k) | 1 |
| Mean | 1.5 |
| Variance | 0.75 |
Example 3
Inputs: Trials (n) = 5; Success probability (p) = 1; Successes (k) = 5.
| Result | Value |
|---|---|
| P(X = 5) | 1 |
| P(X ≤ k) | 1 |
| Mean | 5 |
| Variance | 0 |
The first line is the headline result (p(X = 5)). Below it the binomial Distribution Calculator lists p(X ≤ k), mean and variance, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.
Worked example
C(10, 5) = 252 and 0.5^10 = 1/1,024, so 252 ÷ 1,024 = 0.246094. The mean is np = 5 and variance np(1 − p) = 2.5.
Conditions
Use it when trials are independent, each has two outcomes and p is constant. k cannot exceed n. For large n, the normal approximation works when np and n(1 − p) are both above about 10.
How the result changes with trials
Holding every other input at the first worked example, this table changes only trials. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| Trials | P(X = 5) | P(X ≤ k) | Mean |
|---|---|---|---|
| 5 | 0.03125 | 1 | 2.5 |
| 10 | 0.246094 | 0.623047 | 5 |
| 20 | 0.014786 | 0.020695 | 10 |
| 40 | 0.000001 | 0.000001 | 20 |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- Successes (k): entering "6" shows "Successes cannot exceed the number of trials." beside that field and no result.
- Success probability (p): entering "1.5" shows "Success probability (p) must be at most 1." beside that field and no result.
Choosing between the Binomial Distribution Calculator and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Poisson Distribution Calculator](/statistics/poisson-distribution-calculator/) | average rate and events | P(X = 3) |
| [Normal Distribution Calculator](/statistics/normal-distribution-calculator/) | mean, standard deviation and probability | P(X < x₁) |
| [Sampling Distribution of the Mean Calculator](/statistics/normal-probability-sampling-distributions/) | population mean, population SD and sample size | P(x̄ < value) |
| [IQ Percentile Calculator](/statistics/iq-percentile/) | iQ score, mean and standard deviation | Percentile |
| [Empirical Rule Calculator](/statistics/empirical-rule/) | mean and standard deviation | ≈68% (μ ± σ) |
Background: probability and distributions
A probability model only applies when its conditions hold. The binomial model needs a fixed number of independent trials with two outcomes and a constant success probability; its mass function gives the chance of exactly k successes. The normal density is f(x) = 1 ÷ (σ√(2π)) × e^(−(x − μ)² ÷ (2σ²)).
A cumulative probability adds up everything at or below a value, a density or mass function gives the value at a point. For a standard normal variable, z = −1.96 leaves 0.025 in the lower tail, which is why ±1.96 bounds a 95% interval.
Assumptions and limitations
- k cannot exceed n
- p = 0 or 1 handled exactly
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for successes (k) and success probability (p) to confirm this.
Frequently asked questions
What is P(X ≥ 6)?
1 − 0.623047 = 0.376953.
What if p = 0?
All probability is on zero successes.
Is a die roll binomial?
Counting sixes in several rolls is.
What does the Binomial Distribution Calculator calculate?
Binomial probabilities for n trials. It returns P(X = 5), P(X ≤ k), Mean and Variance.
What formula does the Binomial Distribution Calculator use?
P(X = k) = C(n, k) p^k (1 − p)^(n − k). Direct evaluation with exact binomial coefficients (BigInt) converted to floating point.
What do I need to enter in the binomial Distribution Calculator?
You enter Trials (n), Success probability (p) and Successes (k).
How is the result rounded or limited?
IEEE-754 double precision; shown to at most 6 decimal places. k cannot exceed n.
What are the limits of this calculator?
k cannot exceed n. p = 0 or 1 handled exactly.
What is an example of a binomial Distribution result?
With trials (n) 10, success probability (p) 0.5 and successes (k) 5, the p(X = 5) is 0.246094.
Related calculators
- Poisson Distribution Calculator — Poisson probabilities for a given mean rate.
- Normal Distribution Calculator — Probabilities for a normal distribution.
- Sampling Distribution of the Mean Calculator — Probability for a sample mean using the central limit theorem.
- IQ Percentile Calculator — Percentile of an IQ score on a normal scale.
- Empirical Rule Calculator — 68–95–99.7 intervals for a normal distribution.
- Geometric Probability Calculator — Probability the first success occurs on trial k.
Sources
- Standard statistics definition (e.g. NIST/SEMATECH e-Handbook of Statistical Methods)
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.