What Is the Sample Size Formula?
The sample size formula is a mathematical equation that calculates the minimum number of survey respondents needed to produce results with a specified level of precision and confidence. The standard formula for estimating a proportion (like the percentage of customers who'd recommend your product) is: n = (Z2 x p x (1-p)) / E2, where Z is the z-score corresponding to your desired confidence level, p is the expected proportion, and E is the acceptable margin of error. For finite populations, a correction factor adjusts the result downward: n_adj = n / (1 + (n-1)/N), where N is the population size. Getting sample size right before fielding a survey prevents two expensive mistakes: collecting too few responses to detect real effects, or collecting far more than necessary and wasting budget.
Why the Sample Size Formula Matters
Under-powered surveys produce inconclusive results. A brand tracking study with 50 respondents per wave can't detect a 5-point awareness change with any confidence. Over-powered surveys waste money. Surveying 5,000 people when 400 would give you the precision you need means spending 12x more on sample for negligible improvement in accuracy. The formula converts your analytical requirements (how precise do I need the result to be?) into a concrete fielding target. Survey Sampling International reported that 40% of market research studies are either underpowered for their stated objectives or significantly over-sampled relative to the required precision.
How the Sample Size Formula Works
The Core Formula for Proportions
For surveys measuring a percentage (proportion), the formula is:
n = (Z2 x p x (1-p)) / E2
Each component plays a specific role:
Z (z-score): Determined by your confidence level. For 95% confidence, Z = 1.96. For 99% confidence, Z = 2.576. For 90% confidence, Z = 1.645. The 95% level is the standard choice in market research.
p (expected proportion): Your best estimate of the percentage you're measuring. If you expect about 60% of customers to be satisfied, p = 0.60. If you have no prior estimate, use p = 0.50, which produces the largest (most conservative) sample size because it maximizes p x (1-p).
E (margin of error): The acceptable range of error around your estimate. A margin of plus or minus 5% (E = 0.05) means if your survey shows 60% satisfaction, the true value is between 55% and 65%. A margin of plus or minus 3% is more precise but requires a larger sample.
Walking Through a Calculation
Scenario: You're running a customer satisfaction survey and want to estimate the percentage of satisfied customers with 95% confidence and plus or minus 4% margin of error. You have no prior data, so you'll use p = 0.50.
n = (1.962 x 0.50 x 0.50) / 0.042 n = (3.8416 x 0.25) / 0.0016 n = 0.9604 / 0.0016 n = 600.25
Round up: you need 601 respondents.
If you change the margin of error to plus or minus 3%, the calculation becomes: n = (3.8416 x 0.25) / 0.0009 = 1,068
That extra percentage point of precision costs 467 additional respondents.
The Finite Population Correction
When your population is small and known (surveying employees of a 500-person company, for example), the standard formula overestimates. Apply the finite population correction:
n_adj = n / (1 + (n-1)/N)
If the standard formula gives n = 384 and your population N = 500: n_adj = 384 / (1 + 383/500) = 384 / 1.766 = 217 respondents
For large populations (above 20,000), the correction is negligible, which is why most consumer surveys don't bother with it.
Sample Size for Comparing Groups
If your analysis involves comparing two groups (men vs. women, treatment vs. control), you need the sample size per group, not total. The formula for detecting a difference in means with an independent t-test is:
n per group = 2 x ((Z_alpha + Z_beta)2 x SD2) / D2
Where Z_alpha is the z-score for your significance level (1.96 for alpha = 0.05), Z_beta is the z-score for your desired power (0.84 for 80% power), SD is the expected standard deviation, and D is the minimum meaningful difference you want to detect.
For a satisfaction survey comparing two segments: if you expect SD = 1.2 on a 5-point scale and want to detect a 0.3-point difference with 80% power:
n per group = 2 x ((1.96 + 0.84)2 x 1.44) / 0.09 n per group = 2 x (7.84 x 1.44) / 0.09 n per group = 2 x 125.4 = 251 per group (502 total)
Common Scenarios Quick Reference
| Margin of Error | 95% Confidence | 99% Confidence |
|---|---|---|
| +/- 3% | 1,068 | 1,849 |
| +/- 4% | 601 | 1,040 |
| +/- 5% | 385 | 666 |
| +/- 7% | 196 | 340 |
| +/- 10% | 97 | 167 |
Assumes p = 0.50 (maximum variability) and large population.
Adjusting for Expected Response Rate
The formula gives you the number of completed responses you need. If your expected response rate is 25%, you need to invite 4x as many people. For the 601-respondent target with 25% response: invite 2,404 people. Always calculate the invitation volume after determining the required completed sample.
When to Use the Sample Size Formula
- Pre-fielding planning for any quantitative survey to ensure you'll collect enough responses for your analytical precision requirements
- Budget estimation translating precision requirements into respondent counts and fielding costs before approving the research
- Segment-level analysis calculating how many total respondents you need when you require adequate sample within each subgroup
- Tracking study design setting per-wave sample sizes that allow detection of meaningful wave-over-wave changes
- Proposal writing justifying your recommended sample size to clients or stakeholders with transparent methodology
Common Mistakes
- Using the total-sample formula when your analysis compares subgroups gives you enough precision for the overall estimate but not enough for each segment comparison; calculate sample size per group
- Forgetting to account for response rates and inviting exactly the number of completed responses you need, which leaves you short when only a fraction respond
- Setting the margin of error without considering the analytical use case since a plus or minus 5% margin is fine for directional estimates but too wide for detecting small differences between closely competing options
How Quali-Fi Supports Sample Size Planning
Quali-Fi's survey platform integrates with online panel providers to help you field studies to the right sample size. The platform's real-time response monitoring shows your progress toward the target count, with automatic alerts when you're approaching the threshold, so you can close fielding at the optimal point without overshooting your budget.
Frequently Asked Questions
Does population size matter for sample size?
Only for small populations (under 20,000). For a population of 1 million or 100 million, the required sample size is virtually identical. The finite population correction only becomes meaningful when you're sampling a substantial fraction of the population, like surveying employees at a mid-size company.
Why is 384 such a common sample size?
It's the result of the standard formula with 95% confidence, 5% margin of error, and p = 0.50: n = (1.962 x 0.5 x 0.5) / 0.052 = 384.16. These default parameters became the industry convention, so 384 (rounded to 400 in practice) appears in thousands of research designs.
How do I calculate sample size for a mean instead of a proportion?
Replace the proportion formula with: n = (Z2 x SD2) / E2, where SD is the expected standard deviation of the continuous variable and E is the acceptable margin of error in the same units. If you're measuring satisfaction on a 10-point scale with an expected SD of 2.0 and want plus or minus 0.3 points: n = (1.962 x 4.0) / 0.09 = 171.
Related Topics
- Confidence Interval
- Margin of Error
- Sampling Methods
- T-Test Applied to Survey Data
- ANOVA Applied to Survey Data
- Data Collection Methods
Plan your sample size and field with confidence -- try Quali-Fi free for 14 days.