
In this article
ZTEST returns the one-tailed p-value of a z-test. It is a compatibility function: Excel keeps it so workbooks from Excel 2007 and earlier still calculate, but Microsoft recommends Z.TEST for new work. Both give the same result.
Advertisement
Syntax
=ZTEST(array, x, [sigma])
| Argument | What it means |
|---|---|
array |
Data |
x |
Value to test |
Examples
Example 1
=ROUND(ZTEST({120,135,128,160,95,140,132},A2),4)
Result: 0.091. See the worked example table below for more cases.
💡 For new workbooks use Z.TEST: it gives the same answer and is the name Microsoft keeps documenting.
ZTEST in practice
Where you will use it
- Opening and checking older workbooks that use ZTEST
- Understanding formulas shared by colleagues on older Excel versions
- Knowing when to swap in Z.TEST for clarity
Worked example
| Target mean | Formula | Result |
|---|---|---|
| 120 | =ROUND(ZTEST({120,135,128,160,95,140,132},A2),4) | 0.091 |
| 130 | =ROUND(ZTEST({120,135,128,160,95,140,132},A3),4) | 0.5 |
| 140 | =ROUND(ZTEST({120,135,128,160,95,140,132},A4),4) | 0.909 |
Results calculated in Excel. Same result as Z.TEST.
Mistakes people make
| Mistake | What to do instead |
|---|---|
| Using ZTEST in new files | Prefer Z.TEST: same result, clearer name, and the function Microsoft keeps improving |
| Mixing old and new names in one model | Pick one style per workbook so formulas are easy to audit |
Related functions
📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.
Advertisement
✨ Ask AI about this article
Stuck on a step? Ask a question and the AI answers using this article.
Free · AI can be wrong