Skip to content

Sample Size for One-Way ANOVA

Plan the per-group sample size needed for a balanced comparison of three or more group means, given an assumed effect size expressed as Cohen's f.

What this answers

This calculator answers "how many observations per group do I need for a balanced one-way ANOVA to reliably detect an effect of this size?" using Cohen's f, the standard effect-size measure for ANOVA designs, small at .10, medium at .25, and large at .40 by Cohen's own widely cited conventions.

How it is calculated

Unlike this site's other sample-size engines, which use a normal approximation for simplicity, ANOVA power genuinely depends on the noncentral F distribution, and a normal approximation would be noticeably less accurate here. This calculator instead solves the exact relationship directly: starting from a small per-group n and increasing it, it computes the true noncentral F distribution's power at each step (using the F distribution critical value for your alpha and the noncentrality implied by Cohen's f and the current total sample size) until the target power is reached.

Worked example

For a medium effect size of Cohen's f equal to .25 with 3 groups, at the conventional 95% confidence and 80% power, this calculator requires roughly 50 to 55 observations per group, consistent with published G*Power and statsmodels cross-checks for this same design.

Assumption audit

Calculated from your data: the required per-group sample size and the exact achieved power at that sample size, which will sit at or just above your target power due to the whole-number rounding.
Evidence to review: where your assumed Cohen's f came from; if you are unsure, Cohen's own small/medium/large conventions (.10, .25, .40) are a reasonable starting point, not a substitute for a genuine prior estimate from similar research.
You must verify: that you are planning a genuinely balanced design (an equal number of observations in every group); an unbalanced design will need more total observations than this calculator's balanced-design result suggests.

What this result does not mean

This sample size guarantees the stated power only under the assumed Cohen's f; if the true effect turns out smaller, the study will be underpowered to detect it, and a significant omnibus ANOVA result still would not tell you which specific groups differ without a follow-up post-hoc test.

Limitations

This calculator assumes equal variances across groups and a balanced design; a search cap prevents it from running indefinitely for extremely small effect sizes, in which case an error message indicates the target effect may be impractically small to plan for directly.