Skip to content

Math

Z-Test Calculator

Enter the sample mean, the population mean you are testing, the population standard deviation, and the sample size. The calculator returns the z statistic, the two-tailed p-value, and whether the result is significant at 0.05. It assumes a normal population or a large sample and a known standard deviation.

Updated 2026-11-12 Editorial estimate Calccc Editorial Team Free · No sign-up

Loading calculator…

What this calculator does

A one-sample z-test checks whether a sample mean is far enough from a claimed population mean to be unlikely under chance. This calculator turns the difference into a z statistic, converts it to a two-tailed p-value, and flags significance at the common 0.05 threshold. It fits quality checks, audit samples, and classroom problems where the population standard deviation is known or the sample is large.

How to use it

  1. Enter the sample mean, claimed mean, standard deviation, and sample size.
  2. Read the z statistic and the two-tailed p-value.
  3. Check the 0.05 decision, then judge practical importance.

How it works

z = (x̄ - μ) / (σ / √n), where x̄ is the sample mean, μ is the population mean, σ is the population standard deviation, and n is the sample size. The denominator is the standard error. For a two-tailed test, p = 2 x (1 - Φ(|z|)), where Φ is the standard normal cumulative distribution. A result is significant at 0.05 when |z| is above about 1.96.

Example calculations

Example 1: not significant

A sample mean of 105 against a claimed 100, with σ = 15 and n = 30, has a standard error of 2.74. z = 1.83 and p is about 0.068, so the result is not significant.

Example 2: significant

A sample mean of 48 against a claimed 50, with σ = 10 and n = 100, has a standard error of 1. z = -2 and p is about 0.046, so the result is significant.

Example 3: borderline significant

A sample mean of 3.2 against a claimed 3.0, with σ = 0.5 and n = 25, has a standard error of 0.1. z = 2 and p is about 0.046, just under 0.05.

What the result means

The z statistic counts how many standard errors separate the sample mean from the claimed mean. A value of 2 means the gap is twice the expected noise. The p-value is the chance of seeing a gap at least that large if the claim were true, so a small p suggests the claim is unlikely, not that it is certainly false. The 0.05 cutoff is a convention, not a law: a p of 0.06 is weak evidence against the claim, not proof for it. Significance also says nothing about practical importance, and a large sample can make a trivial difference significant.

Common mistakes

  • Using the sample standard deviation when the test calls for the population value.
  • Running a one-tailed test and reading a two-tailed p-value.
  • Treating p above 0.05 as proof the null is true.
  • Ignoring that the sample must be random and independent.
  • Confusing statistical significance with practical importance.

Assumptions and limits

  • Observations are independent and randomly sampled.
  • The population standard deviation is known, or the sample is large.
  • The population is normal, or the sample is large enough for the central limit theorem.
  • Data are measured on an interval or ratio scale without severe outliers.
  • The test is two-tailed at the 0.05 level.

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. With an unknown σ and a small sample, use a t-test.

What does a two-tailed p-value mean?

It counts extremes in both directions. A two-tailed p of 0.04 means a result this far from the claim would happen about 4% of the time if the claim held.

Is a p-value of 0.05 significant?

The usual rule is p < 0.05. The cutoff is a convention, not a natural boundary.

Can z be negative?

Yes. A negative z means the sample mean is below the claimed mean. The p-value uses the absolute value, so direction does not change significance.

What sample size counts as large?

A common rule of thumb is 30 or more, but skewed data may need a larger sample.

Does significance mean the difference matters?

No. A tiny difference can be significant with a large sample. Look at the gap and its confidence interval, not only the p-value.

Sources

This calculator is an educational statistics tool and is not a substitute for a formal analysis plan. It assumes a one-sample z-test with known σ and a two-tailed alternative. Check your data and assumptions before relying on the result.

2026 update

How to use the professional output

This page is not just a formula box. The result is designed to be checked, compared, and taken away.

  • Professional worksheet. The result includes the inputs used, the method and scope, and a one-variable sensitivity check for finance calculators.
  • A/B scenarios. Save two input sets in the browser and compare the primary, secondary, and breakdown figures side by side.
  • Print / PDF and CSV. Print a branded worksheet, or export the year-by-year table when the calculator produces one.

The formulas and assumptions above still govern the number. The worksheet makes the estimate auditable; it does not make it a lender quote, tax return, or personalized advice.

Go deeper

Guides that explain the math

Z-Test: One-Sample, Two-Sample, and Assumptions
Math

Z-Test: One-Sample, Two-Sample, and Assumptions

A z-test compares a mean with a hypothesized value or compares two means when the standard deviation is known or the sample is large. Work both cases and read the p-value correctly.

8 min read

Calccc Editorial Team · Updated 2026-11-12

Prepared by Calccc Editorial Team as an educational estimate. This page is not a licensed professional review and is not financial, medical, legal, or tax advice.

Editorial estimate prepared by the Calccc Editorial Team; not a licensed professional review.