Free Online Sample Size Calculator
Choose your study design, enter assumptions, and calculate the minimum sample size needed for reliable results.
Higher confidence requires a larger sample size.
Inputs for Proportion Studies
Why Sample Size Calculation Matters
Sample size is one of the most important design choices in surveys, experiments, and clinical or social research. If your sample is too small, your results can look random and unstable. If it is too large, you may waste time and money. A good sample size strikes a balance between precision and resources.
Online sample size calculators make this process faster, but the quality of your answer depends on the assumptions you enter. That is why this page includes both a calculator and practical guidance.
Key Inputs You Need to Understand
1) Confidence Level
Confidence level represents how certain you want to be that your interval captures the true population value. Common choices are 90%, 95%, and 99%. A 95% confidence level is the standard in many fields.
2) Margin of Error
Margin of error is your tolerated uncertainty. In a survey context, a ±5% margin of error is common; for high-stakes decisions, you might target ±2% or ±3%. Smaller margins require larger samples.
3) Variability (p or standard deviation)
- For proportions, variability is based on p(1-p). If you do not know the expected proportion, use 50%; this gives the most conservative (largest) sample size.
- For means, variability is the standard deviation. Use pilot data, previous studies, or historical records.
4) Power and Effect Size (for comparisons)
When comparing two groups, power is the probability of detecting a real effect. 80% power is the classic default, while 90% provides stronger sensitivity. The smaller the minimum detectable difference, the larger the required sample size per group.
Formulas Used in This Calculator
Proportion: n0 = Z² × p(1 − p) / e²
Mean: n0 = (Z × σ / e)²
Two independent means (equal group sizes): n per group = 2 × ((Zα/2 + Zβ) × σ / Δ)²
If a finite population size N is provided for estimation problems, we apply finite population correction:
n = n0 / (1 + (n0 − 1)/N)
How to Use This Online Tool
- Choose the study type that matches your objective.
- Set your confidence level.
- Enter realistic assumptions for margin of error, variability, and (if relevant) power.
- Click Calculate Sample Size.
- Round up and add extra participants for nonresponse or dropout.
Practical Examples
Survey Example (Proportion)
You want to estimate the percentage of users satisfied with a service. With 95% confidence, expected proportion 50%, and margin of error 5%, the sample size is about 385. If only 5,000 users exist in the full population, the corrected sample is lower after finite population correction.
Average Measurement Example (Mean)
You need to estimate average delivery time with standard deviation 15 minutes and margin of error 3 minutes at 95% confidence. The calculator returns roughly 97 observations (before any correction).
A/B Test Example (Two Means)
Suppose you want to detect a difference of 5 units, with common standard deviation 12, confidence 95%, and power 80%. The tool returns required sample size per group and total sample size for two groups.
Tips for Better Study Planning
- Use pilot data whenever possible instead of guesswork.
- Always account for attrition or nonresponse (often +10% to +25%).
- Document assumptions in your protocol or analysis plan.
- For complex designs (cluster sampling, unequal groups, repeated measures), use specialized software or consult a statistician.
Common Mistakes to Avoid
- Choosing an unrealistically small margin of error without budget to support it.
- Using too optimistic an effect size in power calculations.
- Forgetting finite population correction when population is small and known.
- Ignoring expected missing data.
Final Note
This calculator is ideal for quick planning and educational use in surveys, academic projects, and early-stage experiment design. For regulatory, medical, or high-risk studies, verify results with a professional statistical review.