Sample Size Calculator

Free sample size calculator for surveys, A/B tests, and statistical studies. Find the minimum sample size using Cochran's formula with confidence level, margin of error, and power analysis.

Use 50% if unsure (maximizes sample size)

Enter 0 for infinite/unknown population

Required Sample Size

383responses

CL95%MoE±5%Pop100,000

Sample Size Scenarios

Compare CL × MoE trade-offs

CL \ MoE±1%±2%±3%±5%±10%
90%6,3361,66374627068
95%8,7632,3451,05638396
99%14,2283,9821,810660166

Formula Breakdown

Step-by-step calculation with your values

z = 1.9600 (for 95% confidence)

p = 0.50, e = 0.0500

n₀ = z² × p(1-p) / e² = 385

n = n₀ / (1 + (n₀-1)/N) = 383 (N = 100,000)

Using Cochran's formula with finite population correction.

How the Sample Size Calculator Works

Three modes for surveys, A/B tests, and reverse calculations

Determining the right sample size is the foundation of any statistically valid survey, research study, or experiment. Too few responses and your results lack precision; too many and you waste time and budget.

Survey Mode

Find minimum sample size for a given confidence level and margin of error

A/B Test Mode

Calculate visitors per variation using power analysis

MoE Mode

Reverse-calculate precision from an existing sample

Sample Size Formulas Explained

The math behind each calculation mode

n₀ = z² × p(1-p) / e²

Cochran's formula — z is the z-score for your confidence level, p is the expected proportion, e is the margin of error

n = n₀ / (1 + (n₀-1) / N)

Finite population correction — reduces sample when population N is small and known

n = (z_α/2 + z_β)² × (p₁(1-p₁) + p₂(1-p₂)) / (p₂-p₁)²

Two-proportion z-test — p₁ is baseline, p₂ is expected with MDE, z_β from power

Z-Score Reference

90% → z = 1.64595% → z = 1.96098% → z = 2.32699% → z = 2.576

Common Sample Sizes at a Glance

Assumes 50% proportion, large population

68

Quick Poll

90% CL, ±10%

385

Standard Survey

95% CL, ±5%

1,068

Market Research

95% CL, ±3%

16,590

High-Precision

99% CL, ±1%

Key insight: Halving the margin of error roughly quadruples the required sample. Going from ±5% (385) to ±2.5% needs ~1,537 responses. The cost of precision grows exponentially.

Practical Examples

Real-world sample size calculations

Customer Satisfaction Survey

10,000 users • 95% CL • ±3% MoE • 40% response rate

965 responses needed → send to 2,413 users

E-Commerce A/B Test

5% baseline • 20% relative MDE • 95% sig • 80% power

~8,200 per variation → 16 days at 1K daily visitors

Employee Engagement Survey

350 employees • 95% CL • ±5% MoE

184 responses (FPC reduces from 385 to 184)

Clinical Research Trial

99% CL • ±2% MoE • 15% dropout buffer

4,148 participants → recruit ~4,975

Who Uses a Sample Size Calculator?

From market research to clinical trials

Market Researchers

Justify methodology in proposals; funding agencies expect formal sample size justification

Product & Growth Teams

Determine A/B test duration; avoid under-powered tests that miss real improvements

QA & Audit Professionals

Statistical sampling for inspecting transactions per ISO 2859 and ANSI/ASQ Z1.4

Academic Researchers

Thesis sample sizing, experiment design, and IRB submissions with power analysis

Common Mistakes When Calculating Sample Size

Pitfalls that lead to unreliable results

Not accounting for non-response

Divide required sample by expected response rate. Need 400 at 25% rate → invite 1,600.

Stopping A/B tests early

Peeking at results inflates false positives. Pre-commit to the calculated sample size.

Confusing confidence level & interval

Level (95%) = method reliability. Interval (±5%) = result precision. Margin of error = half the interval width.

Always using 50% proportion

If prior data shows ~25%, use it. Reduces sample by 25-40% vs. the worst-case 50% estimate.

Unrealistic minimum detectable effect

Detecting a 5% lift needs ~16× more traffic than a 20% lift. Be realistic about achievable improvements.

Frequently Asked Questions

Common questions and detailed answers

Embed Sample Size Calculator

Add this calculator to your website or blog for free.

Last updated Apr 4, 2026