Negative Binomial Distribution Calculator
How many trials it takes to reach a target number of successes — the distribution of waiting, rather than of counting.
The binomial fixes the trials and asks how many successes; the negative binomial fixes the successes and asks how many trials.
How the negative binomial distribution calculator works
The binomial fixes the trials and asks how many successes; the negative binomial fixes the successes and asks how many trials. The chance that the rth success arrives on trial number x is C(x − 1, r − 1) pʳ (1 − p)^(x − r).
With r = 1 it collapses to the geometric distribution — the chance of the first success on trial x — which is why the calculator reports the expected wait as r ÷ p.
Formula: P(X = x) = C(x − 1, r − 1) pʳ (1 − p)^(x − r)
Worked examples
| Inputs | P(the rth success is on trial x) | Note |
|---|---|---|
| 3rd success on trial 10 at 20% | 6.039798% | about 6.0% |
| First success on trial 5 at 20% | 8.192% | geometric — 8.19% |
| 2 sixes by the 12th roll | 4.934893% | about 5.4% |
FAQFrequently asked questions
How is this different from the binomial?
The binomial fixes the number of trials; the negative binomial fixes the number of successes and lets the trial count vary.
What is the geometric distribution?
The special case r = 1 — the wait for the first success.
How many rolls to see two sixes?
On average 12, since r/p = 2 ÷ (1/6). But the distribution has a long tail: about 11% of the time it takes more than 25.
Why "negative" binomial?
Because the probabilities come from expanding a binomial series with a negative exponent. The name is about the algebra, not the values.
Where is it used?
Modelling counts that are more variable than Poisson allows — insurance claims, defects, and read counts in genomics.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- National curriculum in England — Mathematics — the terms and methods taught in UK schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.