Binomial Distribution Calculator
Type the number of trials, the chance of success and the number of successes to get…
Type the number of trials, the chance of success and the number of successes to get the probability, with every outcome drawn as a bar.
ExampleP(at least 8)
5.47%
The chance of at least 8 successes in 10 trials, each succeeding with probability 0.5, is 0.0547, about 1 in 18.
Type your own trials and chance, or drag along the bars.
Each bar is one possible number of successes; the highlighted bars add up to the answer. Drag to change k.
- Expected successes (np)
- 5
- Standard deviation
- 1.5811
- P(exactly 8)
- 0.0439
How this works: 9 sources,
How this works
Method
A binomial count is the number of successes in n independent trials that each succeed with the same probability p: heads in coin flips, defective parts in a batch, patients who respond to a treatment. The chance of exactly k successes is C(n, k) · pᵏ · (1 − p)ⁿ⁻ᵏ: the number of ways to place the k successes among the n trials, times the chance of any one such sequence. Full method
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.6.6.18 Binomial Distribution
- Wikipedia, Binomial distribution
- NIST/SEMATECH e-Handbook of Statistical Methods
- Abramowitz and Stegun, Handbook of Mathematical Functions, chapters 6, 7 and 26 (1964)
- SciPy 1.18 scipy.stats (reference values for the tests)
- statsmodels 0.15 (reference values for the A/B test and regression intervals)
- Welch, The generalization of Student’s problem when several different population variances are involved (Biometrika) (1947)
- Fleiss, Levin and Paik, Statistical Methods for Rates and Proportions, 3rd edition (sample size for two proportions) (2003)
- Hyndman and Fan, Sample quantiles in statistical packages (The American Statistician) (1996)
How it’s tested
2 worked examples for this page are checked by automated tests before every release: given the inputs, the tool must show the expected answer.
Privacy
On your device. Nothing you enter or open leaves this browser. About privacy labels
Changes
- First published: live curves with draggable cut-offs, and tests on pasted data (t-tests, ANOVA, chi-square, Fisher’s exact, correlation, regression, A/B), checked against SciPy.
How the binomial distribution works
A binomial count is the number of successes in n independent trials that each succeed with the same probability p: heads in coin flips, defective parts in a batch, patients who respond to a treatment. The chance of exactly k successes is C(n, k) · pᵏ · (1 − p)ⁿ⁻ᵏ: the number of ways to place the k successes among the n trials, times the chance of any one such sequence.
For 10 flips of a fair coin, exactly 8 heads has C(10, 8) = 45 sequences, each with probability (1/2)¹⁰, so P = 45/1,024 ≈ 0.0439. At least 8 heads adds the cases for 9 and 10: (45 + 10 + 1)/1,024 = 56/1,024 ≈ 0.0547. “At most” and “between” add up the bars the same way.
On average you expect np successes, give or take √(np(1 − p)). For 100 trials at p = 0.3 that is 30 ± 4.58. When np and n(1 − p) are both above about 10, the bars take the shape of a normal curve, which is why polls and quality checks can use z-scores.
P(X = k) = C(n, k) · pᵏ · (1 − p)ⁿ⁻ᵏ · mean np · SD √(np(1 − p))
- The binomial distribution needs a fixed number of independent trials, each with the same probability of success. Source: NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.6.6.18 Binomial Distribution.
- Jacob Bernoulli studied repeated independent trials in Ars Conjectandi, published in 1713; a single such trial is still called a Bernoulli trial. Source: Wikipedia, Binomial distribution.
Ten flips of a fair coin
The probability of exactly, at most and at least k heads in 10 flips of a fair coin.
| Heads (k) | Exactly k | At most k | At least k |
|---|---|---|---|
| 0 | 0.001 | 0.001 | 1 |
| 1 | 0.0098 | 0.0107 | 0.999 |
| 2 | 0.0439 | 0.0547 | 0.9893 |
| 3 | 0.1172 | 0.1719 | 0.9453 |
| 4 | 0.2051 | 0.377 | 0.8281 |
| 5 | 0.2461 | 0.623 | 0.623 |
| 6 | 0.2051 | 0.8281 | 0.377 |
| 7 | 0.1172 | 0.9453 | 0.1719 |
| 8 | 0.0439 | 0.9893 | 0.0547 |
| 9 | 0.0098 | 0.999 | 0.0107 |
Show all 11 rowsShow fewer
| 10 | 0.001 | 1 | 0.001 |
Common questions
When is a situation binomial?
When there is a fixed number of trials, each is a yes or no, the trials don’t affect each other, and the chance of yes is the same every time. Drawing cards without putting them back fails the last test; that is the hypergeometric distribution.
What is the chance of at least one success?
1 minus the chance of none: 1 − (1 − p)ⁿ. Rolling at least one six in four throws of a die is 1 − (5/6)⁴ ≈ 0.518.
Why does “at least 8” include 8?
Because “at least” means 8 or more. For more than 8, ask for at least 9. The highlighted bars on the chart show exactly which counts are included.