Statistical Calculators

Sample Size Calculator

Approximate sample size planning for mean and proportion precision or balanced two-group mean comparisons, with assumptions and worked examples.

Jump to calculator ↓Help me choose a test

For finite population correction

Quick Reference: Common Sample Sizes

For Proportions (95% CI, p = 0.5)
±10%
97
±5%
385
±3%
1,068
±1%
9,604
Effect Size Guidelines (Cohen's d)
Small
d = 0.2
Medium
d = 0.5
Large
d = 0.8

An approximate planning tool, not a universal minimum

Choose a mode based on the question: precision for a proportion, precision for a mean, or power for a balanced two-group mean comparison. The output assumes the simple design described below. Clustered, paired, unequal-allocation, sequential, or complex-model studies can require different calculations.

A larger sample reduces some sampling uncertainty. It does not repair biased selection, poor measurement, or inappropriate independence assumptions.

Plan precision for a proportion

The tool uses the normal-approximation planning formula:

n0=z1−α/22p(1−p)e2n_0=\frac{z_{1-\alpha/2}^2p(1-p)}{e^2}

Enter margin e as a decimal: ±5 percentage points is 0.05. Enter an anticipated proportion between 0 and 1; use 0.5 when no better planning value is justified, since it maximizes p(1 − p).

At 95% confidence, p = 0.5 and e = 0.05, the calculator uses z = 1.96:

n0=1.962(0.25)/0.052=384.16n_0=1.96^2(0.25)/0.05^2=384.16

Round up to 385 completed responses. This is a planning approximation under the design, not a guarantee about every resulting interval. Very rare proportions can need another method.

Plan precision for a mean

The tool uses n₀ = (zσ/e)², with a supplied planning SD and margin in the same units as the mean.

With planning SD 25, margin 5, and 95% confidence, n₀ = (1.96 × 25/5)² = 96.04, so round up to 97, not 96. Using a pilot SD introduces planning uncertainty; t-based iterative planning can differ from this normal approximation.

Plan a balanced two-group mean comparison

For a two-sided test and standardized target difference d, the approximation is:

nper group=⌈2(z1−α/2+z1−βd)2⌉n_{per\ group}=\left\lceil2\left(\frac{z_{1-\alpha/2}+z_{1-\beta}}d\right)^2\right\rceil

Choose α = 0.05 in the significance control for a two-sided 5% test. At 80% power and d = 0.5, the tool uses rounded cutoffs 1.96 and 0.84, giving ceiling(62.72) = 63 per group, or 126 total.

Exact t-based power software can give a different answer because this is a normal approximation using rounded cutoffs. It is not interchangeable with paired, binary-outcome, or unequal-group planning.

Choose d from a meaningful difference and defensible variability estimate, not only a generic “small/medium/large” label. Power concerns a specified alternative effect, not every nonzero effect.

Finite population and nonresponse

For mean or proportion planning, an optional population size N applies n′ = n₀/[1 + (n₀ − 1)/N], rounded up. This corresponds to simple random sampling without replacement from the defined finite population. It is not a generic correction for online convenience samples or a power correction for the two-group mode.

If you need 385 completed responses and expect a 70% completion rate, invite at least ceiling(385/0.70) = 550 under that planning assumption. Nonresponse adjustment increases invitations; it does not automatically remove nonresponse bias.

Report the planning assumptions

Record the target population, independent unit, desired margin or effect, variability estimate, confidence/significance level, power if relevant, allocation, and allowance for missingness. There is no universal rule “30 observations is enough” or “10 per predictor guarantees regression adequacy.”

Read sample size determination and effect size and power. Use a design-specific planning method when the simple formulas do not fit.

Want to learn the theory?

Our lessons explain the statistical concepts behind this calculator with clear examples.

Understand this method →