Report

Help us improve this tool

Z Test Calculator

Perform a one-sample z-test with known population standard deviation, z-score, p-value, and critical value decision.

O M T

When to Use a Z-Test

A one-sample z-test checks whether a sample mean differs from a hypothesized population mean when the population standard deviation σ is known. It uses the standard normal distribution because the test statistic is standardized with σ rather than the sample standard deviation. Related tools: Hypothesis Testing Calculator, Z-Score Calculator.

Z-Test Formula

$$z = (\bar{x} - \mu_0)\frac{\sqrt{n}}{\sigma}$$

Compare the z statistic with critical values or convert it to a p-value. Reject $H_0$ when the p-value is less than α or when z falls in the rejection region.

Example

Nine bottles have mean volume 980 mL. If μ₀ = 1000 mL and σ = 30 mL, then $z = (980 - 1000)\sqrt{9}/30 = -2$. A two-tailed test at α = 0.05 gives p ≈ 0.0456, so you reject the claim that the mean is 1000 mL.

Frequently Asked Questions

How is this different from the hypothesis testing calculator?

This tool uses the known population standard deviation σ. The hypothesis testing calculator uses the sample standard deviation and switches to a t-test for smaller samples.

What sample size do I need for a z-test?

A z-test is exact when the data are normal and σ is known. With large samples, the central limit theorem also supports the normal approximation even when the population is not perfectly normal.

What does a negative z-score mean?

The sample mean is below the null hypothesis mean. The magnitude tells you how many standard errors away it is.

Can I use this for proportions?

This calculator is for a numeric mean. For proportions with large samples, use a dedicated proportion z-test tool or normal approximation workflow.