Skip to content
ConductExperience
Menu

Sample size calculator

Work out how many people a study needs to find an effect of the size you expect, or the power a number of people gives. For a t-test between two groups, the same people measured twice, or one group against a set value.

The calculator runs in your browser. It works out power from the noncentral t distribution, as R's pwr package does.

Work out a sample size

What you compare
Test
Work out

64 people in each group, 128 in all, for 80% power. With 64 in each group, power is 80.1%.

People in each group for common effect sizes

dCohen's name80% power90% power
0.2Small394527
0.3176235
0.5Medium6486
0.8Large2634

Two groups, a two-sided test, α = 0.05. For the same people twice, or one group, d = 0.5 needs 34 people for 80% power.

What each setting means

SettingWhat it isUsual choice
Effect size (Cohen's d)The difference you expect, in standard deviations: the difference between the means divided by the SD. For the same people twice, it is dz: the mean of the differences divided by their SD, which is not a two-group d.From earlier studies or a meta-analysis, or the smallest difference that would matter
Significance level (α)The chance of finding an effect when there is none.0.05
PowerThe chance of finding the effect if it is real. One minus the power is the chance of missing it.80% or 90%
TestTwo-sided finds a difference either way. One-sided looks only in the direction you set before the data come in.Two-sided
Work out d from earlier results

Allow for people who leave

Divide by the share you expect to finish. For d = 0.5 at 80% power, with 10% expected to leave: 64 ÷ 0.9 = 71.1, so recruit 72 in each group.

How the calculator works

Power is the chance that the t statistic passes the test's critical value when the effect is real. That chance comes from the noncentral t distribution, with these degrees of freedom and noncentrality for n people in each group, or n people:

DesignDegrees of freedomNoncentrality
Two groups2n − 2d × √(n ÷ 2)
The same people twice, or one groupn − 1d × √n

The calculator gives the smallest whole number of people whose power reaches the one you chose. For d = 0.5 at 80% power, R's pwr.t.test gives 63.77 people in each group, which rounds up to the calculator's 64.

Sample sizes in ConductExperience

  • A link's Most people, up to 10,000, stops it taking people after that many, so it can close at the number you work out here.
  • A group's Limit is the most people it takes. Balanced assignment keeps the groups in proportion to their weights as people join, so groups of equal weight stay within one person of each other.
  • Results gives each number, slider and line scale question, and each score, its n, mean and SD, and filters by group: the figures for the next study's effect size.

Limits

  • t-tests only. It does not work out sample sizes for proportions, analysis of variance, regression or correlations.
  • Two groups of the same size.
  • It assumes scores that are roughly normal, with the same SD in each group.
  • The answer is only as good as the effect size you type. A smaller true effect needs more people.

Source

Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum Associates.

Related

Planning a study?

Start one now, or tell us what you want to measure.