Z-Test for Proportions Calculator

Enter successes, sample size and hypothesized proportion to get the z-statistic.

How it is calculated

The tool computes the one-sample z statistic for a proportion in three steps. The observed proportion is p̂ = successes ÷ n. The standard error under the null hypothesis is SE = √(p₀ × (1 − p₀) ÷ n), using the hypothesized proportion p₀, not p̂. Then z = (p̂ − p₀) ÷ SE. Successes, sample size n and p₀ are entered as plain numbers, and p₀ is a proportion strictly between 0 and 1 (0.12, not 12). Successes must be between 0 and n, and n above zero; otherwise no result is shown. The tool returns z, p̂ and SE to four decimals but no p-value, so you compare z with a critical value yourself. The normal approximation needs n × p₀ and n × (1 − p₀) both reasonably large.

Worked example

Out of 400 visitors, 58 convert, and the historical rate is 0.12. p̂ = 58 ÷ 400 = 0.1450. SE = √(0.12 × 0.88 ÷ 400) = 0.0162. z = (0.1450 − 0.12) ÷ 0.0162 = 1.5386 (the tool computes with unrounded values). Since |z| is below 1.96, the usual cutoff for a two-sided test at the 5% level, the difference between 14.5% and 12% is not statistically significant with this sample.

Try this example →

Common mistakes

  • Entering p₀ as a percentage (12) instead of a proportion (0.12). The tool rejects it with no result, so check that the proportion is between 0 and 1.
  • Entering the observed percentage as successes. The first field is a count of successes (58), not 14.5.
  • Reading z as a p-value. z of 1.5386 is not 0.15; you need the normal distribution table or a p-value tool to convert it.
  • Using this one-sample test to compare two groups, such as variant A versus B. That requires a two-proportion test.
  • Applying it with a tiny sample or an extreme p₀ (for example n = 20, p₀ = 0.02), where the normal approximation breaks down.

About this calculator

The one-sample z-test for a proportion checks whether an observed proportion p̂ (successes divided by sample size n) differs significantly from a hypothesized value p₀. The test statistic is z = (p̂ − p₀) / √(p₀(1 − p₀)/n), which measures how many standard errors the observed proportion sits from the hypothesized one, assuming the null hypothesis is true; it follows a standard normal distribution when np₀ and n(1 − p₀) are both reasonably large (a common rule of thumb is at least 5 or 10).

This test is a workhorse in A/B testing (does a new checkout flow convert at a different rate than the historical baseline?), quality control (is the defect rate still at the target 2%?), and survey or clinical research (does the observed response rate match an assumed population rate?).

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    The tool stops at z, so decide your threshold first. For a two-sided test at the 5 percent level the critical value is 1.96, and for a one-sided test it is 1.645. The default 60 successes in 100 against 0.5 gives z = 2.0000, just past 1.96, a borderline case that a few observations could flip. Which null proportion are you testing against, and where does it come from?

Popular calculators

All Calculators