Skip to main content
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
Show menu

Sample size calculation: Comparison of two means

Command:Sample size
Next selectComparison of two means


Calculates the required sample size for the comparison of two independent means. The sample size takes into account the required significance level and power of the test (see Sample size calculation: Introduction).

Required input

Correction for unequal variances

When you enter the same standard deviation for both samples, it is assumed that the data will be analysed using the Independent samples t-test with the option "Assume equal variances". When you enter two different standard deviations, it is assumed that the data will be analysed using the Independent samples t-test with the option "Assume unequal variances". See Independent samples t-test.


In the example you are interested in detecting a difference between the sample means of a least 10. You expect the standard deviations in the two studies to be equal to 16. You expect to include twice as many cases in group 1 as in group 2.

For α-level you select 0.05 and for β-level you select 0.20 (power is 80%).

Sample size calculation for comparison of two means.

After you click Calculate the program displays the required sample size, which is 61 for group 1 and 31 in group 2, or a total of 92 cases.

A table shows the required sample size for different Type I and Type II Error levels.


See also

Recommended book

Book cover

Sample Size Tables for Clinical Studies
David Machin, Michael J. Campbell, Say-Beng Tan, Sze-Huey Tan

Buy from Amazon

Sample Sizes for Clinical, Laboratory and Epidemiology Studies includes the sample size software (SSS) and formulae and numerical tables needed to design valid clinical studies. The text covers clinical as well as laboratory and epidemiology studies and contains the information needed to ensure a study will form a valid contribution to medical research. The authors, noted experts in the field, explain step by step and explore the wide range of considerations necessary to assist investigational teams when deriving an appropriate sample size for their when planned study. The book contains sets of sample size tables with companion explanations and clear worked out examples based on real data. In addition, the text offers bibliography and references sections that are designed to be helpful with guidance on the principles discussed.