McNemar's Test Sample Size Calculator

Pro

Calculate the sample size (number of pairs) needed to compare paired binary outcomes using McNemar's test.

Study Parameters

Discordant pairs table:

After +After -
Before +concordantp10
Before -p01concordant
Results

Required Sample Size

155

Achieved Power

80.1%

Effect Size

0.150

Method: McNemar's Test (Connor 1987)
Number of pairs155
Total discordant proportion0.450
Discordant odds ratio2.000
|p10 - p01|0.150
  • Paired (matched) binary data
  • Total discordant proportion p_d = 0.4500
  • Discordant odds ratio = 2.000
  • Two-sided hypothesis test
Formula
n = [z_{alpha/2} * sqrt(p_d) + z_beta * sqrt(p_d - delta^2)]^2 / delta^2, delta = p10 - p01
References
  1. Connor RJ (1987). Sample size for testing differences in proportions for the paired-sample design. Biometrics, 43, 207-211.
  2. Lachin JM (1992). Power and sample size evaluation for the McNemar test. Statistics in Medicine, 11, 1239-1251.