StatsCalculator

Negative Binomial Distribution Calculator

Probabilities for failures before the r-th success.

Calculator guide

Negative binomial calculator guide

The negative binomial distribution models the number of failures before a specified number of successes occurs in repeated independent trials.

P(X = k) = C(k + r - 1, k)pr(1-p)k

How to use this calculator

  1. Enter r, the target number of successes.
  2. Enter p, the success probability per trial.
  3. Enter k, the number of failures before the rth success.
  4. Read exact and cumulative probabilities.

How to interpret the result

Parameterizations vary. This calculator treats X as failures before r successes, not total trials.

Worked example

Example: if r = 3 and p = 0.4, the calculator models the number of failures before the third success. Enter k = 4 to find the probability of seeing four failures before that third success occurs.

Common mistake to avoid

Some textbooks define the negative binomial as total trials until r successes. This page defines X as failures before r successes, so total trials would be k + r.

Using the model

For negative binomial, the number you get is only as good as the model choice. Before entering values, decide what the random variable represents and whether the support makes sense: counts should stay whole, proportions should stay between 0 and 1, and waiting-time models should not produce negative values. Then Enter r, the target number of successes. Enter p, the success probability per trial. The calculator is doing a distribution lookup, not proving that the distribution fits your data.

The relationship to keep nearby is P(X = k) = C(k + r - 1, k)pr(1-p)k. Use it to check whether the input fields match the notation in your textbook, software output, or assignment. Many distribution mistakes come from swapping rate and scale, using a tail in the wrong direction, or entering a value on the wrong scale. If the result is a CDF, it means probability up to x; if it is an upper tail, it means probability beyond x.

Parameterizations vary. This calculator treats X as failures before r successes, not total trials. When the problem changes from probability lookup to estimation or testing, switch tools instead of stretching this page past its purpose. Nearby calculators such as geometric distribution, binomial distribution and bernoulli distribution are often the next step. What happens when r = 1? The distribution becomes a geometric distribution counting failures before the first success.