Part of the Math & Statistics suite · 235 calculators

Z-Test Calculator

Test a sample mean against a known population mean when the population standard deviation is known — the one-sample z-test, with the p-value and confidence interval.

z = (x̄ − μ₀) ÷ (σ / √n).

Results update as you type
Results
z statistic
1.885618
p-value
Decision
Standard error
Critical value
Confidence interval — lower
Confidence interval — upper
Observed difference
Reviewed September 2026. Pure mathematics: the result does not depend on where you are. Terminology follows US usage (math, parentheses, decimal point).
No account required · Google Analytics off unless allowedCalculator arithmetic runs in your browserResults update as you type
All calculations run 100% in your browser. The calculator code does not submit your figures to GlobalCalc to obtain a result.
About z-test

How the z-test calculator works

z = (x̄ − μ₀) ÷ (σ / √n). The denominator is the standard error, so z counts how many standard errors the sample mean sits from the hypothesized value. The p-value is the tail area beyond it.

The z-test needs the *population* standard deviation, which you almost never have. If you estimated σ from the same sample, use a t-test instead — the difference matters below about n = 30.

Formula: z = (x̄ − μ₀) / (σ / √n)

Worked examples

Inputsz statisticNote
Mean 104 against 100, σ 15, n 501.885618z = 1.886, p = 0.059 — not quite significant
A larger sample3.771236the same difference is now significant
No difference at all0z = 0, p = 1

Frequently asked questions

When do I use a z-test rather than a t-test?

When you genuinely know the population standard deviation. In practice that is rare, so the t-test is the usual choice.

What is a p-value?

The probability of seeing a result at least this extreme if the null hypothesis were true. It is not the probability that the null is true.

What does p = 0.059 mean?

That a difference this large would arize by chance about 6% of the time. By the usual 5% convention that is not significant — but the 5% line is a convention, not a law of nature.

One-tailed or two?

Two, unless you committed to a direction before seeing the data. Switching to one-tailed afterwards to get under 0.05 is a well-known way to fool yourself.

Does a significant result mean the effect is large?

No. With a large enough sample, trivially small differences become significant. Always read the effect size alongside the p-value.

Where these figures come from

Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.