# NEGBINOM.DIST Function

> Calculate the negative binomial distribution with NEGBINOM.DIST in TX Sheet Control: failures, successes, probability, cumulative and #NUM! errors.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Function
- **Path:** TX Sheet Control > API Reference > Formula Functions > NEGBINOM.DIST Function
- **264 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/negbinom-dist/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/negbinom-dist/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/negbinom-dist/llms-full.txt

---

Return the negative binomial distribution, the probability of `number_s` failures before the `trials_or_successes`-th success when each trial succeeds with the probability `probability_s`. `cumulative` TRUE returns the cumulative distribution function and FALSE, the default in TX Sheet Control, the probability mass function. `number_s` is truncated to an integer. A negative `number_s`, a `trials_or_successes` less than 1 or a probability outside 0 to 1 returns `#NUM!`.

### Syntax

```text
NEGBINOM.DIST(number_s, trials_or_successes, probability_s, cumulative)
```

Category: Statistics. Minimum arguments: 3. Maximum arguments: 4.

Available for supported offline calculation.

### Examples

```text
=NEGBINOM.DIST(2,4,0.5,FALSE)
```

The formula returns 0.15625, the probability of exactly 2 failures before the fourth success with a success probability of 0.5.

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

### See Also

- [Formulas](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/formulas/llms-full.txt)
- [Custom Functions and Formula Data](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/custom-functions/llms-full.txt)

---

## Nearby

- **Previous:** [NA Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/na/llms-full.txt)
- **Next:** [NEGBINOMDIST Function](https://docs.textcontrol.com/tx-sheet-control/reference/formula-functions/negbinomdist/llms-full.txt)
