Home » Statistics & Probability Calculators » One Sample Z-Test Calculator (With Steps)

One Sample Z-Test Calculator (With Steps)

Home › Statistics & Probability Calculators › One Sample Z-Test Calculator (With Steps)

One Sample Z-Test Calculator

Use the one-sample z-test to decide whether a population mean equals a claimed value when the population standard deviation σ is known (or the sample is large enough that the sample SD is a safe stand-in). Enter the sample mean, the hypothesised mean, σ and the sample size; pick a two-tailed, left-tailed or right-tailed alternative and a significance level.

The calculator computes the standard error σ/√n, the z statistic, the p-value from the standard normal distribution and the critical value, then states the decision in plain words: reject or fail to reject the null hypothesis, and what that means for the claim. A confidence interval for the mean and Cohen’s d are included so you can report the size of the effect, not only whether it is significant.

If σ is unknown and you only have the sample standard deviation, use the one-sample t-test instead; with n above about 30 the two give almost the same answer.

Result and step-by-step solution

z = 1.6
p = 0.1096
Fail to reject H₀ at α = 0.05. The result is not statistically significant: the data do not give enough evidence at the 5% level to conclude that the population mean differs from 100.
  1. State the hypotheses
    H₀: μ = 100   H₁: μ ≠ 100 (two-tailed test)
  2. Standard error of the mean
    SE = σ ÷ √n = 15 ÷ √36 = 2.5
  3. Test statistic
    z = (x̄ − μ₀) ÷ SE = (104 − 100) ÷ 2.5 = 1.6
  4. p-value
    2 × P(Z ≥ |1.6|) = 0.1096 from the standard normal distribution
  5. Decision
    p = 0.1096 ≥ α = 0.05. Critical value approach: critical values ±1.96 (reject when |z| > 1.96).
95% confidence interval for μ99.1001 to 108.8999
Effect size (Cohen’s d)0.267

Frequently asked questions

When should I use a z-test instead of a t-test?
Use the z-test when the population standard deviation is known, or when n is large (30+) and you accept the sample SD as an estimate of σ. Otherwise the t-test is correct.
What does the p-value mean here?
It is the probability, if the null hypothesis were true, of getting a sample mean at least as far from μ₀ as the one observed. A p-value below α means the observed mean would be unusual under H₀, so H₀ is rejected.
How do I choose between one-tailed and two-tailed?
Use two-tailed when the question is whether the mean differs from μ₀ in either direction. Use one-tailed only when the direction was specified before the data was collected (for example, “the new process takes less time”).
What is the critical value for a 5% two-tailed z-test?
±1.96. For a one-tailed 5% test it is 1.645 (or −1.645). At 1% the values are ±2.576 and 2.326.

Last reviewed: September 25, 2026. Calculations run in your browser and were validated against SciPy.

Scroll to Top