McNemar Test Calculator

Test for changes in paired proportions with the McNemar test

Try It Free

What is McNemar's Test?

McNemar's test is used when you have paired or matched binary data — for example, the same subjects measured before and after an intervention. Unlike the standard chi-square test (which assumes independent observations), McNemar's test accounts for the pairing by focusing only on the "discordant" cells where subjects changed category.

McNemar's Test Formula

For a paired 2×2 table with discordant cells b and c:

χ² = (b − c)² / (b + c)

When to Use McNemar's Test

Use McNemar's test for:

Exact vs. Asymptotic McNemar

CrossTabs.com computes three versions: (1) the standard chi-square approximation, (2) Yates' continuity-corrected version for small samples, and (3) the exact binomial test which makes no distributional assumptions. The exact test is recommended when b + c < 25.

Frequently Asked Questions

What is the difference between McNemar and chi-square?

The standard chi-square test assumes independent observations. McNemar's test is for paired/matched data where the same subjects are measured twice. Using chi-square on paired data violates the independence assumption and gives invalid results.

What do the "discordant" cells mean?

In a before-after 2×2 table, discordant cells are where subjects changed: positive→negative or negative→positive. Concordant cells (no change) are ignored by McNemar's test because they provide no information about differential change.

Can McNemar's test handle more than two categories?

The standard McNemar test is for 2×2 tables. For larger tables with more categories, use the Bowker test of symmetry or the Stuart-Maxwell test, which generalize McNemar's to R×R tables.