Sample Size Calculator

Determine how many observations you need for a given margin of error, confidence level, and expected variability.

Please verify you are human to use the calculator.

About the Sample Size Calculator

Sample size determination is the process of computing how many observations a study needs to reliably detect an effect of a given magnitude. It is a critical step in study design because an underpowered study wastes resources and may fail to detect real effects, while an unnecessarily large study is costly and, in clinical settings, potentially unethical.

The calculation requires specifying four quantities: the desired significance level (α), the target power (typically 80% or 90%), the minimum effect size of practical interest, and an estimate of variability (such as the standard deviation). The most common mistake is using an unrealistic effect size—plugging in an optimistically large effect to justify a conveniently small sample. Always base effect size estimates on pilot data, published literature, or the smallest difference that would be clinically or practically meaningful.

After computing the base sample size, always inflate for expected dropouts or missing data. Standard deviation estimates from small pilot studies can be unreliable, so consider running a sensitivity analysis across a range of plausible variability values. Sample size planning must be done before data collection; retrospective calculations on completed studies are circular and uninformative.

A test result carries weight only when the hypothesis, the sample size and the decision rule were fixed before the data arrived. Every pilot we scope is built the same way, with success criteria and kill gates agreed in advance. That work is described under AI pilot design.

Related calculations

  • Confidence interval: Translate a precision target into an interval-estimation question before collecting data.
  • Power analysis: Use power analysis when planning detection of a specified effect rather than estimation precision.
  • Normal: Inspect the normal quantiles used in common large-sample precision calculations.
  • Two sample t test: Match a planned two-group sample to the intended independent-mean comparison; check the sample-size approximation.

Related Tools

Stay in the loop

Get notified when new tutorials and deep-dives are published. No spam, unsubscribe anytime.

Sample Size Calculator FAQ

Common questions about the sample size calculator