Statistics & Probability

Instant, private, and free

Negative Binomial Distribution Calculator.

Calculate the probability of k failures before r successes.

On-device calculationNo signup
01

Set your values

Results update as you type.

probability: 0.124416

probability

0.124416
expectedFailures: 4.5

expectedFailures

4.500000
variance: 11.25

variance

11.250000

Results update automatically as you type.

Use Cases

Quality Control and Defect Analysis

Determine the probability of encountering a certain number of defective items before finding a specified number of good items in a production line.

Example: If 5% of items are defective, what is the probability of seeing 3 defects before 10 good items?

Sports and Game Strategy

Model the number of failures (e.g., missed shots) before achieving a target number of successes (e.g., made baskets) in a game.

Example: A basketball player has a 70% free-throw success rate. What is the probability of missing 2 shots before making 5?

Frequently Asked Questions

What does the negative binomial distribution calculate?
It calculates the probability of observing a specific number of failures (k) before achieving a required number of successes (r) in a sequence of independent Bernoulli trials, given a constant success probability per trial.
How do I use this calculator?
Enter the required number of successes (r), the number of failures (k), and the success probability (p) for each trial. The calculator will return the probability of exactly k failures occurring before the r-th success.
What is the difference between negative binomial and geometric distribution?
The geometric distribution is a special case of the negative binomial where r = 1 (i.e., probability of failures before the first success). This calculator handles any positive integer r.

Tips & Common Mistakes

Tips

  • Ensure the success probability is between 0 and 1 (exclusive). Enter it as a decimal (e.g., 0.3) or percentage (e.g., 30%).
  • The required successes (r) must be a positive integer. The number of failures (k) can be zero or any non-negative integer.
  • This calculator assumes independent trials with a constant success probability. If trials are not independent, the result may not be accurate.
  • Use the result as a reference for understanding probabilities, not as a guarantee of outcomes in real-world scenarios.

Common Mistakes to Avoid

  • Entering a success probability greater than 1 or less than 0. Probabilities must be between 0 and 1.
  • Confusing the number of failures (k) with the total number of trials. The calculator specifically asks for failures before the r-th success, not total trials.
  • Using a negative number for r or k. Both must be non-negative integers, with r at least 1.

Last updated: August 13, 2026