NEGBINOM.DIST in Excel: Count Failures Before a Success Target
Calculate negative-binomial probabilities in Excel, distinguish failures from total trials, and construct cumulative and upper-tail events correctly.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =NEGBINOM.DIST(2,3,0.4,FALSE) has independent expected result 0.13824. It describes exactly two failures before the third success when independent attempts have success probability 0.4.
Syntax and stopping rule
=NEGBINOM.DIST(number_f, number_s, probability_s, cumulative)
All arguments are required. number_f is the number of failures before reaching number_s successes. probability_s is the constant success probability per attempt. TRUE returns the cumulative probability through the stated failure count; FALSE returns its exact-count mass.
The process stops at the requested success. It does not fix the total number of attempts in advance. If there are k failures before the r-th success, total attempts are k+r.
Microsoft calls the FALSE result a density in its parameter description, but the count variable is discrete. The result is a probability mass for an exact integer failure count, unlike a continuous normal or gamma density.
Example 1: tabulate failures before three successes
Put 0, 1, 2 and 3 in A2:A5. In B2 enter =NEGBINOM.DIST(A2,3,0.4,FALSE) and fill down. Independent exact-count targets are 0.064, 0.1152, 0.13824 and 0.13824.
For exactly two failures, the fifth and final attempt must be a success. Among the preceding four attempts, choose two successful positions in COMBIN(4,2)=6 ways. Multiplying by 0.4^3*0.6^2 gives 0.13824.
Put =A2+3 in a separate column for total attempts. The outputs are 3, 4, 5 and 6. Keeping that column separate prevents a silent change from failure counts to trial counts.
Example 2: cumulative probability and a tail
With TRUE, the same failure-count table independently targets 0.064, 0.1792, 0.31744 and 0.45568. These values sum the exact masses from zero through the selected count.
The probability of more than two failures is =1-NEGBINOM.DIST(2,3,0.4,TRUE), independently 0.68256. The probability of at least two failures instead subtracts the cumulative result through one, yielding 0.8208.
The exact-two mass is the difference between those events. Writing “at least” or “more than” beside each formula helps prevent an off-by-one tail error.
Advanced application: translate a total-attempt limit
Reaching three successes within five attempts is equivalent to at most two failures before the third success. Use =NEGBINOM.DIST(5-3,3,0.4,TRUE), targeting 0.31744.
The same event can be checked with a fixed-five-trial binomial model: at least three successes in five independent attempts at p=0.4. The sum of the masses for three, four and five successes is again 0.31744.
Those are two descriptions of one event under the same assumptions, not permission to interchange their argument meanings. For a total-attempt limit below three, reaching the third success is impossible; validate the requested event before forming a negative failure-count input.
Advanced application: compare mean counts
The mathematical mean failure count is number_s*(1-p)/p. For r=3 and p=0.4 it is 4.5 failures. The mean total attempts is r/p, or 7.5.
Neither mean must be an integer, and neither guarantees a stopping time for one run. The failure count is unbounded, so a finite table of the first few exact masses will generally sum to less than one.
The model assumes independent attempts and constant success probability. Changing probabilities, dependence or finite sampling without replacement require a different analysis.
Reproduce the official example
Microsoft uses ten failures, five successes and p=0.25. =NEGBINOM.DIST(10,5,0.25,FALSE) independently targets 0.0550486604; TRUE targets 0.3135140585, matching the rounded source outputs.
Retain full cell precision when checking cumulative differences. Rounding every mass before summing can give a slightly different result from a cumulative function.
Errors and troubleshooting
Microsoft documents truncation of number_f and number_s to integers, #NUM! for negative failures or fewer than one success, and #NUM! for probabilities outside zero through one. It documents #VALUE! for nonnumeric arguments; use a logical cumulative flag as shown in the syntax.
The examples use interior probabilities, validated integer counts and explicit flags. Degenerate endpoint behavior, every coercion rule and extreme-tail numerical accuracy were not native-tested. First check whether an input counts failures or all attempts when the result appears shifted.
Availability and version history
- Current documentation: the dedicated Microsoft reference lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2016.
- Introduced: Microsoft’s alphabetical catalog marks NEGBINOM.DIST as introduced in Excel 2010. Exact first build and platform-specific introduction dates remain unverified.
- Last functioning version: unknown; a current help listing is not a last-working-build test.
- Evidence checked: October 15, 2026. Official documentation was freshly retrieved; examples were independently calculated. No native Excel, Mac or web-client execution was performed.
References and verification
- Microsoft NEGBINOM.DIST reference.
- Microsoft function catalog and introduction-marker explanation.
- Editorial testing standards.
Examples use English function names and comma separators. Expected numbers are rounded independent mathematical calculations; documented error expectations are labeled as such. They are not captured Excel output. All illustrative data and policies are fictional.
Legacy NEGBINOMDIST: exact contract and migration
=NEGBINOMDIST(number_f,number_s,probability_s)
All three arguments are required: number_f counts failures before number_s successes, and probability_s is the constant success chance per independent trial. There is no CDF flag: the result is exact-count mass. Microsoft truncates the two counts and documents #NUM! for negative failures, fewer than one success or probabilities outside [0,1], and #VALUE! for nonnumeric arguments.
Reproducible legacy example
Enter =NEGBINOMDIST(2,3,0.5). The fifth trial must be the third success; among the preceding four, choose two successes. Thus COMBIN(4,2)*0.5^5 = 0.1875. Masses for zero, one and two failures are 0.125, 0.1875 and 0.1875, so the at-most-two probability is 0.5.
These are independent mathematical expectations, not captured Excel results. Use English names and comma separators, and retain full precision when checking a round trip.
Migration checks
Use NEGBINOM.DIST(number_f,number_s,probability_s,FALSE). The modern required fourth argument must be supplied. TRUE returns the cumulative event instead. Do not use total trials 5 as the failures input 2. For at least k failures use 1-CDF(k-1), not 1-CDF(k).
Compatibility and evidence limits
Microsoft still documents NEGBINOMDIST for backward compatibility in current supported releases, including Excel 2024 and Microsoft 365. Its warning about possible future removal is not a retirement announcement. Exact first and last functioning builds remain unverified; no native Excel execution was performed.
Legacy contract checked October 19, 2026: Microsoft NEGBINOMDIST reference. The modern guide and its earlier evidence dates above remain intact.