The Excel ZTEST function returns the one–tailed probability–value of a z–test. It is a legacy name — Microsoft now recommends Z.TEST, which is identical.
Syntax
| Argument | Description | |
|---|---|---|
array | Required | The data set to test against the hypothesised mean. |
x | Required | The hypothesised population mean to test. |
sigma | Optional | The known population standard deviation. If omitted, the sample standard deviation is used. |
How to use it
ZTEST returns the one-tailed probability that the sample mean is greater than the value implied by x — effectively the upper-tail p–value of a z–test.
If you omit sigma, ZTEST uses the sample standard deviation of array. For a two-tailed test, use 2 * MIN(ZTEST(...), 1 - ZTEST(...)).
Use the modern name: =Z.TEST(array, x, [sigma]) takes the same arguments and returns the same value. ZTEST is kept only for backward compatibility.
Try it: interactive demo
Pick a ZTEST example to see the formula and its result.
Practice workbook
Frequently asked questions
Is ZTEST the same as Z.TEST?
Z.TEST (Excel 2010+) takes the same array, x, and optional sigma arguments and returns identical results. ZTEST is kept for backward compatibility.Is the result one-tailed or two-tailed?
2 * MIN(ZTEST(...), 1 - ZTEST(...)).What happens if I omit sigma?
Should I switch to Z.TEST?
Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class