2 × 2 TABLE
Before (rows) × after (columns)
Enter how many participants fall in each before → after combination. Each person is counted once.
Only the discordant cells b and c (people who changed) affect the test.
MCNEMAR TEST CALCULATOR
2 × 2 TABLE
Enter how many participants fall in each before → after combination. Each person is counted once.
Only the discordant cells b and c (people who changed) affect the test.
METHOD
Use it for a yes/no (dichotomous) outcome measured twice on the same people, or on matched pairs: for example, whether students passed before and after a workshop, or whether patients had a symptom before and after treatment. A regular chi-square test is wrong here because the two measurements are not independent.
χ² = (b − c)² ÷ (b + c), df = 1 (continuity-corrected: (|b − c| − 1)² ÷ (b + c))b is the number who changed from category 1 to category 2 and c the number who changed the other way. The participants who did not change (a and d) carry no information about change, so they do not enter the statistic.
Under the null hypothesis, each of the b + c changers is equally likely to move in either direction, so b follows a binomial(b + c, 0.5) distribution. The exact two-sided p value is 2 × P(X ≤ min(b, c)). Use it when b + c is below about 25; SPSS reports this exact p automatically for small tables.
The odds ratio b ÷ c tells you how much more likely change was in one direction than the other, with a 95% CI from SE(ln OR) = √(1/b + 1/c). Also report the two proportions (before and after) so readers see the size of the change.
“An exact McNemar test showed a significant change in the proportion of students who passed, from 45.0% before the workshop to 34.0% after, χ²(1, N = 100) = 6.37, p = .019. Fifteen students changed from pass to fail and four from fail to pass.”
ABOUT THIS TOOL
Test whether a proportion changed between two related measurements on the same people, with the exact test for small samples, the odds ratio, and a ready APA sentence.
KEY FUNCTIONS
LEARN THE METHOD
Test whether two categorical variables are associated, or whether counts match expected proportions, with expected-count checks and a ready-to-use APA write-up.
The non-parametric alternative to the paired t-test for pre-test/post-test and repeated measurements, with exact p values for small samples.
Measure agreement between two raters or coders beyond chance, with confidence intervals and weighted kappa for ordered categories.