McNemar's Test Calculator
Paired yes/no data — McNemar's chi-square with continuity correction and the exact binomial p-value from the discordant pairs.
How it works
χ² = (|b − c| − 1)² ÷ (b + c) with 1 df; exact p = 2 · P(Binomial(b + c, ½) ≤ min(b, c))
McNemar's test is for the same subjects measured twice on a yes/no outcome — a symptom before and after treatment, two diagnostic tests on the same patients, two raters. Only the discordant pairs carry information: if the treatment did nothing, switches in each direction should be equally likely. The exact binomial version is preferred when fewer than about 25 pairs are discordant; the corrected chi-square matches it closely beyond that.
Worked example
6 switched yes→no and 16 switched no→yes: χ² = 3.68 (p = 0.055), exact p = 0.052 — borderline.
Frequently asked questions
Why ignore the concordant cells?
Pairs that answered the same both times say nothing about change; they only affect the overall proportions.
Is this a paired chi-square test?
Yes — an ordinary chi-square would wrongly treat the two measurements as independent samples.
Related calculators
For education — check assumptions (sample size, distribution, independence) before using a test result in a real decision.