Z-Test Calculator

Perform one-sample, two-sample, and proportion z-tests online. Calculate z statistic, p-value, confidence intervals, and compare against critical values.

Z-Test Calculator

Z Statistic
1.4142
Standardized test statistic
p-Value
0.1573
Not significant at α = 0.05
Decision
Fail to Reject H₀
No significant difference detected
95% CI
[-1.1586, 7.1586]
Confidence interval for the difference
Standard Error
2.1213
Standard error of the estimate
Critical z (α/2)
±1.9604
Rejection threshold for two test

All P-Values

Tailp-ValueSignificant (α=0.05)?
Left-tailed0.921350No
Right-tailed0.078650No
Two-tailed0.157299No

Common Critical Values Reference

Confidenceα (two-tailed)z*Your z: |1.414|
90%0.11.645✗ Below
95%0.051.96✗ Below
98%0.022.326✗ Below
99%0.012.576✗ Below
99.9%0.0013.291✗ Below
Planning notes, formulas, and examples

About the Z-Test Calculator

The z-test is a fundamental hypothesis test used when the population standard deviation is known or sample sizes are large enough for the normal approximation. It compares sample statistics to hypothesized population parameters using the standard normal distribution.

This calculator supports four z-test variants: one-sample mean test, two-sample mean comparison, one-proportion test, and two-proportion comparison. Enter your data, select the test type and tail direction, and get the z statistic, p-value, confidence interval, and a comparison against critical values at multiple significance levels.

Z-tests are foundational in quality control, epidemiology, political polling, A/B testing, and introductory statistics courses where students learn hypothesis testing concepts.

When This Page Helps

While the t-test is more common when sigma is estimated from the sample, the z-test is still the right tool for proportion tests, large-sample inference, and settings where the population standard deviation is known. This calculator keeps the mean-based and proportion-based versions together so you can compare the statistic, p-value, and critical value without switching tools.

How to Use the Inputs

  1. Select the z-test type: one-sample mean, two-sample means, one proportion, or two proportions.
  2. Enter the relevant statistics (means, standard deviations, proportions, sample sizes).
  3. Choose the tail direction for the alternative hypothesis.
  4. Set your significance level alpha.
  5. Review the z statistic and p-value.
  6. Check the confidence interval for the difference.
  7. Compare your z to common critical values in the reference table.
Formula used
One-Sample Z-Test: z = (x̄ − μ₀) / (σ / √n) Two-Sample Z-Test: z = (x̄₁ − x̄₂) / √(σ₁²/n₁ + σ₂²/n₂) One-Proportion Z-Test: z = (p̂ − p₀) / √(p₀(1−p₀)/n) Two-Proportion Z-Test: z = (p̂₁ − p̂₂) / √(p̂(1−p̂)(1/n₁ + 1/n₂)) p̂ = (x₁ + x₂) / (n₁ + n₂) (pooled proportion)

Example Calculation

Result: z = 1.4142, p = 0.1573 (two-tailed)

Testing whether a sample mean of 103 differs from μ₀ = 100, with σ = 15 and n = 50, gives z = 1.41. The two-tailed p-value of 0.157 exceeds 0.05, so we fail to reject H₀. The 95% CI for the difference is [−1.16, 7.16], which includes zero.

Tips & Best Practices

  • Use the z-test only when the population standard deviation is known. If estimating σ from the sample, use a t-test instead (though results converge for large n).
  • For proportion tests, both np₀ ≥ 10 and n(1−p₀) ≥ 10 should hold for the normal approximation to be valid.
  • The two-proportion z-test uses the pooled proportion for the standard error calculation under H₀.
  • With very large samples, even tiny differences become "significant" — always check practical significance alongside statistical significance.
  • Critical z = 1.96 for 95% two-tailed, 2.576 for 99% — these are the most commonly used values.
  • For proportion differences, consider reporting the 95% CI for the difference rather than just the p-value.

Z-Test vs T-Test: A Practical Guide

In textbooks, the z-test requires knowing σ. In practice, σ is rarely known, making the t-test the default. The main exceptions are: proportion tests (which naturally use z), quality control with established process parameters, and large-sample situations where t ≈ z. For sample sizes above 120, the t and z distributions are virtually indistinguishable.

Proportion Tests in Practice

Proportion z-tests are heavily used in A/B testing (web conversion rates), political polling (candidate support), epidemiology (disease prevalence), and clinical trials (treatment success rates). The two-proportion test determines whether two groups have different success rates. For important decisions, supplement with confidence intervals for the difference, odds ratios, and relative risk.

Multiple Z-Tests and Error Control

Running multiple z-tests on the same data inflates the familywise error rate, just like with t-tests. If comparing multiple proportions, consider the chi-square test of homogeneity or apply Bonferroni correction. For A/B tests with multiple variants, sequential testing methods or Bayesian approaches can be more appropriate.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • Use a z-test when the population standard deviation (σ) is known, or for proportion tests. Use a t-test when σ is estimated from the sample. For large samples (n > 30), the results are nearly identical because the t-distribution approaches the normal.