McNemar's Test calculator

Analyze pre-post nominal designs or matched pairs. Run McNemar's test online and assess changes in binary proportions.

What it does

Tests whether a binary outcome changed between two paired measurements, using only the discordant pairs — the subjects who switched.

When to use it

Before-and-after on the same subjects, or two tests applied to the same cases, with a yes/no result.

Cautions

Alternatives

How to read the output

The discordant pairs b and c
b is the count that went 0→1, c the count that went 1→0. These two numbers are the test; the subjects who did not change contribute nothing. The concordant cells are irrelevant here by design. A large sample with only a handful of discordant pairs is a small study for this purpose, however impressive the total N.
Method: exact binomial or continuity-corrected χ²
With few discordant pairs the exact binomial test is used; otherwise the corrected χ² approximation. The result names which one ran. Report the method shown. They can disagree when b + c is small, and the exact one is right there.
p-value
How surprising a difference at least this large would be IF the groups really were identical on this measure. A small p means the data would be surprising under that assumption. It is not the probability that the result is due to chance, and not the probability that the groups are the same — those read the conditional backwards. It also answers 'would this be surprising?', never 'is this big enough to matter?': with a large sample a trivial difference returns a small p, and the result looks identical to an important one.

How this calculator is validated · Which statistical test should I use?