Z-Test for a Proportion Calculator
Run a one-sample z-test for a proportion — compare your observed success rate against a hypothesized value and get the z statistic and p-value.
How it works
z = (p̂ − p₀) ÷ √[p₀(1 − p₀) ÷ n] · p̂ = x ÷ n
A one-proportion z-test checks whether an observed success rate differs from a hypothesized proportion p₀. It standardises the gap between your sample proportion p̂ and p₀ using the standard error computed under the null hypothesis, then reads a p-value from the normal curve. The normal approximation is reliable when both n·p₀ and n·(1−p₀) are at least about 10.
Worked example
Suppose 62 of 100 voters favour a measure and you test H₀: p = 0.5. Then p̂ = 0.62 and SE = √(0.5·0.5 ÷ 100) = 0.05, so z = (0.62 − 0.5) ÷ 0.05 = 2.4. The two-sided p-value is about 0.0164 — significant at the 5% level.
Frequently asked questions
When is the z-test for a proportion valid?
It relies on the normal approximation to the binomial, which holds when the sample is reasonably large — a common check is n·p₀ ≥ 10 and n·(1−p₀) ≥ 10. For small samples an exact binomial test is more accurate.
Why is the standard error built from p₀ and not p̂?
The test evaluates evidence against the null hypothesis, so it uses the variability you would expect if p₀ were true. Confidence intervals, by contrast, use p̂ because they describe the sample you actually observed.
What is the difference between one-tailed and two-tailed here?
A two-tailed test asks only whether the proportion differs from p₀ in either direction. One-tailed tests ask specifically whether it is greater or less, concentrating the whole rejection region on one side and giving a smaller p-value when the effect is in that direction.
Related calculators
For education — check the assumptions (sample size, distribution shape) before using statistics in real decisions.