Sample size required to test proportion

Use this calculator to find the minimum sample size required to estimate proportion $p$.

Sample Size to test proportion
Confidence Level ($1-\alpha$)
Power ($1-\beta$)
Proportion under H0 : ($p_0$)
Proportion under H1 : ($p_1$)
Results
Effect Size ($ES$)
Z value: $Z_{1-\alpha/2}$
Z value: $Z_{1-\beta}$
Required Sample Size : ($n$)

Sample size required to estimate proportion

The minimum sample size required to estimate the proportion is $$ \begin{aligned} n &\approx \bigg(\frac{Z_{1-\alpha/2}+Z_{1-\beta}}{ES}\bigg)^2 \end{aligned} $$

where

$$ \begin{aligned} ES &\frac{|p_1-p_0|}{\sqrt{p_0*(1-p_0)}} \end{aligned} $$

  • $p_0$ is the proportion under null hypothesis $H_0$
  • $p_1$ is the proportion under alternative hypothesis $H_1$
  • $Z_{1-\alpha/2}$ is the critical value of $Z$
  • $Z_{1-\beta}$ is the aaaaaaaaa
  • $ES$ is the effect size.