Negative Binomial Calculator

Model failures before successes using clear probability settings. Get instant results, chartless tables, and summaries. Download files for classes, research notes, and reports today.

Calculator

Inputs and options

Choose what you want to compute.
Positive integer; fixed target successes.
Decimal between 0 and 1 (exclusive).
Used by PMF and CDF modes.
Used by range mode.
Used by range mode.
Generates PMF/CDF table from 0..max.
Controls rounding in outputs and downloads.
Interpretation: X counts failures before the r-th success. If you need trials instead, use trials = X + r.
Example

Example data table

Sample parameters: r = 5 successes, p = 0.40. Here are probabilities for a few k values.

Fatal error: Uncaught Error: Call to undefined function lgamma() in /home/u294241901/domains/codingace.net/public_html/maths/negative_binomial.php:39 Stack trace: #0 /home/u294241901/domains/codingace.net/public_html/maths/negative_binomial.php(51): log_choose(4, 0) #1 /home/u294241901/domains/codingace.net/public_html/maths/negative_binomial.php(561): nb_pmf(0, 5, 0.4) #2 {main} thrown in /home/u294241901/domains/codingace.net/public_html/maths/negative_binomial.php on line 39
k (failures) PMF CDF Meaning