Sample Size & Power Calculator

Calculate required sample sizes for estimation of means and proportions within a target margin of error, or compute statistical power.

Calculation Mode
Calculation Inputs

Find the required sample size for survey polls and conversion rates within a desired margin of error.

Auto-Computed
Statistical Visualizations & Distributions

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

Power Curve (1 − β)Target Power (80%)Required n = 1068
0%20%40%60%80%100%n = 1068 (80% Power)1605128641,2161,5681,920Sample Size (n per group)Power (1 − β)
α = 0.050000000000000044
Statistical Analysis Summary
Required Sample Size (n)
1068 respondents
Critical Value: ±1.96
Sample Size (N)1068

Step-by-Step Mathematical Derivation

Detailed derivation with exact formulas, user input substitutions, and statistical interpretations.

Step 1

Specify Precision & Confidence Parameters

Formula
E = Margin of Error, Z^× = Z1 − α/2
Substitution & Values
E = 0.03 (±3%), p = 0.5, Z^× = 1.96
Result:
Z^× = 1.96

Confidence level of 95% yields critical normal boundary z* = 1.96.

Step 2

Apply Sample Size Equation for Proportions

Formula
n = (Z^×)2 · p(1 − p)E2
Substitution & Values
n = (1.96)2 × 0.5 × 0.5(0.03)2
Result:
nexact = 1,067.07

Determines theoretical minimum sample size for the requested error margin.

Step 3

Integer Ceiling & Attrition Planning

Formula
nrequired = lceil nexact rceil
Substitution & Values
lceil 1,067.07 rceil
Result:1068 respondents

Rounded up to the nearest integer. Note: Adding a 10-15% buffer (~1197 respondents) is recommended to absorb survey drop-out.

Statistical Interpretation & Assumptions

Evaluation & Analysis Guidelines

Required Assumptions:
  • 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

n = ≤ftlceil z2 × p(1 − p)E2 rightrceil

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.

Worked Example: For 95% confidence (z = 1.960) with ±3% margin (E = 0.03) and p = 0.5: n = (1.960² × 0.25) / 0.03² = 1067.11 → 1,068 respondents.

2. Sample Size for Continuous Mean

n = ≤ftlceil ≤ft( Z^× · σE )2 rightrceil

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.

Worked Example: Target margin E = 2.0 with σ = 10.0 at 95% confidence (Z* = 1.960): n = (1.96 × 10 / 2)² = 96.04 → 97 subjects.

3. Two-Sample Statistical Power Formula

Power = 1 − β = Φ≤ft(d√n2 − Zcrit)

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 α.

Worked Example: At n = 30 per group, d = 0.50, α = 0.05 (two-tailed, Z = 1.96): δ = 1.936 → Power ≈ 49.1% (underpowered; requires ~63/group for 80%).

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. 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. 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 Margin6,766 respondents9,604 respondents16,588 respondents
±2.0% Error Margin1,692 respondents2,401 respondents4,147 respondents
±3.0% Error Margin752 respondents1,068 respondents1,843 respondents
±5.0% Error Margin271 respondents385 respondents664 respondents
±10.0% Error Margin68 respondents97 respondents166 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%).

Result1,068 respondents

Continuous Mean Study Precision (±2.0 Units)

Finding sample count needed to bound mean cholesterol estimation within ±2.0 given σ = 10.0.

Result97 subjects

Two-Arm Experiment Power Check (d = 0.50)

Evaluating whether 30 participants per arm provides adequate ≥80% statistical power.

Result49.1% Power (Underpowered; ~63/group needed for 80%)

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.

Browse all Statistics & Probability calculators
Statistics & Probability

A/B Test Significance Calculator

Available
Statistics & Probability

Confidence Interval Calculator

Available
Statistics & Probability

Z-Test Calculator

Available
Available