ZTEST Function

Excel Functions › Compatibility

All versions (legacy) Compatibility

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.


Quick answer:
=ZTEST({3,6,7,8,6,5,4,2,1,9},4) one-tailed p-value ≈ 0.0905

Syntax

=ZTEST(array, x, [sigma])
ArgumentDescription
arrayRequiredThe data set to test against the hypothesised mean.
xRequiredThe hypothesised population mean to test.
sigmaOptionalThe 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.

=ZTEST({3,6,7,8,6,5,4,2,1,9},4) // one-tailed p ≈ 0.0905

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

Live demo

Pick a ZTEST example to see the formula and its result.

Result:

Practice workbook

📊
Download the free ZTEST practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

Is ZTEST the same as Z.TEST?
Yes — 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?
One-tailed (upper tail). For a two-tailed p–value compute 2 * MIN(ZTEST(...), 1 - ZTEST(...)).
What happens if I omit sigma?
ZTEST falls back to the sample standard deviation of the array. Supply sigma only when you know the true population standard deviation.
Should I switch to Z.TEST?
For new work, yes — it is the supported name. Existing ZTEST formulas keep working.

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

Related functions: Z.TEST · TTEST · NORM.S.DIST · STDEV · CONFIDENCE