Home · Statistics · Inference & Tests · Z-test Calculator
Z-test Calculator
The z-test statistic for a mean with known σ, or for a proportion against a hypothesised value — the large-sample, known-spread counterpart of the t-test.
What this calculator does
The z-test statistic for a mean with known σ, or for a proportion against a hypothesised value — the large-sample, known-spread counterpart of the t-test. Every figure on this page is computed from the standard definition stated below — the same definition used in textbooks and reference tables — with no hidden rounding steps, and the method notes name the exact convention where more than one exists.
The formula and method
Mean mode (default) requires the population standard deviation σ; the statistic is standard normal under the null.
Proportion mode builds the standard error from the hypothesised p₀ (not from p̂), which is the correct null-based form for testing.
Compare |z| with 1.96 for a two-sided 5% test, or convert it with the p-value calculator.
Worked example
With the example inputs this page opens with (sample mean 104, hypothesised mean μ₀ 100, population standard deviation σ 15, sample size n 36), the result is 1.6000. Change any figure and the result updates with the same formula.
Quick reference
| Sample mean | Result |
|---|---|
| 52 | -19.2000 |
| 83.2 | -6.7200 |
| 104 | 1.6000 |
| 130 | 12.0000 |
| 156 | 22.4000 |
| 208 | 43.2000 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
When is a z-test legitimate instead of a t-test?
When σ is genuinely known, or the sample is large enough that the estimated s is effectively exact and the normal approximation holds. For proportions, the z-test is the standard tool once both np₀ and n(1−p₀) are at least about 10.
Why does the proportion mode use p₀ in the standard error?
A test statistic is calibrated under the null hypothesis, so its spread must be computed at the null value p₀. Confidence intervals, by contrast, use p̂ — which is why a proportion's interval and test can occasionally disagree at the boundary.
How does the Z-test Calculator work?
The z-test statistic for a mean with known σ, or for a proportion against a hypothesised value — the large-sample, known-spread counterpart of the t-test. Mode · Mean · μ₀ · σ · n (or successes x and p₀) → z-statistic. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the Z-test Calculator need?
Mode · Mean · μ₀ · σ · n (or successes x and p₀) → z-statistic. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.