One-Sample Z-Test Calculator
Based on the standard normal distribution (μ = 0, σ = 1)
Based on the standard normal distribution (μ = 0, σ = 1)
Two-Tailed
A factory tests whether its bolts' mean tensile strength differs from the 100 N specification at α = 0.05.
Borderline-significant result — the unrounded p-value sits just under 0.05. Always pair this with effect size (a 5 N shift on a process with σ = 15 N) and a confidence interval.
Right-Tailed
An educator tests whether a new curriculum raises mean scores above the 75-point baseline at α = 0.05.
Choose a one-tailed test only when the alternative direction is fixed in advance — selecting it after seeing the data inflates the false-positive rate.
Left-Tailed
A consumer-watchdog tests whether a battery brand's mean life is below the advertised 10-hour benchmark at α = 0.05.
A very small p-value indicates strong evidence that mean battery life falls short of the claim. Even at α = 0.001 we would still reject H₀.
The z-statistic measures how many standard errors the sample mean (x̄) sits from the hypothesized population mean (μ₀). σ is the known population standard deviation and n is the sample size. The denominator σ/√n is the standard error of the mean — a larger sample shrinks it, making small differences detectable.
z = (x̄ − μ₀) / (σ / √n)
A one-sample z-test asks whether your sample's mean differs from a hypothesized population mean by more than chance would predict. You need four ingredients: the sample mean (x̄), the hypothesized mean under the null hypothesis (μ₀), the known population standard deviation (σ), and the sample size (n). The calculator computes the standard error σ/√n, divides the observed difference x̄ − μ₀ by it to get the z-statistic, and converts that z to a p-value using the standard normal distribution. The p-value is the probability of seeing a difference at least this extreme if the null hypothesis were true. Compare it to your significance level α to decide whether to reject H₀. Use a left-tailed test when the alternative hypothesis says μ < μ₀, a right-tailed test when it says μ > μ₀, and a two-tailed test when it just says μ ≠ μ₀.
A factory claims its bolts have a mean tensile strength of 100 N with σ = 15 N. You sample 36 bolts and measure x̄ = 105 N. Test whether the true mean differs from 100 at α = 0.05 (two-tailed).
This is a borderline-significant result — the p-value is just under 0.05. A stricter α = 0.01 threshold would not reject H₀, so report effect size and confidence interval alongside the p-value when the verdict hinges on a single threshold.
Three numbers shape every z-test result. The first is the effect size (x̄ − μ₀), the raw difference between your sample mean and the null value. The second is the standard error σ/√n, which scales the effect by the precision of your estimate — larger samples shrink the standard error and let smaller effects reach significance. The third is the significance threshold α, the false-positive rate you're willing to accept. Crucially, a 'significant' z-test does not say the effect is large or important — only that it is unlikely under H₀. Always pair the p-value with the effect size and a confidence interval. Pre-specify the tail direction; running both directions and reporting the smaller p-value inflates the false-positive rate well above the nominal α.
A one-sample z-test compares a sample mean (x̄) to a hypothesized population mean (μ₀) when the population standard deviation (σ) is known. It computes z = (x̄ − μ₀) / (σ/√n) and reports a p-value indicating how surprising the observed difference would be if the null hypothesis were true.
Use a z-test when the population standard deviation σ is known, or when the sample size is large enough (commonly n > 30) that the sample standard deviation is a reliable proxy. Use a t-test when σ is unknown and n is small. The t-test uses the t-distribution, which has heavier tails than the normal — it is more conservative for small samples.
The p-value is the probability of obtaining a sample mean at least as extreme as yours, assuming the null hypothesis is true. Smaller p-values indicate stronger evidence against H₀. A p-value below your chosen α (commonly 0.05) leads to rejecting H₀, but the p-value does not measure the size or practical importance of the effect.
Choose left-tailed when your alternative hypothesis is μ < μ₀, right-tailed when it is μ > μ₀, and two-tailed when it is μ ≠ μ₀. Decide before you look at the data — picking the tail post hoc inflates the false-positive rate.
It means the data is unusual enough under H₀ that the most plausible explanation is that H₀ is wrong. It does not prove H₁ is true — it just shifts the burden of evidence. Rejection at α = 0.05 means that if H₀ were really true, you would see results this extreme by chance no more than 5% of the time.
The standard error of the mean is σ/√n — the standard deviation of the sampling distribution of x̄. It tells you how much x̄ would typically vary from the true population mean across repeated samples of size n. Larger samples make x̄ a more precise estimate, so the standard error shrinks as n grows.
A non-significant result means the data is consistent with H₀ — but it does not prove H₀ is true. The effect could be smaller than your study had power to detect, or your sample could be too small. Report the effect size and confidence interval; consider whether a larger study could detect a meaningful effect.
For sample sizes above about 30, the central limit theorem ensures the sampling distribution of x̄ is approximately normal regardless of the underlying data shape — the z-test is robust. For small samples drawn from a strongly skewed distribution, consider a non-parametric alternative such as the Wilcoxon signed-rank test.
Reference: The one-sample z-test computes z = (x̄ − μ₀) / (σ/√n) and converts to a p-value using the standard normal cumulative distribution function via the Abramowitz and Stegun rational approximation. Critical values are produced from the inverse normal CDF (Acklam's rational approximation) at the chosen significance level α.