Statistical
Z.TEST Function in Excel
Returns the one-tailed p-value of a z-test.
Syntax
- =Z.TEST(array, x, [sigma])
Arguments
- array (required): Data to test
- x (required): Value to test
- sigma (optional): Population standard deviation
Examples
- =Z.TEST(A1:A20, 4) - Z-test p-value - Result: p-value
Z.TEST for data analysis
- Confirm whether you need entire columns, filtered subsets, or distinct values.
- Use [COUNTIFS](/functions/countifs/) and [SUMIFS](/functions/sumifs/) for multi-criteria metrics.
- Pivot tables complement single-cell statistical formulas for exploration.
Common errors
- Uses sample std dev if sigma omitted
Use cases
- Hypothesis testing
- Mean testing
- Quality control
Frequently asked questions
- What is Z.TEST used for? Z.TEST performs a z-test and returns the one-tailed p-value, testing whether a sample mean differs significantly from a hypothesized value. Use it when you know the population standard deviation or have large samples (n>30).
- When should I use Z.TEST vs T.TEST? Use Z.TEST when: population standard deviation is known, or sample size is large (n>30). Use T.TEST when: comparing two samples, population stdev is unknown, or sample is small. Z.TEST tests one sample against a hypothesized value.
- How do I get a two-tailed p-value from Z.TEST? Z.TEST returns one-tailed p-value. For two-tailed: =2*MIN(Z.TEST(array, x), 1-Z.TEST(array, x)). Or simply =2*Z.TEST(array, x) if testing whether sample mean is greater than x. Multiply by 2 to account for both tails.
Editorial review
- Reviewed by Excel.Directory Editorial Team. Updated May 2026.