Since 2010 · Powering 2M+ tool runs every month
Since 2010
Add to Chrome

My Toolbox

Automatic Mode

No saved tools yet.

Go Premium
Related tools
Binomial Probability Distribution CalculatorProbability Distribution CalculatorPoisson Distribution CalculatorBinomial Coefficient CalculatorGeometric Distribution CalculatorHypergeometric Distribution CalculatorCentral Limit Theorem Calculator
Home Page > Math > Advanced Math Operations

Negative Binomial Distribution Calculator

Calculate negative binomial probabilities for the number of trials or failures needed to reach a target number of successes. Get the exact PMF and CDF, step-by-step solutions, interactive charts and trial sequence visualizations.

Free to useNo sign-up requiredInstant Results
Negative Binomial Distribution CalculatorTry it now — free ▼
📌 Try a scenario:
Target number of successes (r ≥ 1)
Probability per trial (0 < p ≤ 1)
Failures before the r-th success (k ≥ 0)
r must be a positive integer. p must be between 0 (exclusive) and 1 (inclusive). k must be a non-negative integer.

Embed Negative Binomial Distribution Calculator Widget

About Negative Binomial Distribution Calculator

The Negative Binomial Distribution Calculator computes exact probabilities for the number of failures (or total trials) needed before achieving a target number of successes. Enter the number of successes needed (r), the per-trial success probability (p), and your target value (k) to get point and cumulative probabilities, step-by-step solutions, interactive charts, and a trial sequence visualization.

What Is the Negative Binomial Distribution?

The negative binomial distribution is a discrete probability distribution that models the number of failures before a specified number of successes occurs in a sequence of independent Bernoulli trials. Each trial has the same success probability p. It answers questions like "How many failed sales calls will I make before closing my 5th deal?" or "How many defective items will I inspect before finding 10 good ones?"

The distribution gets its name from the negative binomial series expansion used in its derivation. It generalizes the geometric distribution, which is the special case where r = 1 (one success needed).

Two Common Parameterizations

The negative binomial distribution has two equivalent formulations that differ in what the random variable counts:

This calculator supports both. Use the toggle to switch between entering k as the number of failures or the total number of trials.

The Negative Binomial PMF Formula

In the failures parameterization, the probability mass function is:

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

Where C(n, k) = n! / (k! × (n − k)!) is the binomial coefficient. The term C(k + r − 1, r − 1) counts the number of ways to arrange k failures and r − 1 successes in the first k + r − 1 trials (the last trial must be a success). The term pr is the probability of r successes, and (1 − p)k is the probability of k failures.

Mean, Variance, and Other Statistics

For the negative binomial random variable X (failures parameterization) with parameters r and p:

For the trials parameterization Y = X + r, the mean shifts to r/p and the variance stays the same.

Relationship to Other Distributions

Common Applications

How to Use This Calculator

  1. Enter r, the number of successes you want to achieve (r ≥ 1).
  2. Enter p, the probability of success on each trial (0 < p ≤ 1).
  3. Select the input mode: whether k represents the number of failures or the total number of trials.
  4. Enter k, the specific value you want to find the probability for.
  5. Click "Calculate Probability" to see exact and cumulative probabilities, step-by-step combinatorial solutions, a trial sequence visualization, PMF/CDF charts, and the full distribution table.

Frequently Asked Questions

What is the difference between negative binomial and binomial distributions?

The binomial distribution fixes the number of trials and counts the random number of successes. The negative binomial fixes the number of successes and counts the random number of trials (or failures). They answer complementary questions: the binomial asks "How many successes in n trials?" while the negative binomial asks "How many trials until r successes?"

When should I use the negative binomial instead of the Poisson distribution?

Use the negative binomial when your count data shows overdispersion — when the variance is greater than the mean. The Poisson distribution assumes equal mean and variance. The negative binomial has an extra parameter that allows the variance to exceed the mean, making it a better fit for many real-world count datasets.

What does it mean when r = 1?

When r = 1, the negative binomial reduces to the geometric distribution, which models the number of failures before the first success. For example, the number of coin flips showing tails before the first heads.

Can p equal 0 or 1?

The probability p must be strictly greater than 0. If p = 0, success is impossible so you'd need infinite trials. If p = 1, every trial is a success, so there are always 0 failures and the distribution is degenerate (all probability mass at k = 0). This calculator accepts p = 1 as a special case.

How is the negative binomial used in regression?

Negative binomial regression is a generalization of Poisson regression used when count data exhibits overdispersion. It adds a dispersion parameter that allows the conditional variance to exceed the conditional mean. Common applications include modeling hospital visit counts, traffic accident frequencies, and species abundance data.

Reference this content, page, or tool as:

"Negative Binomial Distribution Calculator" at https://MiniWebtool.com/negative-binomial-distribution-calculator/ from MiniWebtool, https://MiniWebtool.com/

by miniwebtool team. Updated: 2026-04-14

You can also try our AI Math Solver GPT to solve your math problems through natural language question and answer.

Advanced Math Operations:

Top & Updated:

Beta Distribution CalculatorNormal Distribution CalculatorExponential Distribution CalculatorView all →
Home Page > Math > Advanced Math Operations > Negative Binomial Distribution Calculator