One Proportion Z-Test Calculator

Test whether a population proportion equals a claimed value. Enter the number of successes, the sample size and the hypothesised proportion p₀; the calculator returns the z statistic, the p-value for a two-, left- or right-tailed test, the critical value and a plain-English conclusion, with every step shown.

Formula z = (p̂ − p₀) ⁄ √(p₀(1 − p₀) ⁄ n)

Try an example
Method

How Does the One Proportion Z-Test Work?

The one proportion z-test measures the gap between the sample proportion p̂ and the claimed value p₀ in units of standard error: z = (p̂ − p₀) ÷ √(p₀(1 − p₀)/n). The p-value is the chance of a gap at least that large if p₀ were true, and a p-value below the significance level α rejects the claim.

Write the hypotheses

The null hypothesis is always H₀: p = p₀. The alternative is p ≠ p₀, p > p₀ or p < p₀, chosen from the question before you see the data.

Check the conditions

A random sample, independent observations, and at least 10 expected successes and 10 expected failures: n·p₀ ≥ 10 and n(1 − p₀) ≥ 10. These make the normal approximation to the binomial trustworthy.

Compute p̂ and the standard error

p̂ = x ÷ n, and under H₀ the spread of p̂ from sample to sample is SE = √(p₀(1 − p₀) ÷ n).

Standardise

z = (p̂ − p₀) ÷ SE. A z of 2.4 means the sample landed 2.4 standard errors from the claim.

Find the p-value and decide

The p-value is the tail area beyond z on the standard normal curve (both tails for a two-tailed test). If it is below α, reject H₀.

z = (p̂ − p₀) / √(p₀q₀ / n)

The test statistic. Here q₀ = 1 − p₀. The standard error uses p₀ because the test asks what would happen if the claim were true.

αTwo-tailed z*One-tailed z*
0.10±1.6451.282
0.05±1.9601.645
0.01±2.5762.326

Test and interval agree

A two-tailed test at α = 0.05 rejects p₀ roughly when p₀ falls outside the 95% confidence interval for the proportion. The match is not exact because the two use slightly different standard errors.

Worked examples

One Proportion Z-Test Examples

These one proportion z-test examples work through the full test. In the first, a coin lands heads 62 times in 100 tosses: p̂ = 0.62, the standard error under p₀ = 0.5 is 0.05, z = 2.40 and the two-tailed p-value is 0.0164, so at α = 0.05 the coin is judged unfair.

Two-tailed

A coin lands heads 62 times in 100 tosses. Is it fair? (α = 0.05)

Hypotheses
H₀: p = 0.5, Hₐ: p ≠ 0.5
Conditions
100 × 0.5 = 50 ≥ 10
p̂
62 ÷ 100 = 0.62
SE
√(0.5 × 0.5 ÷ 100) = 0.05
z
(0.62 − 0.5) ÷ 0.05 = 2.40
p-value
2 × P(Z > 2.40) = 0.0164

0.0164 < 0.05 — reject H₀: evidence the coin is biased

Right-tailed

A supplier claims at most 4% of parts are defective. You find 23 defects in 400. Is the rate higher? (α = 0.05)

Hypotheses
H₀: p = 0.04, Hₐ: p > 0.04
Conditions
400 × 0.04 = 16 ≥ 10
p̂
23 ÷ 400 = 0.0575
SE
√(0.04 × 0.96 ÷ 400) = 0.00980
z
0.0175 ÷ 0.00980 = 1.786
p-value
P(Z > 1.786) = 0.0370

0.0370 < 0.05 — reject H₀: the defect rate is above 4%

Background

What a One Proportion Z-Test Cannot Tell You

A one-proportion z-test answers a narrow question: is the gap between your sample proportion and a claimed value bigger than chance alone would usually produce? It does not tell you how big the true difference is, and it does not tell you whether the difference matters. With a very large sample, a gap of half a percentage point can be "statistically significant" and still be irrelevant in practice. Pair the test with a confidence interval, which shows the range of plausible values for the true proportion.

Why the normal curve works for counts

The number of successes in a sample follows a binomial distribution. When the expected numbers of successes and failures are both at least 10, that binomial shape is close enough to a normal curve that the z-test's p-values are accurate. Below that, the normal approximation can be badly off — especially for proportions near 0 or 1 — and an exact binomial test is the right tool.

Where p₀ comes from

The claimed value should come from outside your sample: a published rate, a historical figure, a specification or a theory such as "a fair coin". Picking p₀ after looking at the data, or testing several values until one rejects, makes the p-value meaningless.

Related tools

To summarise the sample before testing, use the sample proportion calculator. To compare two groups instead of one group against a number, use the two proportion z-test. To plan how many observations a study needs, use the sample size calculator for a proportion. For the background on what a proportion means in statistics, read the guide to proportions in statistics.

Questions

One Proportion Z-Test Calculator FAQ

Conditions, tails, and how to read the p-value.

What is a one-proportion z-test?
It is a hypothesis test that asks whether a population proportion equals a claimed value p₀. You take a random sample of size n, count the successes x, and measure how many standard errors the sample proportion p̂ = x/n sits from p₀. That distance is the z statistic; the p-value says how surprising a distance at least that large would be if p₀ were true.
What is the formula for the one-proportion z statistic?
z = (p̂ − p₀) ÷ √(p₀(1 − p₀) ÷ n). The denominator uses the hypothesised proportion p₀, not p̂, because the test works out what the sampling distribution would look like if the null hypothesis were true. That is the main difference from a confidence interval, which uses p̂.
When can I use a z-test for a proportion?
Three conditions: the sample is random; observations are independent (if sampling without replacement, the sample is under about 10% of the population); and the expected counts are large enough, n·p₀ ≥ 10 and n·(1 − p₀) ≥ 10. The calculator checks the last one for you. With smaller expected counts, use an exact binomial test instead.
Should I use a one-tailed or two-tailed test?
Choose before you look at the data. Use two-tailed (p ≠ p₀) when any difference matters. Use right-tailed (p > p₀) or left-tailed (p < p₀) only when the research question is directional — for example, a supplier claims a defect rate of at most 4% and you only care whether it is higher. A one-tailed p-value is half the two-tailed one when the result lands on the predicted side.
How do I interpret the p-value?
The p-value is the probability of getting a sample proportion at least as far from p₀ as yours, assuming p₀ is the true value. If it is below your significance level α (often 0.05), you reject the null hypothesis. A large p-value does not prove p₀ is right — it only means the sample is consistent with it.
What is the difference between a one-proportion and a two-proportion z-test?
A one-proportion test compares one sample against a fixed number. A two-proportion test compares two independent samples against each other, such as version A against version B of a web page. For the second case use the two proportion z-test calculator.