How to use this calculator
This estimates the sample size for a proportion using a normal-approximation margin-of-error formula.
- Enter Planning proportion p (0–1), Margin of error E (0–1), Confidence level (%). Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
How Sample size for a proportion calculator works
This estimates the sample size for a proportion using a normal-approximation margin-of-error formula.
Inputs and units
- Planning proportion p (0–1): Planning proportion p is a prior estimate strictly between 0 and 1.
- Margin of error E (0–1): Margin of error E is a proportion-scale half-width, such as 0.05 for five percentage points.
- Confidence level (%): Confidence level is a percentage from 80% to below 100%.
Formula and method
n=ceil(z²p(1−p)/E²), using the two-sided normal critical value z.
Worked example
For p=0.50, E=0.05, and 95% confidence, n=ceil(1.96²·0.5·0.5/0.05²)=ceil(384.16)=385.
Interpreting the result
The output is a minimum whole sample under this simple design. p=0 or p=1 is excluded because it makes the estimated binomial variance zero and degenerates this normal-approximation plan.
Assumptions and limits
The estimate assumes independent observations and no finite-population correction, clustering, nonresponse, or design effect. If no prior p is available, 0.5 gives the largest p(1−p) and a conservative variance choice.
Sources and method
- For known planning SD, n=(zσ/E)²; for a proportion, n=z²p(1−p)/E², with rounding up. OpenStax: sample-size formulas
Frequently asked questions
Why must p be between zero and one?
The planning variance p(1−p) is meaningful for an interior proportion; endpoint values make this normal-approximation design degenerate.
Does the output account for nonresponse?
No. Inflate the recruitment target separately when some selected participants may not respond.
How do I use the Sample size for a proportion calculator?
Enter Planning proportion p (0–1), Margin of error E (0–1), Confidence level (%). Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Sample size for a proportion?
For p=0.50, E=0.05, and 95% confidence, n=ceil(1.96²·0.5·0.5/0.05²)=ceil(384.16)=385.
What does the Sample size for a proportion calculator calculate?
This estimates the sample size for a proportion using a normal-approximation margin-of-error formula.