Compatibility

NEGBINOMDIST

Known larger differences on 1,607 of 1,845 recorded answers

Of 1,845 recorded answers (1,804 in the answer bank and 41 workbook cells), 1,607 do not match: 335 differ by more than 16 ULP, 1,272 differ by at most 16 ULP. How we measure this · See the Rust code

Local names in 40 languages
LanguageName in Excel
ArabicNEGBINOMDIST
BulgarianNEGBINOMDIST
CzechNEGBINOMDIST
DanishNEGBINOMFORDELING
GermanNEGBINOMDIST
GreekNEGBINOMDIST
English (Australia)NEGBINOMDIST
English (United Kingdom)NEGBINOMDIST
English (United States)NEGBINOMDIST
SpanishNEGBINOMDIST
EstonianNEGBINOMDIST
FinnishBINOMIJAKAUMA.NEG
FrenchLOI.BINOMIALE.NEG
HebrewNEGBINOMDIST
CroatianNEGBINOMDIST
HungarianNEGBINOM.ELOSZL
IndonesianNEGBINOMDIST
ItalianNEGBINOMDIST
JapaneseNEGBINOMDIST
KoreanNEGBINOMDIST
LithuanianNEGBINOMDIST
LatvianNEGBINOMDIST
NorwegianNEGBINOMDIST
DutchNEG.BINOM.VERD
PolishROZKŁAD.DWUM.PRZEC
Portuguese (Brazil)NEGBINOMDIST
Portuguese (Portugal)DIST.BIN.NEG
RomanianNEGBINOMDIST
RussianОТРБИНОМРАСП
SlovakNEGBINOMDIST
SlovenianNEGBINOMDIST
Serbian (Latin)NEGBINOMDIST
SwedishNEGBINOMFÖRD
ThaiNEGBINOMDIST
TurkishNEGBİNOMDAĞ işlevi
UkrainianNEGBINOMDIST
VietnameseNEGBINOMDIST
Chinese (Simplified)NEGBINOMDIST
Chinese (Hong Kong)NEGBINOMDIST
Chinese (Traditional)NEGBINOMDIST

Names from Microsoft's support site.

What it does

NEGBINOMDIST(number_f, number_s, probability_s)

NEGBINOMDIST(number_f,number_s,probability_s) returns the probability of exactly number_f failures before the specified number of successes. The final trial is a success. This compatibility form returns a mass, with no cumulative switch.

Try it

Input cells (optional)

Example: {"B2": 3, "B3": 4}. A1 holds the formula. Other cells need values before a formula can read them.

Enter a formula, then calculate.

Runs locally in your browser with OneCalc. Its answer may differ from Excel. Use English function names and commas between arguments.

=NEGBINOMDIST(2,2,0.5) is about 0.1875. The final success occupies the fourth trial; the first three positions contain one success in three possible arrangements, each four-trial sequence having probability 1/16.

Quirks

Failure and success counts are truncated toward zero; the first is failures, not total trials. Negative admitted failures or fewer than one target success gives #NUM!. Nonnumeric arguments give #VALUE!.

Microsoft’s written probability guard excludes values outside zero through one. The current helper uses the stricter open interval 0<p<1, rejecting both endpoints with #NUM!. That is a distinction between the written baseline and the current implementation; no new Excel endpoint reading is asserted here. Counts and endpoint guards must be tested separately from the mass formula.

How to implement

The mathematical mass for f failures before success number s is

choose(f+s-1,f) * p^s * (1-p)^f

The last trial is fixed as a success. Choose the positions of the other s-1 successes among the preceding f+s-1 trials. Thus for f=2,s=2,p=0.5, the possible success/failure patterns are SFFS, FSFS, FFSS; each has probability 1/16, giving 3/16 in total.

The current code composes binomial machinery instead of constructing factorials:

  1. Truncate and validate f,s,p; retain the endpoint guard above.
  2. For f=0, return the public exponential of the ordinary binary64 product s*LN(p). Do not infer the stored product stage of BINOM.DIST’s all-success route for this separate call site.
  3. Otherwise form n=s+f, q=1-p and the shared binomial mass b(s;n,p,q). Multiply it by s/n with the current binary64 division and multiplication.
  4. Apply the finite-result policy. The helper still has recorded numerical and domain discrepancies in the problem report.

For mathematical summation, adjacent masses satisfy mass(f+1)=mass(f)*(f+s)/(f+1)*(1-p). That recurrence can avoid huge factorials, but its rounding and underflow differ from the current binomial composition. The mass-only legacy function has no cumulative argument; use NEGBINOM.DIST when the probability of at most a failure count is required.

Rust code

Show the CalcFunc source of this function

Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.

NEGBINOMDIST · 4 lines · calc-func/src/catalogue/distributions.rs on GitHub
80 negbinomdist "NEGBINOMDIST" (3, 3) [V "number_f", V "number_s", V "probability_s"] |s, a, sv| {
    let [f, n, p] = nums::<3>(s, a)?;
    out(s, dd::negbinom_dist_kernel(f, n, p, false))
}

Kernels shared with other functions

Argument and result plumbing

  • num catalogue/kit
  • out catalogue/kit

No implementation has been published with a Handbook test suite for this function.

Version differences

The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.

Excel 16.0 buildPlatform and CPUCaptured inputs
19929Windows, bitness not recorded, CPU not recorded138
20131Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics1,804

The record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.

Recorded environments and comparison details.

Excel 16.0 build 19929

Windows, bitness not recorded, CPU not recorded

138 captured inputs are indexed for this environment. Capture dates are not recorded. This is a reading count, not a comparison with another build.

Excel 16.0 build 20131

Windows, bitness not recorded, AMD Ryzen 7 4800H with Radeon Graphics

1,804 captured inputs are indexed for this environment. Capture dates: 2026-07-16 to 2026-07-18. This is a reading count, not a comparison with another build.

Alternatives

NEGBINOM.DIST adds the cumulative option; BINOM.DIST fixes the trial count instead of the success threshold.

Named variants

No named variants are recorded yet.

Suggest a correction or contribute an implementation · For agents