# Negative Binomial Distribution Calculator

Free negative binomial calculator. Find the probability of needing exactly k trials to achieve r successes with step-by-step formula and cumulative.

## What this calculates

Calculate the probability of needing exactly k trials to achieve r successes using the negative binomial distribution. This distribution models the number of trials required before reaching a fixed number of successes.

## Inputs

- **Successes Needed (r)** — min 1, max 100 — Number of successes you need to achieve.
- **Probability of Success (p)** — min 0.001, max 1 — Probability of success on each trial (between 0 and 1).
- **Number of Trials (k)** — min 1, max 500 — Total number of trials (must be >= r).

## Outputs

- **P(X = k)** — Probability of achieving exactly r successes on the k-th trial.
- **Expected Trials E(X)** — Expected number of trials to get r successes (r / p).
- **Variance** — Variance of the number of trials.
- **P(X <= k)** — Probability of achieving r successes in k or fewer trials.
- **Formula** — formatted as text — The negative binomial formula applied.

## Details

The negative binomial distribution generalizes the geometric distribution. While the geometric distribution counts trials until the first success, the negative binomial counts trials until the r-th success.

Formula: P(X = k) = C(k-1, r-1) x p^r x (1-p)^(k-r), where k is the total number of trials, r is the desired number of successes, and p is the probability of success per trial. The combination C(k-1, r-1) counts the ways to arrange r-1 successes in the first k-1 trials (the k-th trial must be a success).

Key properties: E(X) = r/p is the expected number of trials. Var(X) = r(1-p)/p^2. As r increases, the distribution becomes more symmetric and approaches a normal shape. Applications include modeling the number of sales calls needed to close r deals, the number of patients to screen before finding r eligible participants, or the number of wells to drill before finding r productive ones.

## Frequently Asked Questions

**Q: What is the difference between negative binomial and geometric distributions?**

A: The geometric distribution is a special case of the negative binomial with r = 1 (waiting for the first success). The negative binomial generalizes this to waiting for the r-th success. Set r = 1 in this calculator to get geometric distribution results.

**Q: Why is it called 'negative' binomial?**

A: The name comes from the relationship with the binomial series using negative exponents. The PMF can be expressed using the generalized binomial coefficient C(-r, k-r) with alternating signs, which connects to the expansion of (1-x)^(-r).

**Q: How does the negative binomial relate to the Poisson distribution?**

A: The negative binomial can be derived as a Poisson distribution whose rate parameter itself follows a gamma distribution. This makes it useful for modeling count data with overdispersion (variance greater than mean), which the Poisson cannot handle.

---

Source: https://vastcalc.com/calculators/statistics/negative-binomial
Category: Statistics
Last updated: 2026-04-21
