Understand sampling uncertainty
How sample-size and power planning fit together
Sample Size for Two Means. Planning starts with an effect worth detecting, a significance level, a target power, and assumptions about variation or baseline rates.
1Define the smallest meaningful effect2Set alpha, power, and allocation3Round sample requirements upward and allow for attrition
Method used
n₁=[(zα+zβ)²(σ₁²+σ₂²/r)]/Δ²; n₂=r n₁.
The detectable difference should be scientifically meaningful rather than chosen to make the sample convenient.
What the result cannot establish
Power is a long-run probability under the assumed effect and model. It is not a guarantee of significance, data quality, or practical importance.
Assumption: Uses a two-sided normal approximation, independent groups, supplied planning SDs, and a fixed allocation ratio.
Quick guide
How to use this calculator
- Enter the observations, probabilities, model parameters, or summary statistics requested by the visible labels.
- Keep every value on the same scale and confirm that the selected sampling relationship, distribution, and tail convention match the question you are investigating.
- Read the result together with its assumptions and interpretation. Statistical output summarizes uncertainty under a model; it does not repair biased data or establish causation.
Calculation method
How the sample size for two means calculator works
n₁=[(zα+zβ)²(σ₁²+σ₂²/r)]/Δ²; n₂=r n₁.
The detectable difference should be scientifically meaningful rather than chosen to make the sample convenient.
Worked example
Sample Size for Two Means example
A target difference of 5 with SDs 10, 80% power and equal allocation needs about 63 per group.
n₁=[(zα+zβ)²(σ₁²+σ₂²/r)]/Δ²; n₂=r n₁.
Supported inputs
Precision and limits
Model and design
Uses a two-sided normal approximation, independent groups, supplied planning SDs, and a fixed allocation ratio.
Numerical scope
Inputs use double-precision numerical methods with guarded domains. Datasets accept up to 10,000 finite plain-decimal values. Extremely large parameters or probabilities deep in a numerical tail may require specialist statistical software.
Interpretation
The detectable difference should be scientifically meaningful rather than chosen to make the sample convenient.
Decision boundary
The calculator does not validate how data were collected, diagnose dependence or bias, choose a scientifically meaningful effect, or replace review by a qualified statistician for consequential research, medical, regulatory, safety, or policy decisions.
Privacy
Entered values and calculated results stay in this browser and are not sent to an analytics service.
Continue calculating
Related calculators