Loona Calculators
Loona Calculators › Maths › Z-Test Calculator

📐 Z-Test Calculator

Run a one-sample z-test for the case where the population standard deviation σ is genuinely known: enter the sample mean, σ, sample size and the hypothesised mean to get z and its p-values.

Quick answer: z = (x̄ − μ₀) ÷ (σ ÷ √n). Sample mean 105, σ = 15, n = 25, μ₀ = 100: z = 5 ÷ 3 = 1.667, two-tailed p ≈ 0.0956 — closer to significance than the t-test on the same numbers, because z assumes σ is known exactly.

How to use the Z-Test Calculator

  1. Enter the sample mean.
  2. Enter the known population standard deviation σ.
  3. Enter n and the hypothesised mean μ₀.
  4. Read z and the one- and two-tailed p-values.
Example: A machine fills bottles to a known process σ of 15 ml. A sample of 25 averages 105 against a 100 target: z = 1.667, p ≈ 0.0956 — watch the process, but the evidence does not cross the 5% line.

Frequently Asked Questions

When is σ ever 'known'?

In standardised testing with long-established scales, in manufacturing processes characterised over years of data, and in textbook problems. If σ was estimated from the same sample, the t-test is the correct tool.

Why is the z p-value smaller than the t p-value here?

Because knowing σ removes a layer of uncertainty. The t distribution's heavier tails at 24 df price in the chance that s underestimates σ; z does not pay that price.

What significance level should I use?

0.05 is conventional, 0.01 stricter. Choose before looking at results, and report the exact p-value alongside — this calculator always shows it.

Related Calculators

%

Percentage Calculator

Maths

📊

Statistics Calculator

Maths

½

Fraction Calculator

Maths

🧮

Equation Solver

Maths

🔬

Scientific Calculator

Maths

📐

Average Calculator

Maths

🔔

Z-Score Calculator

Maths

🎲

Probability Calculator

Maths

How it works — the formula

z = (x̄ − μ₀) ÷ (σ ÷ √n). P-values come from the standard normal CDF Φ: two-tailed p = 2 × (1 − Φ(|z|)).

Worked example

Inputs: x̄ = 105, σ = 15, n = 25, μ₀ = 100.

Steps: Standard error = 15 ÷ 5 = 3. z = 5 ÷ 3 = 1.667. Φ(1.667) ≈ 0.9522. Two-tailed p = 2 × (1 − 0.9522) = 0.0956.

Result: z = 1.667, p ≈ 0.0956.

Embed this calculator on your website — free

Add this calculator to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the calculator to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.