Online Sample Size Calculator
Use this free calculator to estimate how many responses you need for a survey or study.
Why calculate sample size before collecting data?
When people search for calculate sample size online, they are usually trying to answer one practical question: How many participants do I need so my results are trustworthy? A sample that is too small can produce noisy, unstable estimates. A sample that is too large can waste time, money, and effort.
Good sample size planning helps you strike the balance between precision and cost. It also makes your research easier to defend in reports, theses, grant proposals, product research documents, and academic papers.
What this calculator does
This page supports two common planning scenarios:
- Proportion / Percentage: Use this when you care about a rate, such as conversion rate, approval rate, prevalence, or percentage satisfied.
- Mean / Average: Use this when you care about an average value, such as average test score, average wait time, or average spend.
It also includes optional adjustments for:
- Finite population correction when your population is limited (for example, a class of 600 students).
- Expected response rate to estimate how many invitations you need to send.
The core formulas behind the calculator
1) Sample size for a proportion
n₀ = (Z² × p × (1 − p)) / e²
Where:
- Z is the z-score from your confidence level (95% → 1.96).
- p is expected proportion (as a decimal, so 50% → 0.50).
- e is margin of error (decimal, so 5% → 0.05).
2) Sample size for a mean
n₀ = (Z × σ / e)²
Where:
- σ is estimated standard deviation.
- e is the allowable error in the same units as your mean.
3) Finite population correction (optional)
n = n₀ / (1 + (n₀ − 1) / N)
Use this when total population N is not very large. It can reduce required sample size.
How to choose inputs correctly
Confidence level
Most surveys use 95%. If you need stricter certainty, choose 99% and expect a larger required sample.
Margin of error
Smaller error means larger sample. For quick market research, ±5% is common; for high-stakes decisions, teams often target ±3% or tighter.
Expected proportion (for percentages)
If no prior estimate exists, use 50%. This gives the maximum (most conservative) sample size, which is why many planning guides recommend it.
Standard deviation (for averages)
If possible, estimate it from pilot data, historical datasets, or published studies. A poor guess can over- or under-shoot your final sample size.
Practical examples
Example A: Customer satisfaction survey
- Estimate type: Proportion
- Confidence: 95%
- Margin of error: 5%
- Expected proportion: 50%
The calculator returns about 385 completed responses for a large population. If your expected response rate is 35%, you would invite about 1,100 people.
Example B: Mean waiting time study
- Estimate type: Mean
- Confidence: 95%
- Estimated standard deviation: 12 minutes
- Margin of error: 2 minutes
You would need around 139 completed observations before population or response adjustments.
Common mistakes to avoid
- Using a tiny margin of error without realizing the cost implications.
- Ignoring response rate and then ending fieldwork short of completed responses.
- Mixing units for mean estimation (e.g., SD in days but error in hours).
- Forgetting that sample size calculators assume random sampling; biased sampling stays biased even with large n.
Frequently asked questions
Is 30 always enough?
No. "n = 30" is a classroom rule of thumb for some contexts, not a universal standard for real research planning.
Can this calculator be used for A/B tests?
It gives a useful directional estimate for proportion-based outcomes, but formal A/B power analysis often requires baseline conversion, minimum detectable effect, and desired power (typically 80% or 90%).
What if I do not know expected proportion?
Use 50%. That is conservative and avoids underestimating sample size.
Final thoughts
If you need to calculate sample size online quickly and clearly, this tool is a practical starting point. Enter realistic assumptions, document your choices, and treat the result as part of an overall research plan that also includes sampling method, data quality checks, and ethics considerations.