Measure a continuous outcome y in each subject at the start and end of the study period. For each subject, calculate the change Δ = yend - ystart. Compare the mean value of Δ to 0. This requires the standard deviation SΔ. The estimate of SΔ should be based on data from other subjects who were followed for similar time periods.
Instructions: Enter parameters in the green cells. Answers will appear in the blue box below.
α (two-tailed) =
%
Threshold probability for rejecting the null hypothesis. Type I error rate.
β =
%
Probability of failing to reject the null hypothesis under the alternative hypothesis. Type II error rate.
E =
Effect size
SΔ =
Standard Deviation of the CHANGE in the outcome. (If you don't know SΔ, click here to calculate it.)
If you don't know SΔ for your study:
S =
What is the standard deviation of the outcome in the population?
rwithin =
What is the within-subject correlation of the outcome?
SΔ =
Calculated Standard Deviation of change: S(2(1-rwithin))1/2
1. Calculation using the T statistic and non-centrality parameter:
A value of N = gives the following calculations:
NCP = Non-centrality parameter = √N * E/SΔ = .
DF = Degrees of freedom = N - 1 = .
tα = Inverse of the two-tailed T distribution given probability of 1-(α/2) and DF of = .
Beta(tα, DF, NCP) = . If N was calculated correctly, this should closely approximate your selected value of β, above.
The N thus calculated is rounded up to the next highest integer to give the group size.
Group size N:
2. Approximation using the Z statistic instead of the T statistic:
Zα = Standard normal deviate for α = .
Zβ = Standard normal deviate for β = .
B = (Zα + Zβ)2 = .
C = (E/SΔ)2 = .
N = B/C = .
The N thus calculated is rounded up to the next highest integer to give the group size.
Group size N:
Because the formula used here is based on approximating the T statistic with a Z statistic, it will slightly underestimate the sample size when N is less than about 30. We provide the result using the approximation to allow comparison to other calculators that use the Z statistic.

Reference:
Chow S-C, Shao J, Wang H. Sample size calculations in clinical research. 2nd ed. Boca Raton: Chapman & Hall/CRC; 2008. Section 3.1.1, page 50.
Rosner B. Fundamentals of Biostatistics. 4th ed. Duxbury Press; 1995. Page 221.