Use this calculator to estimate survey sample size or margin of error for a population proportion, with optional finite population and response-rate planning.
Advanced options
How to use our Sample Size Calculator
- Choose What do you want to calculate: use Sample size to plan a survey, or Margin of error if you already know your Sample size (responses).
- Enter Population size (people) if you know the full group size. Leave it blank to use the large-population result.
- Select a Confidence level (%). Higher confidence gives a larger required sample or a wider margin of error.
- Enter Expected proportion (%). If you do not know it, use 50 because it gives the safest, largest planning sample.
- If you are in Sample size mode, enter Margin of error (%), which is the plus-or-minus precision you want.
- If you are in Margin of error mode, enter Sample size (responses), which is the number of completed responses you expect to analyze.
- Open Advanced options if needed and enter Design effect (DEFF) for complex samples and Expected response rate (%) to estimate how many invitations to send.
- Click Calculate and read the main result first: either Required completed sample size or Margin of error.
- Sanity-check the result: if Sampling fraction is tiny, finite population correction should have little effect; if it is larger, the corrected result should usually be smaller than the uncorrected one.
Definitions
Population size (people): The total number of people in the group you want to study.
Confidence level (%): How confident you want to be that the method captures the true population proportion.
Margin of error (%): The approximate plus-or-minus range around your survey estimate.
Expected proportion (%): Your best guess for the share expected to answer yes or have the trait being measured.
Sample size (responses): The number of completed responses used in the calculation, not the number invited.
Design effect (DEFF): A multiplier that increases or decreases the completed sample needed when the sample design is not a simple random sample.
Finite population correction factor: An adjustment that reduces uncertainty when your sample is a noticeable share of a finite population [1].
Sampling fraction: The completed sample divided by the full population, shown as a percent.
Common mistakes and quick fixes
Mistake: Entering 0 or 100 in Expected proportion (%) .
Fix: Use a value between 0 and 100 only. If you are unsure, enter 50 for Expected proportion (%) .
Mistake: Treating Margin of error (%) like a decimal and entering 0.05 for a 5% target.
Fix: Enter percent values as whole percent numbers, so use 5 in Margin of error (%) for a 5% margin.
Mistake: Putting invited people into Sample size (responses) instead of completed surveys.
Fix: Enter only completed responses in Sample size (responses) . Use Expected response rate (%) to estimate Invitations needed after response-rate adjustment .
Mistake: Entering a Population size (people) smaller than Sample size (responses) in Margin of error mode.
Fix: Make sure Population size (people) is at least as large as Sample size (responses) , or leave population blank if you want the large-population approximation.
Mistake: Using Design effect (DEFF) as 0 or a negative number.
Fix: Enter a value greater than 0. Use 1 for simple random sampling if you do not need a complex-sample adjustment.
Mistake: Reading a low Margin of error as proof the survey is unbiased.
Fix: Use Assumption note as a reminder that bigger samples improve precision, but they do not fix bad sampling, nonresponse bias, or poor question wording.
Limitations & Key Assumptions / Boundary Conditions
- The formulas are for estimating a population proportion, not a mean, a difference between groups, or a power analysis study.
- The method assumes a probability-based sample. A larger sample does not fix bias from convenience sampling, undercoverage, nonresponse bias, or weak questionnaire design.
- Expected proportion (%) must be between 0 and 100, exclusive. Using 50 is conservative and usually gives the largest required sample.
- If Population size (people) is blank, the calculator uses the infinite-population result only.
- Finite population correction matters most when the planned sample is a noticeable share of the population; otherwise the adjusted result may change very little [1].
- Design effect (DEFF) adjusts the completed-response target for complex designs, but it does not model every survey design detail.
- Expected response rate (%) only estimates invitations needed. Real completion counts can differ from the plan.
- In Margin of error mode, if Sample size (responses) equals the full finite population, the formula can return 0% under an ideal no-measurement-error model. That should not be read as perfect real-world accuracy.
Methodology
Core calculation
For planning a survey proportion, the calculator first converts percents to decimals. For example, 50% becomes 0.50 and 5% becomes 0.05.
n0 = (z^2 * p * (1 - p)) / e^2
Here, n0 is the required sample size for a very large population, z comes from Confidence level (%), p is Expected proportion (%) as a decimal, and e is Margin of error (%) as a decimal.
If Population size (people) is provided, the calculator applies finite population correction.
n = n0 / (1 + (n0 - 1)/N)
Here, N is population size and n is the adjusted completed sample size. This usually lowers the requirement when the sample is a noticeable share of the population [1].
Planning adjustments
If you enter Design effect (DEFF), the calculator adjusts the completed-response target.
n_deff = n * DEFF
The displayed Required completed sample size is rounded up to the next whole response.
If you also enter Expected response rate (%), the calculator estimates how many people to contact.
invites = n_deff / rr
Here, rr is response rate as a decimal. Invitations needed after response-rate adjustment is also rounded up.
Margin of error mode
When you already know Sample size (responses), the calculator estimates precision instead of required sample size.
e = z * sqrt(p * (1 - p) / n)
If a finite population is entered, it uses the corrected version below.
e_fpc = z * sqrt((p * (1 - p) / n) * ((N - n) / (N - 1)))
The finite population correction factor is shown separately as:
fpc = sqrt((N - n) / (N - 1))
Sampling fraction is computed as completed sample divided by population, expressed as a percent.
Worked mini-example
Suppose Population size (people) is 10,000, Confidence level (%) is 95, Margin of error (%) is 5, and Expected proportion (%) is 50. The z value is 1.96. First, the infinite-population result is about 384.16, which is shown as 385 when rounded up. After finite population correction, the adjusted result is about 369.98, which rounds up to 370. If Expected response rate (%) is 40, then invitations needed are 370 / 0.40 = 925.
Assumptions behind the math
The formulas are standard approximations for a population proportion under probability sampling. They are most appropriate when responses are treated like a simple random sample, unless you adjust with Design effect (DEFF). The calculator measures sampling precision, not all real-world survey error, so nonresponse bias, coverage problems, and wording effects can still make results differ from the formula output.