# Z Test Calculator

Run one-sample Z tests for a mean with known population standard deviation or a single population proportion

> Canonical page: https://elysiatools.com/en/tools/z-test-calculator

- **Category:** Math & Numbers

- **Keywords:** z test, normal test, mean test, proportion test, p value, calculator

## Overview

The Z Test Calculator is a statistical utility designed to perform one-sample Z tests for either a population mean or a population proportion. By inputting your sample statistics and known population parameters, the tool instantly calculates the Z-statistic, P-value, and determines whether to reject the null hypothesis based on your chosen significance level (alpha). It is ideal for researchers, analysts, and quality control professionals who need to evaluate sample data against established population metrics.

## Inputs

- **Test Type** (select)
- **Sample Mean** (number)
- **Hypothesized Mean** (number)
- **Population Standard Deviation** (number)
- **Sample Size** (number)
- **Success Count** (number)
- **Trial Count** (number)
- **Hypothesized Proportion** (number)
- **Alternative Hypothesis** (select)
- **Alpha** (number)
- **Decimal Places** (number)

## When to use

- When you need to compare a sample mean to a known population mean and the population standard deviation is already known.
- When evaluating whether a sample proportion significantly differs from a hypothesized population proportion.
- When conducting hypothesis testing with large sample sizes where the normal distribution can be assumed.

## How it works

- Select the test type: choose 'Mean' for continuous data or 'Proportion' for categorical success/failure data.
- Enter your sample statistics, such as the sample mean and size, along with the hypothesized population parameters.
- Set your alternative hypothesis (two-sided, greater, or less) and the desired alpha level (e.g., 0.05).
- The calculator computes the Z-statistic and P-value, outputting a clear JSON result indicating whether to reject the null hypothesis.

## Use cases

- Quality control managers testing if a new manufacturing batch's average weight differs from the historical population mean.
- Marketers determining if the conversion rate of a new landing page is significantly higher than the industry standard proportion.
- Researchers verifying if survey results from a specific demographic deviate from known national census proportions.

## Frequently asked questions

### What is the difference between a Z-test and a T-test?

A Z-test is used when the population standard deviation is known or the sample size is very large. A T-test is used when the population standard deviation is unknown and must be estimated from the sample.

### What does the alpha value represent?

Alpha is the significance level, representing the probability of rejecting the null hypothesis when it is actually true. A common default is 0.05 (5%).

### Can I perform a one-sided Z-test?

Yes, you can select 'Greater Than' or 'Less Than' in the Alternative Hypothesis dropdown to run a one-sided test.

### What inputs are required for a proportion Z-test?

You need the success count, total trial count, and the hypothesized population proportion.

### What does 'rejectNull: true' mean in the output?

It means the calculated P-value is less than your specified alpha level, indicating statistically significant evidence against the null hypothesis.

## Related tools

- [Average Calculator](https://elysiatools.com/en/tools/average-calculator): Compare arithmetic, geometric, and harmonic averages for a numeric dataset in one place
- [Confidence Interval Calculator](https://elysiatools.com/en/tools/confidence-interval-calculator): Calculate confidence intervals for a sample mean or proportion using either raw data or summary statistics
- [Heat Exchanger LMTD Calculator (Log Mean Temperature Difference)](https://elysiatools.com/en/tools/heat-exchanger-lmtd): Compute the Log Mean Temperature Difference (LMTD) of a heat exchanger for parallel or counter flow. Parallel flow: ΔT₁ = T_h,in - T_c,in and ΔT₂ = T_h,out - T_c,out; counter flow: ΔT₁ = T_h,in - T_c,out and ΔT₂ = T_h,out - T_c,in. LMTD = (ΔT₁ - ΔT₂)/ln(ΔT₁/ΔT₂), or ΔT₁ when ΔT₁ = ΔT₂. A non-positive terminal difference (temperature cross) is physically impossible and is rejected. Optionally, with the overall heat transfer coefficient U (W/(m²·K)) and the heat transfer area A (m²), the heat transfer rate Q = U·A·LMTD (W) is returned. Temperatures are used only as differences: Δ°C = ΔK and Δ°F ×5/9 = ΔK; the LMTD is reported in K.
- [Normal Distribution Calculator](https://elysiatools.com/en/tools/normal-distribution-calculator): Calculate z-scores, cumulative probability, tail probability, and interval probability for a normal distribution
- [Sample Size Calculator](https://elysiatools.com/en/tools/sample-size-calculator): Estimate required sample size for proportions or means using confidence level, margin of error, and optional finite population correction
- [Statistical Power Calculator](https://elysiatools.com/en/tools/statistical-power-calculator): Estimate statistical power for one-sample mean or proportion tests using sample size, alpha, and expected effect
- [Statistics Calculator](https://elysiatools.com/en/tools/statistics-calculator): Calculate statistical measures for numerical datasets including mean, median, mode, standard deviation, and more
- [Normal Distribution Plotter](https://elysiatools.com/en/tools/normal-distribution-plotter): Plot a normal-distribution bell curve as SVG with z-score markers, interval or tail-probability shading, and 68/95/99.7 standard-deviation bands.

## Samples

- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion
- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Web Image Processing Rust Samples](https://elysiatools.com/en/samples/web-image-processing-rust): Web Rust image processing examples including image read/save, scaling, and format conversion

## Related content

- [A/B Experiment Design, Sample Size, and Statistical Power](https://elysiatools.com/en/hubs/ab-testing-experiment-design-and-statistical-power): Plan an A/B experiment, size its evidence, select the right test, and review effect size and uncertainty before treating a result as actionable.
