Sample Size Calculator
Find out how many responses or observations you need for statistically valid results. Works for surveys, A/B tests, quality control, and scientific studies.
As an Amazon Associate and CJ Affiliate publisher we earn from qualifying purchases. Prices and availability may vary.
Why Sample Size Matters?
Too small a sample and your results could be noise rather than signal — you would draw wrong conclusions with false confidence. Too large and you waste time and money collecting more data than you need. The minimum sample size calculation ensures your results are statistically reliable at the confidence level and precision you need for your decisions.
What should I know about The 50% Proportion Rule?
When you do not know the expected proportion, use 50% — this gives the most conservative (largest) sample size estimate. If you know from prior research that the proportion is, say, 20%, you can use that figure and reduce the required sample size. However, using 50% is the safe default for surveys where you are measuring unknown quantities.
What should I know about Finite Population Correction?
When your population is small (under 10,000), the required sample size is adjusted downward using the finite population correction factor. For very large or unknown populations, this correction is negligible and can be ignored. For example, surveying a company of 500 employees requires far fewer responses than surveying the general UK public to achieve the same confidence level.
What's the key thing to understand about A/B Testing Sample Sizes?
For A/B tests, sample size depends on the minimum detectable effect (how small a difference you want to detect). Detecting a 1% conversion rate improvement from 5% to 6% requires far more samples than detecting a 5% improvement. Tools like Optimizely or Evan Miller's A/B calculator are more appropriate for conversion rate testing, where the outcome is binary and baseline rates are known.
What's the key thing to understand about Z-Scores for Common Confidence Levels?
The z-score in the sample size formula comes from the standard normal distribution and reflects how confident you want to be that your sample result reflects the true population value. The most common values are: 90% confidence → z = 1.645, 95% confidence → z = 1.96, and 99% confidence → z = 2.576. These numbers mark the point on a standard normal curve beyond which only the remaining tail probability (5%, 2.5%, 0.5% per tail) lies. Because the z-score appears squared in the sample size formula, moving from 95% to 99% confidence increases the required sample size by a factor of about (2.576/1.96)² ≈ 1.73 — roughly 73% more respondents for the same margin of error. This is why 95% confidence is the standard default in most research and polling: it balances a reasonably tight margin of error against a practical sample size, while 99% confidence is reserved for situations (medical trials, safety testing) where being wrong is especially costly.
What do I need to know about What Happens If Your Sample Is Too Small?
An undersized sample doesn't just produce a 'less accurate' result — it can actively mislead. With too few respondents, the margin of error balloons, so a survey might report 52% support when the true figure could plausibly be anywhere from 40% to 64%, making the headline number almost meaningless. In hypothesis testing, an underpowered sample raises the risk of a Type II error: failing to detect a real effect or difference that genuinely exists, simply because the study didn't collect enough data to distinguish it from random noise. This is a common and expensive mistake in A/B testing and clinical research, where a promising treatment or design change gets wrongly dismissed as 'no different' from the control. Small samples are also more vulnerable to being skewed by a handful of unusual respondents or data points, since each individual carries proportionally more weight in a tiny dataset. Calculating the required sample size before collecting data — rather than after — is the only reliable way to guarantee your conclusions will be statistically meaningful.
What's the key thing to understand about Statistical Power and Effect Size?
Statistical power is the probability that a study correctly detects a real effect when one exists — conventionally researchers aim for at least 80% power. Power depends on four interacting factors: sample size, significance level (α), the effect size you're trying to detect, and the data's variability. A smaller effect size requires a larger sample to detect reliably, which is why clinical trials for drugs with subtle benefits need thousands of participants, while trials for dramatically effective treatments can reach conclusions with far fewer. Running a study without first calculating the sample size needed for adequate power risks an "underpowered" study — one too small to detect a real effect, producing a false negative, and wasting the resources spent collecting data that was never going to be conclusive either way.
What should I know about the Square Root Law of Margin of Error?
Margin of error in a survey or experiment is inversely proportional to the square root of the sample size, not to the sample size itself, and this single relationship explains why collecting more data gives diminishing returns on precision. The formula for margin of error, ME = z × √(p(1−p)/n) for a proportion, shows n appearing only inside a square root in the denominator — so to cut the margin of error in half, the sample size must be quadrupled, not merely doubled. Going from a sample of 100 to a sample of 400 (four times as many respondents) roughly halves the margin of error; going from 400 to 1,600 halves it again. This is exactly why national opinion polls, which already use samples in the thousands, cannot meaningfully shrink their margin of error (typically around ±3%) without enormous additional cost: reaching ±1.5% would require roughly four times as many respondents, and reaching ±1% would require roughly nine times as many as the original ±3% survey. Recognising this square-root relationship helps explain why survey designers often accept a moderate margin of error rather than chase ever-smaller values, since the cost of data collection grows much faster than the resulting gain in precision.
Required Sample Size by Margin of Error (95% Confidence, p = 0.5)
Assuming the most conservative proportion estimate (p = 0.5, which maximizes the required sample size) and a 95% confidence level (z = 1.96), here is how required sample size scales as your desired margin of error tightens, using n = z²p(1-p)/E²:
| Margin of Error | Required Sample Size (n) |
|---|---|
| ±5% | 385 |
| ±4% | 601 |
| ±3% | 1,068 |
| ±2% | 2,401 |
| ±1% | 9,604 |
Halving the margin of error roughly quadruples the sample size needed — margin of error shrinks only with the square root of n, so going from ±4% to ±2% requires 4× the respondents, not 2×. This is why pollsters rarely push national surveys below a ±3% margin: the respondent cost grows much faster than the precision gained.
Worked Example: Sizing a Customer Satisfaction Survey with a Finite Population
A company with 50,000 active customers wants to survey a sample and report results with a 4% margin of error at 95% confidence, assuming the most conservative p = 0.5. Step 1 — infinite-population sample size: n₀ = z²p(1-p)/E² = (1.96)² × 0.5 × 0.5 / (0.04)² = 3.8416 × 0.25 / 0.0016 = 0.9604 / 0.0016 = 600.25 → round up to 601. Step 2 — finite population correction, since 50,000 customers is a known, bounded population: n = n₀ / [1 + (n₀ − 1)/N] = 601 / [1 + 600/50,000] = 601 / 1.012 = 593.9 → round up to 594. So the company needs 594 completed responses, 7 fewer than the uncorrected estimate of 601 — a small but real saving that becomes much larger when the population itself is small (for a population of only 1,000, the same inputs would shrink the requirement all the way down to about 375). The correction factor only matters meaningfully when your sample would otherwise represent more than about 5% of the total population.
Sample Size for Estimating a Mean (Not Just a Proportion)
When you need to estimate a population mean (like average spending or average weight) rather than a proportion, the formula uses the population standard deviation (σ) instead of p(1−p): n = (z × σ / E)².
| Known σ | Desired Margin of Error (E) | Required n (95% confidence, z=1.96) |
|---|---|---|
| σ = 10 | E = 2 | n = (1.96×10/2)² = 96.04 → 97 |
| σ = 10 | E = 1 | n = (1.96×10/1)² = 384.16 → 385 |
| σ = 20 | E = 2 | n = (1.96×20/2)² = 384.16 → 385 |
Notice doubling σ has exactly the same effect on required sample size as halving the margin of error — both appear squared in the formula, so either a noisier population or a tighter precision target drives up the sample size by the same multiplicative amount. In practice, σ is rarely known exactly beforehand, so researchers often use a pilot study or a previous study's reported standard deviation as a working estimate.