NEGBINOM.DIST
Quirk foundCategory: Statistical · Last tested 2026-09-01
Real compatibility results for the NEGBINOM.DIST function: executed in Excel for the web, Google Sheets and LibreOffice Calc, with desktop Excel behavior from Microsoft’s official documentation (we do not run desktop Excel — Excel for the web is a different application and is executed separately). Syntax and links to that documentation are below.
Support matrix
| Engine | Documented | Live-tested | Verdict |
|---|---|---|---|
| Excel (desktop) | Yes | No — documented only | n/a |
| Excel for the web | — | Yes (recalc, 2026-09-01) | Supported, behaves as documented |
| Google Sheets | Yes | Yes (Drive import, 2026-08-31) | Supported, behaves as documented |
| LibreOffice Calc | Yes | Yes (25.8.7.3, 2026-08-31) | Quirk found |
LibreOffice version history
We executed the same test cases under each LibreOffice release to show exactly when NEGBINOM.DIST’s support changed — not documentation claims, real results.
| LibreOffice version | Verdict | Tested |
|---|---|---|
| 24.2.0.3 | Quirk found | 2026-08-31 |
| 24.8.7.2 | Quirk found | 2026-08-31 |
| 25.2.0.3 | Quirk found | 2026-08-31 |
| 25.8.7.3 | Quirk found | 2026-08-31 |
Why isn't NEGBINOM.DIST working in LibreOffice?
NEGBINOM.DIST exists in LibreOffice 25.8.7.3, but it is not a drop-in match for
Excel — our executed tests found real behavioral differences (detailed in the test results on this
page). If a formula that works in Excel or Google Sheets misbehaves in LibreOffice, compare your usage
against the failing cases above before assuming your data is wrong.
Discovered quirks
-
=NEGBINOM.DIST(A2,A3,1.5,TRUE) on
LibreOffice Calc returned
#VALUE!, but the documented/expected
result is #NUM!.
Provenance
Microsoft documents: "If probability_s < 0 or if probability > 1, NEGBINOM.DIST returns the #NUM! error value." (The sentence is quoted as printed: Microsoft's own text drops the _s in its second clause.) OpenFormula 1.3 section 6.18.51 imposes the same constraint on its NEGBINOMDIST.; MISMATCH vs expected: expected '#NUM!', got '#VALUE!'
-
=NEGBINOM.DIST(A2,0,A4,TRUE) on
LibreOffice Calc returned
#VALUE!, but the documented/expected
result is #NUM!.
Provenance
Microsoft documents: "If number_f < 0 or number_s < 1, NEGBINOM.DIST returns the #NUM! error value." Zero successes is below the documented floor of one. Asserted separately from the probability case because the sentence names two different arguments and an engine can guard one and not the other.; MISMATCH vs expected: expected '#NUM!', got '#VALUE!'
Executed test cases
Excel for the web (executed 2026-09-01 via OneDrive recalculation)
These values come from Excel for the web, not from desktop Excel. They are two different implementations of the calculation engine, and this run measured only the web one: the corpus was uploaded to OneDrive as .xlsx, recalculated by Excel for the web on open, and downloaded again for readback. Excel for the web is a rolling service with no pinnable version, so the run is identified by its date. Where a value here disagrees with the Expected column — which is Microsoft’s documentation of the desktop product — we cannot tell you whether the web engine diverges from the desktop one or the documentation is wrong about both, because we do not run desktop Excel.
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =ROUND(NEGBINOM.DIST(A2,A3,A4,TRUE),7) | Microsoft's documented worked example, cumulative form | 0.3135141 | 0.3135141ProvenanceMicrosoft publishes =NEGBINOM.DIST(A2,A3,A4,TRUE) = 0.3135141 for 10 failures, a threshold of 5 successes and a success probability of 0.25. DERIVATION, in exact rational arithmetic with no statistics library: the documented mass function is P(X = x) = C(x + r - 1, r - 1) * p^r * (1 - p)^x with x = number_f, r = number_s and p = probability_s, which for x = 10, r = 5, p = 1/4 is C(14,4) * (1/4)^5 * (3/4)^10 = 1001 * 59049 / 1073741824 = 59108049/1073741824 exactly, = 0.05504866037517786... The cumulative value is the exact sum of that expression over x = 0..10, which is 336633157/1073741824 = 0.3135140584781766... Both are terminating binary fractions -- the denominators are powers of two -- so an engine using IEEE doubles can represent them exactly and there is no rounding anywhere in the derivation. Rounded to seven places, 0.3135140584781766 is 0.3135141 -- Microsoft's published figure, reproduced exactly. Microsoft's page was re-read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/negbinom-dist-function -- note the path: the older /en-us/office/<name>-function-<guid> URLs were returning Microsoft's 'Sorry, the page you're looking for can't be found' body all through this batch (confirmed with curl, with the r.jina.ai reader and with a real headless Firefox), while the /en-us/excel/functions/<name>-function path serves the same article intermittently -- roughly one request in two returns an 87 KB stub, so every page cited in this batch was fetched with retries until the payload exceeded 150 KB. |
Matched |
| =ROUND(NEGBINOM.DIST(A2,A3,A4,FALSE),7) | The same example in its non-cumulative form | 0.0550487 | 0.0550487ProvenanceMicrosoft publishes =NEGBINOM.DIST(A2,A3,A4,FALSE) = 0.0550487 on the same data. 59108049/1073741824 = 0.05504866037517786..., which is 0.0550487 at seven places. The cumulative and non-cumulative rows are asserted separately because the `cumulative` flag is a documented argument an engine can ignore -- one that summed when it should not would still pass a single-row test. |
Matched |
| =ROUND(NEGBINOM.DIST(A2,A3,A4,FALSE),12) | The same mass value carried to twelve decimal places | 0.055048660375 | 0.055048660375ProvenanceSeven published decimals cannot distinguish a correct binomial coefficient from an off-by-one one, so the exact rational 59108049/1073741824 is asserted at twelve places: 0.055048660375. This is the assertion that actually constrains C(x + r - 1, r - 1) -- using C(x + r, r) or C(x + r - 1, x) with the wrong index moves the answer in the fourth significant figure. |
Matched |
| =ROUND(NEGBINOM.DIST(0,5,0.25,FALSE),10) | Zero failures, where the distribution collapses to p^r | 0.0009765625 | 0.0009765625ProvenanceWith x = 0 the binomial coefficient C(r - 1, r - 1) is 1 and the (1 - p)^x factor is 1, so the mass is exactly p^r = (1/4)^5 = 1/1024 = 0.0009765625 -- an exactly representable binary fraction that every conforming engine must return bit for bit. Structural rather than derived: it pins the p^r factor on its own, with the combinatorial factor removed. |
Matched |
| =NEGBINOM.DIST(A2,A3,1.5,TRUE) | A success probability above 1, which the page excludes | #NUM! | #NUM!ProvenanceMicrosoft documents: "If probability_s < 0 or if probability > 1, NEGBINOM.DIST returns the #NUM! error value." (The sentence is quoted as printed: Microsoft's own text drops the _s in its second clause.) OpenFormula 1.3 section 6.18.51 imposes the same constraint on its NEGBINOMDIST. |
Matched |
| =NEGBINOM.DIST(A2,0,A4,TRUE) | A threshold of zero successes, which the page excludes | #NUM! | #NUM!ProvenanceMicrosoft documents: "If number_f < 0 or number_s < 1, NEGBINOM.DIST returns the #NUM! error value." Zero successes is below the documented floor of one. Asserted separately from the probability case because the sentence names two different arguments and an engine can guard one and not the other. |
Matched |
| =NEGBINOM.DIST("x",A3,A4,TRUE) | A non-numeric first argument | #VALUE! | #VALUE!ProvenanceMicrosoft documents: "If any argument is nonnumeric, NEGBINOM.DIST returns the #VALUE! error value." Note the page uses #VALUE! for a wrong-typed argument and #NUM! for every out-of-range one, so the two codes are asserted separately. |
Matched |
Google Sheets (executed 2026-08-31 via Drive import)
Google Sheets is a rolling service with no pinnable version, so this run is identified by its date. The corpus was imported to Drive as .xlsx, recalculated by Sheets, and exported back for readback.
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =ROUND(NEGBINOM.DIST(A2,A3,A4,TRUE),7) | Microsoft's documented worked example, cumulative form | 0.3135141 | 0.3135141ProvenanceMicrosoft publishes =NEGBINOM.DIST(A2,A3,A4,TRUE) = 0.3135141 for 10 failures, a threshold of 5 successes and a success probability of 0.25. DERIVATION, in exact rational arithmetic with no statistics library: the documented mass function is P(X = x) = C(x + r - 1, r - 1) * p^r * (1 - p)^x with x = number_f, r = number_s and p = probability_s, which for x = 10, r = 5, p = 1/4 is C(14,4) * (1/4)^5 * (3/4)^10 = 1001 * 59049 / 1073741824 = 59108049/1073741824 exactly, = 0.05504866037517786... The cumulative value is the exact sum of that expression over x = 0..10, which is 336633157/1073741824 = 0.3135140584781766... Both are terminating binary fractions -- the denominators are powers of two -- so an engine using IEEE doubles can represent them exactly and there is no rounding anywhere in the derivation. Rounded to seven places, 0.3135140584781766 is 0.3135141 -- Microsoft's published figure, reproduced exactly. Microsoft's page was re-read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/negbinom-dist-function -- note the path: the older /en-us/office/<name>-function-<guid> URLs were returning Microsoft's 'Sorry, the page you're looking for can't be found' body all through this batch (confirmed with curl, with the r.jina.ai reader and with a real headless Firefox), while the /en-us/excel/functions/<name>-function path serves the same article intermittently -- roughly one request in two returns an 87 KB stub, so every page cited in this batch was fetched with retries until the payload exceeded 150 KB. |
Matched |
| =ROUND(NEGBINOM.DIST(A2,A3,A4,FALSE),7) | The same example in its non-cumulative form | 0.0550487 | 0.0550487ProvenanceMicrosoft publishes =NEGBINOM.DIST(A2,A3,A4,FALSE) = 0.0550487 on the same data. 59108049/1073741824 = 0.05504866037517786..., which is 0.0550487 at seven places. The cumulative and non-cumulative rows are asserted separately because the `cumulative` flag is a documented argument an engine can ignore -- one that summed when it should not would still pass a single-row test. |
Matched |
| =ROUND(NEGBINOM.DIST(A2,A3,A4,FALSE),12) | The same mass value carried to twelve decimal places | 0.05504866038 | 0.055048660375ProvenanceSeven published decimals cannot distinguish a correct binomial coefficient from an off-by-one one, so the exact rational 59108049/1073741824 is asserted at twelve places: 0.055048660375. This is the assertion that actually constrains C(x + r - 1, r - 1) -- using C(x + r, r) or C(x + r - 1, x) with the wrong index moves the answer in the fourth significant figure. |
Matched |
| =ROUND(NEGBINOM.DIST(0,5,0.25,FALSE),10) | Zero failures, where the distribution collapses to p^r | 0.0009765625 | 0.0009765625ProvenanceWith x = 0 the binomial coefficient C(r - 1, r - 1) is 1 and the (1 - p)^x factor is 1, so the mass is exactly p^r = (1/4)^5 = 1/1024 = 0.0009765625 -- an exactly representable binary fraction that every conforming engine must return bit for bit. Structural rather than derived: it pins the p^r factor on its own, with the combinatorial factor removed. |
Matched |
| =NEGBINOM.DIST(A2,A3,1.5,TRUE) | A success probability above 1, which the page excludes | #NUM! | #NUM!ProvenanceMicrosoft documents: "If probability_s < 0 or if probability > 1, NEGBINOM.DIST returns the #NUM! error value." (The sentence is quoted as printed: Microsoft's own text drops the _s in its second clause.) OpenFormula 1.3 section 6.18.51 imposes the same constraint on its NEGBINOMDIST. |
Matched |
| =NEGBINOM.DIST(A2,0,A4,TRUE) | A threshold of zero successes, which the page excludes | #NUM! | #NUM!ProvenanceMicrosoft documents: "If number_f < 0 or number_s < 1, NEGBINOM.DIST returns the #NUM! error value." Zero successes is below the documented floor of one. Asserted separately from the probability case because the sentence names two different arguments and an engine can guard one and not the other. |
Matched |
| =NEGBINOM.DIST("x",A3,A4,TRUE) | A non-numeric first argument | #VALUE! | #VALUE!ProvenanceMicrosoft documents: "If any argument is nonnumeric, NEGBINOM.DIST returns the #VALUE! error value." Note the page uses #VALUE! for a wrong-typed argument and #NUM! for every out-of-range one, so the two codes are asserted separately. |
Matched |
LibreOffice Calc 25.8.7.3 (tested 2026-08-31)
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =ROUND(NEGBINOM.DIST(A2,A3,A4,TRUE),7) | Microsoft's documented worked example, cumulative form | 0.3135141 | 0.3135141ProvenanceMicrosoft publishes =NEGBINOM.DIST(A2,A3,A4,TRUE) = 0.3135141 for 10 failures, a threshold of 5 successes and a success probability of 0.25. DERIVATION, in exact rational arithmetic with no statistics library: the documented mass function is P(X = x) = C(x + r - 1, r - 1) * p^r * (1 - p)^x with x = number_f, r = number_s and p = probability_s, which for x = 10, r = 5, p = 1/4 is C(14,4) * (1/4)^5 * (3/4)^10 = 1001 * 59049 / 1073741824 = 59108049/1073741824 exactly, = 0.05504866037517786... The cumulative value is the exact sum of that expression over x = 0..10, which is 336633157/1073741824 = 0.3135140584781766... Both are terminating binary fractions -- the denominators are powers of two -- so an engine using IEEE doubles can represent them exactly and there is no rounding anywhere in the derivation. Rounded to seven places, 0.3135140584781766 is 0.3135141 -- Microsoft's published figure, reproduced exactly. Microsoft's page was re-read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/negbinom-dist-function -- note the path: the older /en-us/office/<name>-function-<guid> URLs were returning Microsoft's 'Sorry, the page you're looking for can't be found' body all through this batch (confirmed with curl, with the r.jina.ai reader and with a real headless Firefox), while the /en-us/excel/functions/<name>-function path serves the same article intermittently -- roughly one request in two returns an 87 KB stub, so every page cited in this batch was fetched with retries until the payload exceeded 150 KB. |
Matched |
| =ROUND(NEGBINOM.DIST(A2,A3,A4,FALSE),7) | The same example in its non-cumulative form | 0.0550487 | 0.0550487ProvenanceMicrosoft publishes =NEGBINOM.DIST(A2,A3,A4,FALSE) = 0.0550487 on the same data. 59108049/1073741824 = 0.05504866037517786..., which is 0.0550487 at seven places. The cumulative and non-cumulative rows are asserted separately because the `cumulative` flag is a documented argument an engine can ignore -- one that summed when it should not would still pass a single-row test. |
Matched |
| =ROUND(NEGBINOM.DIST(A2,A3,A4,FALSE),12) | The same mass value carried to twelve decimal places | 0.055048660375 | 0.055048660375ProvenanceSeven published decimals cannot distinguish a correct binomial coefficient from an off-by-one one, so the exact rational 59108049/1073741824 is asserted at twelve places: 0.055048660375. This is the assertion that actually constrains C(x + r - 1, r - 1) -- using C(x + r, r) or C(x + r - 1, x) with the wrong index moves the answer in the fourth significant figure. |
Matched |
| =ROUND(NEGBINOM.DIST(0,5,0.25,FALSE),10) | Zero failures, where the distribution collapses to p^r | 0.0009765625 | 0.0009765625ProvenanceWith x = 0 the binomial coefficient C(r - 1, r - 1) is 1 and the (1 - p)^x factor is 1, so the mass is exactly p^r = (1/4)^5 = 1/1024 = 0.0009765625 -- an exactly representable binary fraction that every conforming engine must return bit for bit. Structural rather than derived: it pins the p^r factor on its own, with the combinatorial factor removed. |
Matched |
| =NEGBINOM.DIST(A2,A3,1.5,TRUE) | A success probability above 1, which the page excludes | #VALUE! | #NUM!ProvenanceMicrosoft documents: "If probability_s < 0 or if probability > 1, NEGBINOM.DIST returns the #NUM! error value." (The sentence is quoted as printed: Microsoft's own text drops the _s in its second clause.) OpenFormula 1.3 section 6.18.51 imposes the same constraint on its NEGBINOMDIST. |
Mismatch |
| =NEGBINOM.DIST(A2,0,A4,TRUE) | A threshold of zero successes, which the page excludes | #VALUE! | #NUM!ProvenanceMicrosoft documents: "If number_f < 0 or number_s < 1, NEGBINOM.DIST returns the #NUM! error value." Zero successes is below the documented floor of one. Asserted separately from the probability case because the sentence names two different arguments and an engine can guard one and not the other. |
Mismatch |
| =NEGBINOM.DIST("x",A3,A4,TRUE) | A non-numeric first argument | #VALUE! | #VALUE!ProvenanceMicrosoft documents: "If any argument is nonnumeric, NEGBINOM.DIST returns the #VALUE! error value." Note the page uses #VALUE! for a wrong-typed argument and #NUM! for every out-of-range one, so the two codes are asserted separately. |
Matched |
Docs & syntax
- Excel (desktop): official documentation
- Google Sheets: official documentation
- LibreOffice Calc: official documentation