Z-Test Calculator

Use a z-test to compare a mean with a hypothesized value, or two means with each other, when the population standard deviations are known. Both tests are here, with a confidence interval and a graph of the rejection region.

One sample: z = (x̄ − μ₀) ÷ (σ ÷ √n) · Two samples: z = (x̄₁ − x̄₂ − Δ₀) ÷ √(σ₁²/n₁ + σ₂²/n₂)

z-test or t-test?

In practice the population SD is rarely known, so the t-test is usually correct. z-tests apply to standardised tests with published σ, to quality control with long process histories, and as a large-sample approximation. For proportions, use the proportion z-test.