Sample Size Formula: How to Calculate Sample Size (Examples)
How many people do you need to survey for results you can trust? The sample size formula answers that from three inputs: how confident you want to be, how much error you can accept and how varied the answers are likely to be. Here's the sample size formula, worked examples, a quick-reference table, adjustments for small populations and A/B tests, and what counts as enough in qualitative research.
The most common sample size formula, for estimating a percentage in a survey, is n = Z² × p(1 − p) ÷ e². Z is the score for your confidence level, p is the expected proportion and e is the margin of error you can accept. At 95% confidence, with a ±5% margin of error and no prior idea of the answer (p = 0.5), you need 385 responses. The rest of this guide shows where that number comes from and how to adjust it for your situation.
The sample size formula explained
n = Z² × p × (1 − p) ÷ e²
Z = Z-score for your confidence level · p = expected proportion (use 0.5 if unknown) · e = margin of error as a decimal
| Confidence level | Z-score |
|---|---|
| 90% | 1.645 |
| 95% | 1.96 |
| 99% | 2.576 |
Using p = 0.5 is the safe choice: it gives the largest possible sample, so you're covered whatever the true answer turns out to be.
Worked example
You want to know what share of your customers would pay for a premium plan, at 95% confidence with a ±5% margin of error.
- Z = 1.96, p = 0.5, e = 0.05
- n = 1.96² × 0.5 × 0.5 ÷ 0.05² = 3.8416 × 0.25 ÷ 0.0025 = 384.16
- Always round up: 385 completed responses.
If 40% of those 385 say yes, you can be 95% confident that the true share is between about 35% and 45%.
Quick reference: sample size by margin of error
| Margin of error | 90% confidence | 95% confidence | 99% confidence |
|---|---|---|---|
| ±10% | 68 | 97 | 166 |
| ±5% | 271 | 385 | 664 |
| ±3% | 752 | 1,068 | 1,844 |
| ±2% | 1,692 | 2,401 | 4,148 |
Notice the trade-off: halving the margin of error requires about four times as many responses. That's why many national polls survey about 1,000 people (roughly ±3%).
Small populations: the finite population correction
If your whole population is small, say 2,000 employees or customers, you need fewer responses. Adjust with:
n(adjusted) = n ÷ (1 + (n − 1) ÷ N)
Example: n = 384.16, N = 2,000 → 384.16 ÷ (1 + 383.16 ÷ 2,000) ≈ 322.4 → 323 responses
For populations above roughly 20,000, the correction barely matters, which is why 385 works for a city or a whole country alike.
Sample size for an average (mean)
When you're estimating an average, such as average order value or a satisfaction score, use:
n = (Z × σ ÷ E)²
σ = expected standard deviation (from past data or a pilot) · E = margin of error in the same units
Example: σ = 15 points, E = ±3 points, 95% confidence → (1.96 × 15 ÷ 3)² = 96.04 → 97 responses
From responses to invitations
The formula gives completed responses, not people contacted. Divide by your expected response rate: if you need 385 responses and expect 20% to reply, invite about 1,925 people.
Tip: a big sample doesn't fix a biased one. If only your happiest customers answer, 5,000 responses will still mislead you. Random selection and good follow-up matter as much as the number.
Comparing two groups (A/B tests)
To detect a difference between two groups, you also need statistical power, usually 80%. For two conversion rates:
n per group = (Z(α/2) + Z(β))² × [p₁(1 − p₁) + p₂(1 − p₂)] ÷ (p₁ − p₂)²
Example: detect a lift from 10% to 12%, 95% confidence (1.96), 80% power (0.8416) → about 3,839 people per group
Small differences need surprisingly large samples, so decide the smallest lift worth detecting before you start.
What about qualitative research?
Interviews and focus groups aren't about statistical precision but about reaching saturation, the point where new conversations stop revealing new themes. A widely cited study by Guest, Bunce and Johnson (2006) found that most themes emerged within the first 12 interviews in a fairly homogeneous group. In usability testing, Jakob Nielsen's rule of thumb is that about five users per round uncover most problems. Mixed or complex audiences need more.
Planning a qualitative session? See what is a focus group.
Make every interview count
When your sample is a dozen interviews, every word matters. With participants' consent, the Laxis AI note taker records interviews on Zoom, Google Meet, Teams or the phone and gives you a searchable transcript and summary, so you can check when new themes stop appearing. Laxis will never use your data to train AI models without your consent.
Between sessions, Laxis Voice Keyboard lets you speak quick notes and coding ideas into any app, and Polish mode cleans them up.
Two Laxis tools for researchers
Laxis AI Note Taker: searchable transcripts and summaries of research interviews.
Laxis Voice Keyboard: dictate notes in any app on iPhone, Android, Mac and Windows, with translation across 60+ languages on Premium.
The Laxis AI note taker and voice keyboard, together in one app. Free on iPhone, Android, Mac and Windows. Download Laxis free
Frequently asked questions
What is the formula for sample size?
For a proportion, n = Z² × p(1 − p) ÷ e², where Z is the confidence-level score, p the expected proportion and e the margin of error. For an average, n = (Z × σ ÷ E)². For small populations, apply the finite population correction afterwards.
What is a good sample size for a survey?
For most surveys of a large population, 385 completed responses gives a ±5% margin of error at 95% confidence, and about 1,000 gives roughly ±3%. If you plan to compare subgroups, such as regions or customer types, each subgroup needs its own adequate sample.
Why is 385 such a common sample size?
It's the result of the standard formula with the most common settings: 95% confidence, ±5% margin of error and p = 0.5. Because the population size barely matters above about 20,000 people, 385 works for most large audiences.
Does population size affect sample size?
Only when the population is small. For a population of 2,000, you need about 323 responses instead of 385. Once the population is in the tens of thousands or more, the required sample stays almost the same.
How many interviews are enough for qualitative research?
There's no fixed number. Researchers aim for saturation, when new interviews stop adding new themes. For a fairly similar group, that often happens around 12 interviews; diverse audiences or complex topics need more.
Related Product
Laxis Meeting Assistant
Automate your notes today.
- Bot-free notes for Zoom, Google Meet, Teams and in-person meetings
- AI summaries, action items and follow-ups in 60+ languages
- Mac, Windows, iPhone and Android, with a free plan
Start for free, no credit card required.
Learn More ▷