Home · Statistics · Distributions & Sampling · Negative Binomial Distribution Calculator

Negative Binomial Distribution Calculator

The probability that the r-th success occurs exactly on trial k in a run of independent trials with success probability p, reported as a percentage.

Your figures

Example result — edit the figures to make it yours

15.63

P(X = 3) = 12.5%P(X = 4) = 18.75%P(X = 5) = 18.75%P(X = 6) = 15.625%P(X = 7) = 11.7188%P(X = 8) = 8.2031%P(X = 9) = 5.4687%P(X = 10) = 3.5156%P(X = 11) = 2.1973%P(X = 12) = 1.3428%P(X = 13) = 0.8057%P(X = 14) = 0.4761%P(X = 15) = 0.2777%P(X = 16) = 0.1602%P(X = 17) = 0.0916% 317 P(X = 6) = 15.63%
The distribution for your figures, drawn from the same parameters as the calculation. The amber region is the probability the result reports — the area under the curve (or the highlighted bar) equals that percentage.

What this calculator does

The probability that the r-th success occurs exactly on trial k in a run of independent trials with success probability p, reported as a percentage. Every figure on this page is computed from the standard definition stated below — the same definition used in textbooks and reference tables — with no hidden rounding steps, and the method notes name the exact convention where more than one exists.

The formula and method

P(X = k) = C(k − 1, r − 1) · p^r · (1 − p)^(k−r), for k ≥ r

X is the total number of trials needed to reach the r-th success, so k ≥ r is required.

The main result is P(X = k), expressed as a percentage: among the first k − 1 trials there are exactly r − 1 successes, and trial k is the r-th success.

p is the per-trial success probability on the 0–1 scale; the geometric distribution is the special case r = 1.

Worked example

With the example inputs this page opens with (target successes r 3, success probability p (0–1) 0.5, trial of the r-th success k 6), the result is 15.63. Change any figure and the result updates with the same formula.

Quick reference

Quick reference — varying target successes r
Target successes rResult
315.63
61.56
415.63
57.81

Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.

Common questions

How does this differ from the binomial distribution?

The binomial fixes the number of trials and counts the successes. The negative binomial fixes the number of successes and counts the trials needed to reach them — the roles of the fixed and random quantities are swapped.

What is the average number of trials to get r successes?

The mean is r/p. For r = 3 and p = 0.5 that is 6 trials on average, which is why k = 6 is a natural default to inspect.

How does the Negative Binomial Distribution Calculator work?

The probability that the r-th success occurs exactly on trial k in a run of independent trials with success probability p, reported as a percentage. Target successes r · Success probability p · Trial of r-th success k → P(X = k) (%). The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.

What inputs does the Negative Binomial Distribution Calculator need?

Target successes r · Success probability p · Trial of r-th success k → P(X = k) (%). Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.