Z-Test Calculator
One- and two-sample z-tests against a known population standard deviation, with APA write-up.
About this tool
Paste one or two samples and enter the known population standard deviation. The z-test returns z, the p-value, the mean difference, a confidence interval and Cohen's d.
How to use
How it works
Use a z-test when the population standard deviation is known or the sample is large enough that it is well estimated. If you only have the sample standard deviation from a small sample, a t-test is the right choice because it allows for the extra uncertainty.
two-sample: z = (x̄₁ − x̄₂) ÷ √(σ₁²/n₁ + σ₂²/n₂) one-sample: z = (x̄ − μ₀) ÷ (σ/√n)
Worked example
Two groups, known σ = 5
- Input
- A: 101,98,105,99,103,97,102,100 B: 95,99,94,97,96,93,98,95
- Output
- z = 1.90, p = .057; mean difference 4.75; 95% CI [−0.15, 9.65]
- Walkthrough
- Means 100.625 and 95.875, difference 4.75. SE = 5 × √(2/8) = 2.5, so z = 4.75 ÷ 2.5 = 1.90.
Limitations
- σ must be supplied; the tool does not estimate it for you.
- Assumes independent, approximately normal data.
Questions
When do I use a z-test instead of a t-test?
What does z = 1.90 mean?
What is the one-sample result for 52,48,55,51,49,53,50,54 with σ = 4 and μ₀ = 50?
Features
- One and two sample
- Confidence interval
- Cohen's d
Guides
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
Chi-square distribution introduction
Khan Academy
Background for χ² tables and GoF/independence tools.
Watch on YouTubeHypothesis testing and p-values
StatQuest with Josh Starmer
Intuition for t/z/χ² decision rules.
Watch on YouTube
- Student's t-distribution
Wikipedia
Distribution reference behind the t-table tool.
- Data Index
Math is Fun
Plain-language stats primers for table lookups.