One-Sample Z-Test Calculator
Test whether a sample mean differs from a hypothesised value when the population standard deviation is known, with the z statistic and p-value.
How it works
z = (x̄ − μ₀) ÷ (σ ÷ √n) · SE = σ ÷ √n
The one-sample z-test asks whether a sample mean is far enough from a claimed population mean to be surprising, given how much sample means naturally wobble. That wobble is the standard error σ/√n, and z counts how many standard errors separate x̄ from μ₀. It applies when the population standard deviation σ is known (or the sample is large); when σ must be estimated from the sample, use a t-test instead.
Worked example
A test claims a population mean of 100 with σ = 15. A sample of 36 scores averages 104. The standard error is 15 ÷ √36 = 2.5, so z = (104 − 100) ÷ 2.5 = 1.6. The two-sided p-value is about 0.110 — above 0.05, so we fail to reject the claim.
Sources: Z-test — Wikipedia
Frequently asked questions
When do I use a z-test instead of a t-test?
Use a z-test when the population standard deviation σ is genuinely known, which is rare, or when the sample is large enough that the estimate is very reliable. When σ is estimated from a small sample, the t-test’s wider tails give more honest p-values.
What does the p-value represent here?
It is the probability of seeing a sample mean at least this far from μ₀ if the null hypothesis were true. A small p-value means such a result would be unusual under the null, which is the evidence used to reject it.
Should I pick a one-sided or two-sided test?
Use two-sided unless you have a firm reason in advance to only care about deviations in one direction. Choosing one-sided after seeing the data inflates your false-positive rate.
Related calculators
For education — check the assumptions (sample size, independence, distribution) before using these statistics in real decisions.