Sample Size & Power Calculator
Calculate required sample sizes for estimation of means and proportions within a target margin of error, or compute statistical power.
Find the required sample size for survey polls and conversion rates within a desired margin of error.
Interactive, data-driven visualization computed from your current input values.
Statistical Power vs. Sample Size Curve
Precision Planning: Minimum n = 1068 achieves ±3% margin at 95% confidence
Step-by-Step Mathematical Derivation
Detailed derivation with exact formulas, user input substitutions, and statistical interpretations.
Specify Precision & Confidence Parameters
Confidence level of 95% yields critical normal boundary z* = 1.96.
Apply Sample Size Equation for Proportions
Determines theoretical minimum sample size for the requested error margin.
Integer Ceiling & Attrition Planning
Rounded up to the nearest integer. Note: Adding a 10-15% buffer (~1197 respondents) is recommended to absorb survey drop-out.
Evaluation & Analysis Guidelines
- Independent simple random sampling from target population
- Population is large (N > 20n) or finite population correction applies
Sample Size & Statistical Power Formulas
Derivations for estimation sample sizes from target margins of error and non-centrality parameters for statistical power.
1. Sample Size for Proportions Formula
Calculates the minimum required sample size to estimate a proportion within margin of error E at confidence level 1 − α. Setting p = 0.5 maximizes variance and yields the safest conservative estimate.
2. Sample Size for Continuous Mean
Determines sample observations required to estimate a continuous population average within margin of error ±E when population standard deviation σ is estimated from pilot testing or historical data.
3. Two-Sample Statistical Power Formula
Computes the probability that a randomized two-group experiment with n subjects per arm detects a standardized effect size (Cohen's d) at false-positive threshold α.
How to Size Surveys, Trials & Experiments With Adequate Statistical Power
Determines minimum sample counts before data collection so experiments avoid inconclusive results or noisy wide confidence bands.
- 1
Choose Estimation Precision vs. Experimental Power
Select Proportion or Mean modes when planning surveys within a desired ±Margin of Error. Switch to Statistical Power Analysis when evaluating an A/B or two-group experiment's sensitivity.
- 2
Review Power Curve Sensitivity Across Sample Counts
Inspect the Power vs. Sample Size curve to see where power crosses the standard 80% benchmark and estimate attrition buffers.
Survey Sample Size Lookup Reference (Large Population, p = 50%)
Minimum respondents needed to achieve target margins of error across 90%, 95%, and 99% confidence levels.
| Desired Margin of Error (±E) | 90% Confidence (z=1.645) | 95% Confidence (z=1.960) | 99% Confidence (z=2.576) |
|---|---|---|---|
| ±1.0% Error Margin | 6,766 respondents | 9,604 respondents | 16,588 respondents |
| ±2.0% Error Margin | 1,692 respondents | 2,401 respondents | 4,147 respondents |
| ±3.0% Error Margin | 752 respondents | 1,068 respondents | 1,843 respondents |
| ±5.0% Error Margin | 271 respondents | 385 respondents | 664 respondents |
| ±10.0% Error Margin | 68 respondents | 97 respondents | 166 respondents |
Note: These worst-case p = 50% counts guarantee precision across any population above 20,000 individuals.
Study Planning Realities & Dropout Buffers
Account for Survey Non-Response & Attrition
If you require 385 completed surveys (±5% margin at 95% confidence) and expect a 20% non-completion rate, invite 385 ÷ 0.80 = 482 participants.
Power Analysis Assumes Equal Variance & Normal Means
Two-group power calculations assume balanced arm sizes (n per group) and standardized Cohen's d effects; clustered or heavily skewed metrics require larger design effects.
Sample Size & Power Calculator — Worked Examples
Real-world scenarios and verified benchmark inputs for the Sample Size & Power Calculator.
Public Opinion Poll Sample Size (±3% Error)
Calculating required survey respondents for 95% confidence and maximum conservative variance (p = 50%).
Continuous Mean Study Precision (±2.0 Units)
Finding sample count needed to bound mean cholesterol estimation within ±2.0 given σ = 10.0.
Two-Arm Experiment Power Check (d = 0.50)
Evaluating whether 30 participants per arm provides adequate ≥80% statistical power.
Sample Size & Power Calculator — Frequently Asked Questions
Expert guidance on study planning, power curves, Type II error rates (β), and conservative sample size rules.
Why is 50% often used as the estimated proportion (p)?
Because p × (1 − p) reaches its algebraic maximum of 0.25 at p = 0.50. When you have no reliable prior estimate of the true rate, using 50% guarantees the resulting sample size is large enough for any underlying proportion.
What is statistical power (1 − β) and why is 80% standard?
Statistical power (1 − β) is the probability of correctly detecting a true effect when one exists (avoiding a false negative / Type II error β). Cohen proposed 80% power (accepting at most a 20% false negative risk alongside a 5% false positive risk α) as a practical scientific standard.
How does halving the margin of error affect required sample size?
Because margin of error (E) is squared in the denominator, cutting your margin of error in half (e.g., from ±4% to ±2%) requires quadrupling (4×) your sample size.
Should I recruit more subjects than the exact calculated n?
Yes. In surveys and trials, non-response and participant dropout reduce final analyzable counts. Adding a 10% to 20% attrition buffer (n_recruit = n / (1 − attrition_rate)) prevents an underpowered study.
Does total population size (like 10 million vs 100 million) dramatically change sample size?
No. For large populations (N > 20 × n), population size barely changes required sample size at all — polling 1,068 people gives ±3% precision whether sampling a city of 500,000 or a nation of 300 million. Finite population correction only shrinks n significantly for small populations.
What effect size (Cohen's d) should I use for power planning?
Base Cohen's d on pilot studies, published literature, or the Minimum Detectable Effect (MDE) that would be practically worthwhile. Standard rough conventions are d = 0.2 (small), 0.5 (medium), and 0.8 (large).
Related Calculators
Explore connected statistics & probability and related computation tools.