Statistics
Z-Test Calculator
Use the z test when you are testing a proportion, or a mean with a known population standard deviation.
Enter the sample results and the null value; mathcheck returns z, the p-value for your alternative, the critical value, a confidence interval, and a decision sentence you can paste into a write-up.
Try an example
Result
z statistic
—
- p-value
- —
- Decision
- —
- Critical z
- —
- Confidence interval
- —
- Standard error
- —
Student quick launch
Grade planning, algebra checks, and formulas students reach for most.
Study path
Use this calculator with
Follow these when you want the formula behind the answer, a short lesson, or nearby tools in the same topic.
What the z-test calculator solves
Use the z test when you are testing a proportion, or a mean with a known Every member of the group you actually care about, not just the ones measured. A number saying how far, on average, the data values sit from the mean.. Enter the A smaller group taken from a population, used to estimate facts about the whole group. results and the null value; mathcheck returns z, the The chance of seeing results this extreme if nothing real were going on. for your alternative, the critical value, a A range of values that probably contains the true answer, given your data., and a decision sentence you can paste into a write-up.
Formula
How to use it
- Pick the proportion test for counts of successes, or the mean test when σ is known.
- Enter the sample results and the value H0 claims (p₀ or μ₀).
- Choose the alternative (two-tailed unless the direction was fixed in advance) and α.
- Read z, the p-value, the critical value, the confidence interval, and the decision.
How to read the answer
z counts how many standard errors the sample statistic sits from the null value. |z| above the critical value (1.96 for a two-tailed 5% test) means p ≤ 0.05 and H0 is rejected. For proportions the Wilson interval is more accurate than the Wald interval when p̂ is near 0 or 1 or n is small; both are shown.
Common mistakes and edge cases
- Using a z test for a mean when σ was estimated from the sample; that is a t test.
- Computing the proportion's standard error with p̂ instead of p₀ in the test statistic (p₀ is correct under H0; p̂ is used for the confidence interval).
- Entering the proportion as a decimal in the percent field.
- Forgetting the success/failure condition n·p₀ ≥ 10 and n·(1 - p₀) ≥ 10.
Worked examples
Proportion: 60 of 100 vs 50%
z statistic
2
Proportion, left-tailed
z statistic
-2.4224
Mean: IQ sample of 36 with σ = 15
z statistic
2
Mean, right-tailed at α = 0.01
z statistic
2.5
No difference
z statistic
0
Undefined: p₀ = 100%
z statistic
Error
Frequently asked questions
When do I use a z test instead of a t test?+
Use z for proportions, or for a mean when the population standard deviation σ is genuinely known (or n is very large). If σ is estimated from the sample, use the t test.
How do I calculate the z statistic for a proportion?+
z = (p̂ - p₀) / √(p₀(1 - p₀)/n). With 60 successes in 100 and p₀ = 0.5: z = (0.6 - 0.5)/0.05 = 2.0, giving a two-tailed p of 0.0455.
What is the critical z value?+
The cutoff beyond which H0 is rejected: ±1.96 for a two-tailed test at α = 0.05, 1.645 for a one-tailed test at 0.05, and ±2.576 at α = 0.01.
What is the difference between the Wald and Wilson intervals?+
Wald uses p̂ ± z·√(p̂(1 - p̂)/n) and can be too narrow or run past 0 or 1. Wilson solves the z equation exactly and stays inside [0, 1]; it is the better choice for small n or extreme proportions.
Is a two-tailed p-value twice the one-tailed p-value?+
Yes, for a symmetric distribution like the normal. Pick the alternative before looking at the data so the choice is not driven by the result.
About this calculator
- Written by
- mathcheck editorial team
- Last reviewed
- September 4, 2026
Method
- Uses the values entered by the user and stable formulas documented on the page.
Related calculators
T-Test Calculator
Run a one-sample, two-sample (Welch or pooled), or paired t test from raw data, summary statistics, or a t value you already have. Get t, df, one- or two-tailed p-value, confidence interval, Cohen's d, a hypothesized difference Δ, and a decision at your α.
P-Value Calculator
Convert a z or t test statistic into a p-value with two-tailed, left, or right tails — includes reject/fail-to-reject decisions at alpha = 0.05 and 0.01 plus the full CDF work.
Normal Distribution Calculator
Find P(X < x), P(X > x), P(a < X < b), z-scores, and percentiles for any normal distribution, or work backward from a probability to x. Includes a shaded bell curve and full steps.
Z-score Calculator
Calculate z-score, percentile estimate, and distance from mean using value, mean, and standard deviation.
Confidence Interval Calculator
Calculate confidence intervals for a mean or proportion with margin of error and z critical value.
Margin of Error Calculator
Calculate the margin of error for a survey proportion or a sample mean at any confidence level, with z or t critical values and a finite population correction. Reverse it to find the sample size for a target margin.
Last updated: September 4, 2026