ZTEST Function in Excel: z-Test (Older Name)

ZTEST Function in Excel: z-Test (Older Name) 1
⏱ 1 min readUpdated 5 October 2026

StatisticsLevel: IntermediateAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. ZTEST in practice
  5. Where you will use it
  6. Worked example
  7. Mistakes people make
  8. Related functions

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 meanFormulaResult
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

MistakeWhat to do instead
Using ZTEST in new filesPrefer Z.TEST: same result, clearer name, and the function Microsoft keeps improving
Mixing old and new names in one modelPick one style per workbook so formulas are easy to audit

Z.TEST

📚 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