Z.TEST Function (LibreOffice Calc)
LibreOffice Calc Z.TEST returns a signed upper normal tail for a sample mean, with known-sigma examples, omitted-sigma limits and two-sided conversion.
Verification status: Official release source and independently calculated examples for Z.TEST were reviewed. No new LibreOffice Calc application execution is claimed for this guide; the stated version and example limits still apply. How formula examples are checked
Quick answer: For sample 48, 50, 52, 54, 56, a null mean of 50 and known population SD of 4, =Z.TEST(A2:A6;50;4) is approximately 0.131776238641. It is the upper-tail probability for the signed standardized mean difference.
Availability and version history
- Introduced: LibreOffice 4.3.
- Availability: Supported in LibreOffice 26.8.1.1, verified against its function registry. This identifies a supported release, not a final working version.
- Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
- Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.
Syntax and statistical meaning
=Z.TEST(Data; mu [; Sigma])
Data and mu are required. mu is the hypothesized population mean, not the sample mean you calculated. Sigma is optional; if supplied, it must be positive and represents a known population standard deviation. Use the same measurement units for mu, Sigma and the sample observations. Release evaluator.
With known Sigma, the statistic is z=(sample mean−mu)×SQRT(n)/Sigma and the result is P(Z≥z). A sample mean above mu produces a result below 0.5; a sample mean below mu produces a result above 0.5. This tail retains direction, unlike simply evaluating a tail at ABS(z).
The exact normal-reference interpretation applies to independent normal observations with the stated known SD. Large-sample approximations need their own justification. Z.TEST does not check independence, measurement design or whether Sigma was really known in advance.
Reproducible worksheet
Enter the following values in A2:A6. Their mean is 52, sample size is 5 and sample variance is 10.
| Row | A |
|---|---|
| 2 | 48 |
| 3 | 50 |
| 4 | 52 |
| 5 | 54 |
| 6 | 56 |
These references were computed independently and rounded to twelve decimal places.
| Formula | Expected result, approximately |
|---|---|
=Z.TEST(A2:A6;50;4) |
0.131776238641 |
=Z.TEST(A2:A6;52;4) |
0.5 |
=Z.TEST(A2:A6;54;4) |
0.868223761359 |
=Z.TEST(A2:A6;50) |
0.078649603525 |
=Z.TEST(A2:A6;52) |
0.5 |
=Z.TEST(A2:A6;54) |
0.921350396475 |
=Z.TEST(A2:A6;50;2) |
0.012673659339 |
=Z.TEST(A2:A6;50;8) |
0.288075061015 |
The first result corresponds to z=SQRT(5)/2, approximately 1.118033988750. Setting mu to 52 produces z=0 and p=0.5. Changing mu to 54 reverses the sign and complements the original upper tail.
Omitted Sigma does not change the reference distribution
When Sigma is absent, the implementation estimates sample variance using n−1, then still evaluates a normal tail. In the example, =Z.TEST(A2:A6;50) gives approximately 0.078649603525.
That calculation is not the exact small-normal-sample unknown-SD t test. For the latter, form t=(AVERAGE(A2:A6)−50)/(STDEV(A2:A6)/SQRT(COUNT(A2:A6))) and use the t reference with df=n−1 and the intended signed alternative. Here |t|=SQRT(2), and the two-tail t probability is approximately 0.230199641080; the doubled normal tail is only 0.157299207050.
Advanced lower-tail and two-sided results
For a prechosen lower-tail alternative, use =1-Z.TEST(A2:A6;50;4), approximately 0.868223761359. For a two-sided normal-reference test, first put the upper tail in B2, then calculate =2*MIN(B2;1-B2), approximately 0.263552477283.
These formulas change the stated alternative; they do not validate the model. Select the alternative before viewing the observations. For extremely small tails, subtraction from 1 can lose floating-point precision, so compare the calculation method and the precision needed for reporting.
Data and boundary checks
This evaluator requires more than one numeric observation even when Sigma is explicitly supplied; n≤1 has a division-by-zero guard. Referenced text and blank cells should not be counted as measurements. Use COUNT on the same range to make the effective sample size visible.
An omitted-Sigma calculation with zero sample variance has an explicit division-by-zero guard. Supplied Sigma≤0 is rejected. Never replace missing measurements with zeros or hide an error as a seemingly significant zero p-value.
Official evidence and calculation scope
The numerical references were recomputed independently against the retained release contract. Native application execution, import paths and locale behavior are not newly verified by these reference calculations. The 26.8.1.1 dispatcher routes Z.TEST and the legacy ZTEST spelling to the same evaluator. The introduction history above applies to the dotted name.