Z.TEST
Quirk foundCategory: Statistical · Last tested 2026-09-01
Real compatibility results for the Z.TEST 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 Z.TEST’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 Z.TEST working in LibreOffice?
Z.TEST 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
-
=Z.TEST(A20:A21,4) on
LibreOffice Calc returned
#DIV/0!, but the documented/expected
result is #N/A.
Provenance
The Remarks publish: "If array is empty, Z.TEST returns the #N/A error value." A2:A11 holds the data; A20:A21 IS DELIBERATELY BLANK AND UNPOPULATED, which is the entire content of this case -- see scripts/check_test_setup_refs.py, which accepts a reference to an unset cell only when the case says in its own words that emptiness is the point.; MISMATCH vs expected: expected '#N/A', got '#DIV/0!'
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(Z.TEST(A2:A11,4),6) | Microsoft's first documented row: the one-tailed p-value at a hypothesized mean of 4 | 0.090574 | 0.090574ProvenanceMicrosoft publishes =Z.TEST(A2:A11,4) = 0.090574 ("One-tailed probability-value of a z-test for the data set above, at the hypothesized population mean of 4"). DERIVATION from the identity the page publishes AS TEXT (this page carries no equation images at all): "Z.TEST(array,x) = 1-Norm.S.Dist((Average(array)- x) / (STDEV(array)/sqrt(n)),TRUE)" when sigma is omitted. With n = 10, AVERAGE = 51/10 = 5.1 and the SAMPLE standard deviation (n-1 divisor), the standard normal CDF was evaluated as erfc(-z/sqrt(2))/2 at 50 digits -- not from a statistics library's norm.cdf. The result is 0.09057419685136376034696, i.e. 0.090574 at the published precision. Microsoft's page was read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/z-test-function. FETCH NOTE FOR THIS BATCH: batch F recorded every /en-us/office/<name>-function-<guid> URL returning Microsoft's 'Sorry, the page you're looking for can't be found' body; today BOTH paths serve the article again -- the GUID form redirects to /en-us/excel/functions/<slug>-function -- and every page cited in this batch came back complete (217-223 KB) in one or two attempts, with no 87 KB stub responses. Nothing here is sourced from a search snippet or a mirror. |
Matched |
| =ROUND(Z.TEST(A2:A11,6),6) | Microsoft's third documented row: the same data at a hypothesized mean of 6 | 0.863043 | 0.863043ProvenanceMicrosoft publishes =Z.TEST(A2:A11,6) = 0.863043. Derived the same way: 0.8630433891295298922184. The pair of rows is worth having because the sample mean 5.1 lies BETWEEN the two hypothesized means, so one p-value is below 0.5 and the other above -- which exercises the page's own remark that "if AVERAGE(array) < x, Z.TEST will return a value greater than 0.5". |
Matched |
| =ROUND(2*MIN(Z.TEST(A2:A11,4),1-Z.TEST(A2:A11,4)),6) | Microsoft's second documented row: the two-tailed form it publishes as a composed formula | 0.181148 | 0.181148ProvenanceMicrosoft publishes =2 * MIN(Z.TEST(A2:A11,4), 1 - Z.TEST(A2:A11,4)) = 0.181148 and documents that composition as the way to get a two-tailed value. Derived as twice the one-tailed figure (which is below 0.5, so MIN picks it): 0.181148393702727521. The case also exercises MIN over two function calls, so a failure should be read against the one-tailed case above before blaming Z.TEST. |
Matched |
| =ROUND(2*MIN(Z.TEST(A2:A11,6),1-Z.TEST(A2:A11,6)),6) | Microsoft's fourth documented row, where MIN must pick the OTHER branch | 0.273913 | 0.273913ProvenanceMicrosoft publishes 0.273913 here. This is the row that makes the MIN meaningful: Z.TEST(A2:A11,6) = 0.863043 is ABOVE 0.5, so the two-tailed value is 2*(1 - 0.863043) = 0.273913221740940216, not twice the p-value itself. An engine that hard-coded doubling would return 1.726087 and fail only on this row. |
Matched |
| =ROUND(Z.TEST(A2:A11,4),12) | The headline example carried to twelve decimals | 0.090574196851 | 0.090574196851ProvenanceAsserted at twelve places from the derivation: 0.090574196851. Six published decimals cannot separate the documented SAMPLE standard deviation (n-1) from a population one (n): with the n divisor (population sigma 2.46779253585 rather than the sample 2.60128173535) the answer would be 0.0793345963, which differs in the second significant digit and WOULD be caught here, but a subtler slip in the standard normal tail would not be. |
Matched |
| =ROUND(Z.TEST(A2:A11,4,2.5),12) | The optional sigma argument supplied, which the page documents as replacing STDEV | 0.082051753413 | 0.082051753413ProvenanceMICROSOFT PUBLISHES NO FIGURE WITH sigma SUPPLIED -- both example rows omit it -- so this value is ours, derived from the page's own three-argument identity "Z.TEST(array,x,sigma) = 1-Norm.S.Dist((Average(array)- x) / (sigma/sqrt(n)),TRUE)". With sigma = 2.5, z = (5.1-4)/(2.5/sqrt(10)) = 1.391326... and the result is 0.08205175341289340444 at 50 digits, i.e. 0.082051753413 at twelve places. The case exists because the optional argument is the only part of the signature no published example touches, and an engine that ignored sigma would return the 0.090574 above. |
Matched |
| =Z.TEST(A20:A21,4) | An empty array, which the page assigns an error code -- the referenced cells are DELIBERATELY left unset | #N/A | #N/AProvenanceThe Remarks publish: "If array is empty, Z.TEST returns the #N/A error value." A2:A11 holds the data; A20:A21 IS DELIBERATELY BLANK AND UNPOPULATED, which is the entire content of this case -- see scripts/check_test_setup_refs.py, which accepts a reference to an unset cell only when the case says in its own words that emptiness is the point. |
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(Z.TEST(A2:A11,4),6) | Microsoft's first documented row: the one-tailed p-value at a hypothesized mean of 4 | 0.090574 | 0.090574ProvenanceMicrosoft publishes =Z.TEST(A2:A11,4) = 0.090574 ("One-tailed probability-value of a z-test for the data set above, at the hypothesized population mean of 4"). DERIVATION from the identity the page publishes AS TEXT (this page carries no equation images at all): "Z.TEST(array,x) = 1-Norm.S.Dist((Average(array)- x) / (STDEV(array)/sqrt(n)),TRUE)" when sigma is omitted. With n = 10, AVERAGE = 51/10 = 5.1 and the SAMPLE standard deviation (n-1 divisor), the standard normal CDF was evaluated as erfc(-z/sqrt(2))/2 at 50 digits -- not from a statistics library's norm.cdf. The result is 0.09057419685136376034696, i.e. 0.090574 at the published precision. Microsoft's page was read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/z-test-function. FETCH NOTE FOR THIS BATCH: batch F recorded every /en-us/office/<name>-function-<guid> URL returning Microsoft's 'Sorry, the page you're looking for can't be found' body; today BOTH paths serve the article again -- the GUID form redirects to /en-us/excel/functions/<slug>-function -- and every page cited in this batch came back complete (217-223 KB) in one or two attempts, with no 87 KB stub responses. Nothing here is sourced from a search snippet or a mirror. |
Matched |
| =ROUND(Z.TEST(A2:A11,6),6) | Microsoft's third documented row: the same data at a hypothesized mean of 6 | 0.863043 | 0.863043ProvenanceMicrosoft publishes =Z.TEST(A2:A11,6) = 0.863043. Derived the same way: 0.8630433891295298922184. The pair of rows is worth having because the sample mean 5.1 lies BETWEEN the two hypothesized means, so one p-value is below 0.5 and the other above -- which exercises the page's own remark that "if AVERAGE(array) < x, Z.TEST will return a value greater than 0.5". |
Matched |
| =ROUND(2*MIN(Z.TEST(A2:A11,4),1-Z.TEST(A2:A11,4)),6) | Microsoft's second documented row: the two-tailed form it publishes as a composed formula | 0.181148 | 0.181148ProvenanceMicrosoft publishes =2 * MIN(Z.TEST(A2:A11,4), 1 - Z.TEST(A2:A11,4)) = 0.181148 and documents that composition as the way to get a two-tailed value. Derived as twice the one-tailed figure (which is below 0.5, so MIN picks it): 0.181148393702727521. The case also exercises MIN over two function calls, so a failure should be read against the one-tailed case above before blaming Z.TEST. |
Matched |
| =ROUND(2*MIN(Z.TEST(A2:A11,6),1-Z.TEST(A2:A11,6)),6) | Microsoft's fourth documented row, where MIN must pick the OTHER branch | 0.273913 | 0.273913ProvenanceMicrosoft publishes 0.273913 here. This is the row that makes the MIN meaningful: Z.TEST(A2:A11,6) = 0.863043 is ABOVE 0.5, so the two-tailed value is 2*(1 - 0.863043) = 0.273913221740940216, not twice the p-value itself. An engine that hard-coded doubling would return 1.726087 and fail only on this row. |
Matched |
| =ROUND(Z.TEST(A2:A11,4),12) | The headline example carried to twelve decimals | 0.09057419685 | 0.090574196851ProvenanceAsserted at twelve places from the derivation: 0.090574196851. Six published decimals cannot separate the documented SAMPLE standard deviation (n-1) from a population one (n): with the n divisor (population sigma 2.46779253585 rather than the sample 2.60128173535) the answer would be 0.0793345963, which differs in the second significant digit and WOULD be caught here, but a subtler slip in the standard normal tail would not be. |
Matched |
| =ROUND(Z.TEST(A2:A11,4,2.5),12) | The optional sigma argument supplied, which the page documents as replacing STDEV | 0.08205175341 | 0.082051753413ProvenanceMICROSOFT PUBLISHES NO FIGURE WITH sigma SUPPLIED -- both example rows omit it -- so this value is ours, derived from the page's own three-argument identity "Z.TEST(array,x,sigma) = 1-Norm.S.Dist((Average(array)- x) / (sigma/sqrt(n)),TRUE)". With sigma = 2.5, z = (5.1-4)/(2.5/sqrt(10)) = 1.391326... and the result is 0.08205175341289340444 at 50 digits, i.e. 0.082051753413 at twelve places. The case exists because the optional argument is the only part of the signature no published example touches, and an engine that ignored sigma would return the 0.090574 above. |
Matched |
| =Z.TEST(A20:A21,4) | An empty array, which the page assigns an error code -- the referenced cells are DELIBERATELY left unset | #N/A | #N/AProvenanceThe Remarks publish: "If array is empty, Z.TEST returns the #N/A error value." A2:A11 holds the data; A20:A21 IS DELIBERATELY BLANK AND UNPOPULATED, which is the entire content of this case -- see scripts/check_test_setup_refs.py, which accepts a reference to an unset cell only when the case says in its own words that emptiness is the point. |
Matched |
LibreOffice Calc 25.8.7.3 (tested 2026-08-31)
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =ROUND(Z.TEST(A2:A11,4),6) | Microsoft's first documented row: the one-tailed p-value at a hypothesized mean of 4 | 0.090574 | 0.090574ProvenanceMicrosoft publishes =Z.TEST(A2:A11,4) = 0.090574 ("One-tailed probability-value of a z-test for the data set above, at the hypothesized population mean of 4"). DERIVATION from the identity the page publishes AS TEXT (this page carries no equation images at all): "Z.TEST(array,x) = 1-Norm.S.Dist((Average(array)- x) / (STDEV(array)/sqrt(n)),TRUE)" when sigma is omitted. With n = 10, AVERAGE = 51/10 = 5.1 and the SAMPLE standard deviation (n-1 divisor), the standard normal CDF was evaluated as erfc(-z/sqrt(2))/2 at 50 digits -- not from a statistics library's norm.cdf. The result is 0.09057419685136376034696, i.e. 0.090574 at the published precision. Microsoft's page was read live on 2026-08-31 at https://support.microsoft.com/en-us/excel/functions/z-test-function. FETCH NOTE FOR THIS BATCH: batch F recorded every /en-us/office/<name>-function-<guid> URL returning Microsoft's 'Sorry, the page you're looking for can't be found' body; today BOTH paths serve the article again -- the GUID form redirects to /en-us/excel/functions/<slug>-function -- and every page cited in this batch came back complete (217-223 KB) in one or two attempts, with no 87 KB stub responses. Nothing here is sourced from a search snippet or a mirror. |
Matched |
| =ROUND(Z.TEST(A2:A11,6),6) | Microsoft's third documented row: the same data at a hypothesized mean of 6 | 0.863043 | 0.863043ProvenanceMicrosoft publishes =Z.TEST(A2:A11,6) = 0.863043. Derived the same way: 0.8630433891295298922184. The pair of rows is worth having because the sample mean 5.1 lies BETWEEN the two hypothesized means, so one p-value is below 0.5 and the other above -- which exercises the page's own remark that "if AVERAGE(array) < x, Z.TEST will return a value greater than 0.5". |
Matched |
| =ROUND(2*MIN(Z.TEST(A2:A11,4),1-Z.TEST(A2:A11,4)),6) | Microsoft's second documented row: the two-tailed form it publishes as a composed formula | 0.181148 | 0.181148ProvenanceMicrosoft publishes =2 * MIN(Z.TEST(A2:A11,4), 1 - Z.TEST(A2:A11,4)) = 0.181148 and documents that composition as the way to get a two-tailed value. Derived as twice the one-tailed figure (which is below 0.5, so MIN picks it): 0.181148393702727521. The case also exercises MIN over two function calls, so a failure should be read against the one-tailed case above before blaming Z.TEST. |
Matched |
| =ROUND(2*MIN(Z.TEST(A2:A11,6),1-Z.TEST(A2:A11,6)),6) | Microsoft's fourth documented row, where MIN must pick the OTHER branch | 0.273913 | 0.273913ProvenanceMicrosoft publishes 0.273913 here. This is the row that makes the MIN meaningful: Z.TEST(A2:A11,6) = 0.863043 is ABOVE 0.5, so the two-tailed value is 2*(1 - 0.863043) = 0.273913221740940216, not twice the p-value itself. An engine that hard-coded doubling would return 1.726087 and fail only on this row. |
Matched |
| =ROUND(Z.TEST(A2:A11,4),12) | The headline example carried to twelve decimals | 0.090574196851 | 0.090574196851ProvenanceAsserted at twelve places from the derivation: 0.090574196851. Six published decimals cannot separate the documented SAMPLE standard deviation (n-1) from a population one (n): with the n divisor (population sigma 2.46779253585 rather than the sample 2.60128173535) the answer would be 0.0793345963, which differs in the second significant digit and WOULD be caught here, but a subtler slip in the standard normal tail would not be. |
Matched |
| =ROUND(Z.TEST(A2:A11,4,2.5),12) | The optional sigma argument supplied, which the page documents as replacing STDEV | 0.082051753413 | 0.082051753413ProvenanceMICROSOFT PUBLISHES NO FIGURE WITH sigma SUPPLIED -- both example rows omit it -- so this value is ours, derived from the page's own three-argument identity "Z.TEST(array,x,sigma) = 1-Norm.S.Dist((Average(array)- x) / (sigma/sqrt(n)),TRUE)". With sigma = 2.5, z = (5.1-4)/(2.5/sqrt(10)) = 1.391326... and the result is 0.08205175341289340444 at 50 digits, i.e. 0.082051753413 at twelve places. The case exists because the optional argument is the only part of the signature no published example touches, and an engine that ignored sigma would return the 0.090574 above. |
Matched |
| =Z.TEST(A20:A21,4) | An empty array, which the page assigns an error code -- the referenced cells are DELIBERATELY left unset | #DIV/0! | #N/AProvenanceThe Remarks publish: "If array is empty, Z.TEST returns the #N/A error value." A2:A11 holds the data; A20:A21 IS DELIBERATELY BLANK AND UNPOPULATED, which is the entire content of this case -- see scripts/check_test_setup_refs.py, which accepts a reference to an unset cell only when the case says in its own words that emptiness is the point. |
Mismatch |
Docs & syntax
- Excel (desktop): official documentation
- Google Sheets: official documentation
- LibreOffice Calc: official documentation
Where Z.TEST behaves differently
- Every error code LibreOffice reports as #VALUE!
Across our 2,334-case executed corpus, 272 cases in 135 functions return #VALUE! in LibreOffice Calc 25.8.7.3 where Microsoft documents #NUM! (244), #N/A (15), #DIV/0! (10) or #REF! (3). Google Sheets returns the documented code on 239 of the 249 it has a function for. Identical in all four LibreOffice builds tested.