📐Negative Binomial Calculator

Tries needed to reach r successes

%

You Might Also Need

How to use the Negative Binomial Calculator

The negative binomial distribution counts how many tries it takes to collect the r-th success when every try carries the same probability. Enter the per-try probability p, the target number of successes r and a number of tries n, and the tool returns the chance that the r-th success lands exactly on try n, P(X=n)=C(n-1,r-1)·p^r·(1-p)^(n-r), together with the cumulative chance P(X ≤ n) of finishing within n tries.

The expected number of tries is r/p, the variance is r(1-p)/p² and the standard deviation is its square root. Combinations and factorials overflow quickly, so the page works with sums of logarithms, and both r and n are capped at 1,000. Every figure assumes independent tries with a fixed probability, so rate-up and pity mechanics are not modelled.

Setting r to 1 reproduces the geometric distribution for a first success. This page focuses on the cumulative probability, the variance and the standard deviation instead, and it does not report a median. Treat the output as a reference. Current as of October 2026.

Frequently asked questions

Does setting r to 1 give the geometric distribution?

It does. With r=1 the term C(n-1,0) equals 1 and the formula collapses to (1-p)^(n-1) times p. If only the first success matters, the geometric calculator is simpler and it also reports the median.

How is the cumulative probability P(X ≤ n) built?

It adds up the chance that the r-th success lands on each try from the r-th through the n-th. The page sums logarithms instead of multiplying factorials, so large values of n do not overflow.

The variance looks large. Can I just read the expected number of tries?

The expected number of tries is only a long-run average. The larger the variance and standard deviation, the further real outcomes scatter from that average, so it is safer to read both.