Skip to content

    Under active development. New calculators and features ship every week. Everything currently runs free while the site matures — pricing pages are a preview, checkout is not open yet.

    Calculates locally in your browser · power analysis
    Experimental design / sample size

    Sample size calculator

    A test that is too small cannot detect the effect you care about, and one that is too large wastes time and money. This calculator solves the standard power equation for the number of observations needed to detect a mean difference or estimate a proportion to a given margin.

    ModeMeanDesignTwo-sidedn197
    Required sample
    197
    Δ 2.0 at σ 10.0
    Confidence
    95%
    z = 1.960
    Power
    80%
    z = 0.842
    Effect size
    0.20
    Δ / σ
    Sample size at other settings
    How the requirement moves with the effect size you want to detect.
    197 observations
    Sample size at other settings
    SettingSample size
    Δ 4.0050
    Δ 3.0088
    Δ 2.00197
    Δ 1.33442
    Δ 1.00785

    Halving the difference you want to detect roughly quadruples the sample.

    Inspect the model
    Choose a quick result view, a scaled comparison, or the complete diagnostic set.
    Sample size against detectable difference
    The curve is a square law: precision gets expensive quickly.
    Sample size against detectable difference0.000703.361406.722110.082813.443516.800.50.51.01.01.51.52.02.02.52.53.03.03.53.54.04.04.54.55.05.05.55.5n
    Canonical equations
    The exact relationships implemented by this engine.

    n = (zα + zβ)² σ² / Δ² · Two-sided test with the stated power.

    n = z² p(1−p) / e² · Worst case at p = 0.5.

    margin = z σ/√n · The interval you will actually report.

    engineering methodology

    A clear path from inputs to results.

    A test that is too small cannot detect the effect you care about, and one that is too large wastes time and money. This calculator solves the standard power equation for the number of observations needed to detect a mean difference or estimate a proportion to a given margin.

    Step-by-step methodWorked exampleAssumptions explained

    How to use

    1. Choose a mean or proportion study.
    2. Set the confidence level and power.
    3. Enter the standard deviation and the difference to detect.
    4. Read the required sample size.

    The formula

    n=(z1−α/2+z1−β)2σ2Δ2n = \frac{(z_{1-\alpha/2} + z_{1-\beta})^2 \sigma^2}{\Delta^2}

    Reference: Standard power analysis for a two-sided test; normal approximation.

    Worked example

    σ 10, Δ 2, 95% confidence, 80% power

    Inputs
    • Standard deviation 10.
    • Difference to detect 2.
    • Confidence 95%, power 80%.
    Calculation path
    1. 1

      zα = 1.96, zβ = 0.8416.

    2. 2

      n = (1.96 + 0.8416)² × 100 / 4 = 196.2.

    3. 3

      Round up: 197 observations.

    4. 4

      Effect size Δ/σ = 0.2, a small effect.

    Result

    197 observations for a 0.2 effect size.

    Interpreting the result

    Sample size is a square law in precision: halving the difference you want to detect roughly quadruples the sample. That is why small effects need collaborations and large effects can be found with a pilot.

    Assumptions & limitations

    • Two-sided test, normal approximation.
    • Known or assumed standard deviation.
    • Independent observations.
    • No allowance for dropouts; add 10–20%.

    Frequently asked questions

    Why does power matter?

    A study with low power can miss a real effect and waste the effort.

    Should I add dropouts?

    Yes. Inflate the sample by 10–20% for attrition.

    What is a small effect size?

    About 0.2 in σ units; 0.5 is medium and 0.8 large.

    Methodology last reviewed 2026-10-21. Results are informational and not financial or engineering advice — see our disclaimer.