Z-Test Calculator
Run a z-test for a one-sample mean or a one-proportion.
How the z-test works
The z-test uses the standard normal distribution to test a hypothesis about a mean or a proportion. It requires the population standard deviation to be known — it is not a substitute for a t-test when σ is unknown.
The one-sample mean z-test compares a sample mean against a hypothesized value using the known population σ. The one-proportion z-test compares an observed proportion against a hypothesized value.
The z statistic is the difference between the observed value and the hypothesized value, divided by its standard error. The p-value is read from the normal distribution according to the tails you select.
The formulas
Mean: z = (x̄ − μ₀) / (σ/√n) · Proportion: z = (p̂ − p₀) / √(p₀(1−p₀)/n)
The one-sample mean z-test requires the KNOWN population standard deviation σ. If σ is unknown, a t-test is the appropriate choice — this calculator does not silently substitute one for the other. The p-value is the normal tail probability.
Worked example
A mean z-test with σ known
With n = 100, a sample mean of 102, σ = 10 and μ₀ = 100, z = (102−100)/(10/10) = 2. The two-tailed p-value is about 0.0455 — significant at the 5% level.
Frequently asked questions
When is a z-test appropriate for a mean?
Only when the population standard deviation σ is known. Otherwise use a t-test. For proportions, the normal approximation requires a large enough sample (expected counts of at least 5).
What is the difference between one-tailed and two-tailed?
Two-tailed tests for a difference in either direction; one-tailed tests for a change in a specified direction. Two-tailed is the common default.
Why does the mean z-test need σ?
The z-test's standard error uses the population standard deviation. When σ is unknown and estimated from the sample, the test statistic follows a t-distribution, not a normal one.
Related tools
Related guides
- How to Choose the Right Statistical TestA practical framework for picking the right statistical test: start from your research question, data type and study design, then check the assumptions.
- Understanding P-Values and Statistical SignificanceWhat a p-value actually means, what it does not mean, the role of the significance level, and why the field is moving away from the 0.05 bright line.
- T-Test vs Z-Test vs ANOVAWhen to use a z-test, a t-test or an ANOVA, the assumptions behind each, and how the tests relate — including why F equals t² for two groups.
Built by PanelRoster
PanelRoster is an enterprise operations management platform for organizations coordinating distributed teams, assignments, workflows, quality assurance and operational execution.
Explore PanelRoster