Statistics: Survey Sample Size For A Margin Of Error

Excel Formulas › Statistics

All versions

Before sending a customer survey, you need to know how many replies make the results trustworthy. The standard formula uses the z score for your confidence level, the expected proportion and the margin of error you will tolerate. This recipe adds the finite population correction, which lowers the requirement when your customer list is small.


Quick formula: z squared times p times one minus p, over the margin squared, rounded up:
=ROUNDUP(B2^2*C2*(1-C2)/D2^2,0)

95% confidence, an unknown proportion of 50% and a 5% margin need 385 responses; with 5,000 customers that falls to 358.

Functions used (tap for the full reference guide):

The example

Three surveys. Tighter margins and higher confidence require far more responses.

ABCDEFG
1CaseZ scoreProportionMarginPopulationSampleAdjusted
2Customer survey1.96050.0%5.0%5,000385358
3Staff survey1.64550.0%3.0%2,000752547
4Member poll2.57630.0%4.0%20,000871835

The formula

Infinite-population sample size first, then the correction for a finite list:

=ROUNDUP(B2^2*C2*(1-C2)/D2^2,0) // sample size; adjusted = ROUNDUP(n/(1+(n-1)/N),0)

How it works

Here is the logic, one piece at a time:

  1. B2^2 is the squared z score: 1.96 for 95% confidence, 1.645 for 90%, 2.576 for 99%.
  2. C2*(1-C2) is the variance of a yes/no answer; 0.5 is the most conservative choice.
  3. Dividing by D2^2 shrinks the sample as the margin widens.
  4. The second formula scales the result down for a finite list of E2 customers.

The sample size is the number of completed responses, not the number of invitations.

Try it: interactive demo

Interactive

Enter the z score, proportion, margin and population.

Variations

Estimate invitations from a response rate

Divide by the expected response rate to get invitations to send.

=ROUNDUP(F2/ResponseRate,0)

Use NORM.S.INV for z

Compute z from a confidence level instead of typing it.

=ROUNDUP(NORM.S.INV(1-(1-Confidence)/2)^2*C2*(1-C2)/D2^2,0)

Pitfalls & errors

The formula assumes random sampling; a self-selected survey can be biased regardless of size.

Entering the margin as 5 instead of 0.05 gives a sample size near zero.

Use p=0.5 when you have no prior estimate; it gives the largest, safest sample.

Practice workbook

📊
Download the free Statistics: Survey Sample Size For A Margin Of Error practice workbook
Edit the yellow z, proportion, margin and population cells; the sample sizes recalculate.

Frequently asked questions

What z should I use?
1.645 for 90%, 1.96 for 95% and 2.576 for 99% confidence.
When does the correction matter?
When your sample would be more than about 5% of the population.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Confidence Interval for a Mean · Standard Error of the Mean · Trimmed Mean (Average Without Extremes)

Function references: ROUNDUP