📐 Z-Test Calculator
Enter your sample mean, known population σ and size to run a z-test — with the z statistic, exact p-value and whether the result is significant.
z statistic
1.667
Standard error
3
p-value
0.0956
Not significant at α = 0.05
p = 0.0956 ≥ 0.05, so you fail to reject the null hypothesis — not enough evidence of a real difference at this level.
The z-test assumes the population standard deviation (σ) is known and uses the standard normal distribution. Use it when σ is known or the sample is large; when σ is estimated from the sample, prefer the t-test instead. p-values use an exact normal CDF. 🔒 Computed in your browser.
How the z-test calculator works
The z-test compares a sample mean to a hypothesized value (one-sample) or two sample means to each other (two-sample) when the population standard deviation σ is known. The tool computes the standard error, the z statistic (how many standard errors the observed difference is from zero), and the p-value from the exact standard-normal distribution for a one- or two-tailed test, then compares it to your chosen significance level α.
The z-test is the right test when σ is genuinely known or the sample is large enough that the sample SD is a reliable stand-in — otherwise the t-test, which accounts for the extra uncertainty of estimating σ, is the correct choice. The two tests converge as the sample grows. A non-significant result is not proof of “no difference”; it only means the evidence is insufficient at your α. Everything runs locally in your browser.
Frequently asked questions
When should I use a z-test instead of a t-test?
Use a z-test when the population standard deviation (σ) is known, or the sample is large (often n ≥ 30) so the sample SD reliably estimates σ. Use a t-test when σ is unknown and estimated from a smaller sample — it accounts for that extra uncertainty.
What does the z statistic mean?
It’s how many standard errors the observed difference lies from the value expected under the null hypothesis. A larger absolute z means the result is further from “no effect,” which corresponds to a smaller p-value.
What is a one-tailed vs two-tailed test?
A two-tailed test checks for any difference (≠); a one-tailed test checks for a difference in a specific direction (> or <). One-tailed tests have more power in that direction but must be chosen before seeing the data.
Does a significant result prove my hypothesis?
No — it means the data are unlikely under the null hypothesis at your chosen α, so you reject the null. It doesn’t prove the alternative or measure the effect’s size; pair it with an effect-size measure like Cohen’s d.
Is my data uploaded?
No — the z statistic and p-value are computed entirely in your browser and the tool works offline.
Related statistics tools
From the blog
-
Is Your A/B Test Result Real? Significance, p-values and Effect Size
A green 'winner' isn't enough — a real result needs a small p-value AND a meaningful effect size, from an honest test. Here's how the two-proportion z-test, p-values and Cohen's d fit together, with calculators that run in your browser.
-
Which Statistical Test Should I Use? A Decision Guide
t-test, z-test, ANOVA, Mann-Whitney or chi-square? The right test depends on your data type, how many groups you have, and whether it's normal. Here's a simple decision path, with calculators that run in your browser.