Z-Test Calculator

Enter your sample mean, population mean, population standard deviation, and sample size to perform a one-sample Z-test. Choose your significance level and hypothesis direction (two-tailed, left-tailed, or right-tailed) to get the Z-score, p-value, and a clear reject or fail to reject decision on your null hypothesis.

The mean calculated from your sample data.

The hypothesized population mean under the null hypothesis.

The known standard deviation of the population.

Number of observations in your sample. Should be ≥ 30 for Z-test validity.

The probability threshold for rejecting the null hypothesis.

Choose based on whether you expect a directional or any difference.

Results

Z-Score (Test Statistic)

--

p-Value

--

Critical Value (±Zα)

--

Standard Error (σ/√n)

--

Decision

--

Z-Score vs Critical Value

Frequently Asked Questions

What is a Z-test?

A Z-test is a statistical hypothesis test used to determine whether a sample mean differs significantly from a known or hypothesized population mean. It relies on the standard normal distribution and requires that the population standard deviation (σ) is known. It is most reliable when the sample size is 30 or greater.

When do I use a Z-test?

Use a Z-test when you know the population standard deviation, your sample size is large (n ≥ 30), and you want to test whether your sample mean is significantly different from the population mean. It is commonly used in quality control, medical research, and social sciences.

When should I use a t-test instead of a Z-test?

Use a t-test when the population standard deviation is unknown and must be estimated from the sample, or when your sample size is small (n < 30). The t-distribution has heavier tails than the normal distribution, accounting for the extra uncertainty in small samples.

What is the difference between a two-tailed and one-tailed Z-test?

A two-tailed Z-test checks whether the sample mean is significantly different from the population mean in either direction (higher or lower). A one-tailed test checks for a difference in only one direction — either the sample mean is significantly greater (right-tailed) or significantly less (left-tailed) than the population mean.

How do I calculate the Z-test statistic?

The Z-test statistic is calculated as: Z = (x̄ − μ₀) / (σ / √n), where x̄ is the sample mean, μ₀ is the hypothesized population mean, σ is the population standard deviation, and n is the sample size. The result tells you how many standard errors the sample mean is from the population mean.

What does the p-value tell me in a Z-test?

The p-value is the probability of observing a result as extreme as your sample mean (or more extreme) if the null hypothesis is true. A p-value less than your chosen significance level (α) leads you to reject the null hypothesis, suggesting the difference is statistically significant.

What are the assumptions of the Z-test?

The Z-test assumes that the population standard deviation is known, the data are drawn from a normally distributed population (or the sample size is large enough by the Central Limit Theorem), the samples are independent, and observations are randomly selected from the population.

What does 'reject the null hypothesis' mean?

Rejecting the null hypothesis means that the observed difference between your sample mean and the population mean is statistically unlikely to have occurred by chance alone at your chosen significance level. It does not prove the alternative hypothesis is true, but it does provide evidence in its favor.

More Statistics Tools