Home / Tools / Proportion Test Calculator

Proportion Test Calculator

A proportion test asks whether an observed rate differs from a claimed value, or whether two groups differ. Enter the successes and sample sizes, pick the hypotheses, and this tool reports the z statistic, the critical value, and the p-value, then states the decision. It shows both the textbook z-test and R's continuity-corrected default, so a hand calculation and prop.test() finally agree.

Try:
Your sample
Null hypothesis
Test settings

One-proportion z-test

z statistic
-
p-value
-
Critical z
-
Sample p̂
-

How this is computed
1
2
3
4Compare the statistic to the critical value, or equivalently the p-value to α. If the z falls in the shaded rejection region (p below α), reject the null; otherwise there is not enough evidence to.
The same test in R

  

No data leaves your browser Verified against R's prop.test(), both corrected and uncorrected Free, no sign-up

One test, two conventions

The proportion z-test comes in two flavours that disagree on small samples. This is the single most common reason a hand-computed z does not match prop.test().

ConventionWhat it doesIn R
Textbook z-testNo continuity correction. The z you compute by hand in class.prop.test(..., correct = FALSE)
Yates-correctedShrinks the gap by half a count, making the test more conservative. R's default.prop.test(...) (default correct = TRUE)

The two agree closely for large samples and diverge when counts are small. This calculator headlines the textbook value and shows the corrected one in the note under the result, so you always see both.

The formulas behind it

Each test divides an observed difference by its standard error under the null hypothesis to get a z score on the standard normal curve.

Testz statisticStandard error
One proportion(p̂ − p₀) / SE√(p₀(1 − p₀) / n)
Two proportions(p̂₁ − p̂₂) / SE√(p̄(1 − p̄)(1/n₁ + 1/n₂))

The one-sample standard error uses the hypothesized p₀; the two-sample version pools both groups into a common rate p̄ = (x₁ + x₂)/(n₁ + n₂). The p-value is the area of the standard normal beyond the z, in one tail for a one-sided test or both tails for a two-sided test. The normal approximation is reliable when the expected counts are at least 5; below that, an exact binomial test is safer.

Frequently asked questions

What is a proportion z-test?

It checks whether a sample proportion differs from a claimed value (one-sample) or whether two groups differ (two-sample). It divides the observed difference by its standard error under the null to get a z score, then compares that z to a critical value or converts it to a p-value. It is the large-sample approximation behind R's prop.test().

One-sample or two-sample: which do I use?

Use the one-sample test for a single group against a fixed value, such as "is the conversion rate different from 50%". Use the two-sample test to compare two independent groups, such as "does variant A convert differently from variant B". Switch between them with the "I want to" selector above the inputs.

Why does my z differ from R's prop.test()?

R applies a Yates continuity correction by default (correct = TRUE), which shrinks the numerator and makes the test more conservative. The textbook z-test uses no correction (correct = FALSE). This tool headlines the uncorrected classroom z and shows the corrected value in the note beneath, so both are visible. Add correct = FALSE to reproduce the classroom numbers.

Should the test be one-sided or two-sided?

Two-sided is the safe default: it asks only whether the proportions differ, in either direction. Use a one-sided test (greater or less) only when the direction is fixed in advance for a real reason, because it spends the whole significance budget in one tail and will call smaller effects significant there.

Does this calculator match R?

Yes. The z statistic, p-value, and confidence interval reproduce prop.test() for both correct = TRUE and correct = FALSE, matching to at least nine decimals across one- and two-sample tests, one- and two-sided alternatives, and edge cases such as zero successes.

Go deeper