Sample Size Planner

Design tool

Estimate the required sample size to measure a single mean or single proportion with your chosen confidence, margin of error, and assumptions about variability. Explore how tightening precision or changing assumptions drives the sample size up or down.

TEST OVERVIEW & EQUATIONS

This planner assumes you want a confidence interval around a single estimate (a mean or a proportion) with a specified maximum margin of error. It uses large-sample normal approximations and your best guess about variability from prior data or a pilot.

Single proportion:
$$ n \ge \frac{z_{1-\alpha/2}^2 \, p(1-p)}{E^2} $$ where \(p\) is the expected proportion, \(E\) is the acceptable margin of error (absolute difference), and \(z_{1-\alpha/2}\) is the normal critical value for your confidence level.

Single mean:
$$ n \ge \left(\frac{z_{1-\alpha/2} \, \sigma}{E}\right)^2 $$ where \(\sigma\) is your estimate of the population standard deviation and \(E\) is the acceptable margin of error measured in the outcome units.

Additional notes & assumptions

These formulas treat \(n\) as the number of independent observations needed for a two-sided confidence interval with the specified width. They are most reliable when the eventual sample is moderate to large, and when your guesses for \(p\) or \(\sigma\) are realistic. For very small samples or extreme proportions (near 0 or 1), consider simulation or exact methods instead.

PLANNING SCENARIOS

Use presets to explore common marketing questions (for example, estimating an email open rate or average order value). Each scenario sets reasonable defaults for the expected rate or standard deviation, margin of error, and confidence so you can see how the design behaves.

INPUTS & SETTINGS

Design the study

Single proportion (e.g., open rate or conversion rate)

Use a prior campaign rate or pilot estimate.

Absolute difference in the proportion (for example, ±3 percentage points).

Single mean (e.g., average order value)

Use prior data or a pilot to approximate variability.

Help me estimate \(\sigma\) from a range

If you only have a rough sense of the minimum and maximum values you expect, you can use the rule-of-thumb that, for approximately bell-shaped data, most observations fall within about \(\pm 2\sigma\) of the mean. That implies the total range is roughly \(4\sigma\), so \(\sigma \approx \frac{\text{max} - \text{min}}{4}\).

This will set \(\sigma\) to \((\text{max} - \text{min}) / 4\). Use it as a starting point and refine with pilot data when available. This is especially handy for bounded marketing survey scales (for example, a 1–7 satisfaction rating), where the minimum and maximum are known in advance.

Maximum distance between the sample mean and the true mean (in outcome units).

Alpha and confidence are linked: confidence = 1 - alpha.

Enter the number of eligible customers/accounts if you want finite-population correction.

VISUAL OUTPUT

Required sample size vs. margin of error

This chart shows how tightening the margin of error (moving left) requires a larger sample size. The highlighted point marks your current design.

Required sample size vs. variability

This chart shows how changing your assumptions about variability affects the required sample size: for proportions, the expected rate \(p\); for means, the standard deviation \(\sigma\).

Required sample size vs. confidence level

This chart shows how increasing the confidence level (lowering \(\alpha\)) raises the required sample size for your current assumptions about variability and margin of error.

DESIGN SUMMARY

Required sample size (n):
Finite-population adjusted n:
Outcome type:
Confidence / α:
Precision (margin of error):

APA-Style Planning Statement

Provide assumptions above to generate an APA-style statement summarizing the required sample size.

Managerial Interpretation

This panel will translate the design into plain language, explaining what the chosen margin of error and confidence mean for your campaign or KPI estimate.

DIAGNOSTICS & ASSUMPTIONS

Diagnostics & Assumption Checks

These calculations assume independent observations and large-sample normal approximations. Sample size formulas for proportions work best away from the extremes (not too close to 0 or 1). For very small samples, highly skewed metrics, or clustered designs, consult a more advanced reference or a statistician.

If the required sample size is infeasible, you can loosen the margin of error, accept a lower confidence level, or collect a pilot sample to refine your assumptions about variability.