Part of the Maths & Statistics suite · 235 calculators

McNemar's Test Calculator

Test whether a paired binary outcome changed — before-and-after on the same subjects, where only the disagreements carry information.

For paired yes/no data, the subjects who answered the same way both times tell you nothing about change.

Results update as you type
Results
Chi-square statistic
4.567568
p-value (chi-square)
Exact binomial p-value
With Yates' correction
Discordant pairs
Odds ratio (b ÷ c)
Decision at 5%
Which p-value to use
Reviewed September 2026. Pure mathematics: the result does not depend on where you are. Terminology follows the national curriculum (maths, brackets, decimal point).
No account required · Google Analytics off unless allowedCalculator arithmetic runs in your browserResults update as you type
All calculations run 100% in your browser. The calculator code does not submit your figures to GlobalCalc to obtain a result.
About mcnemar's test

How the mcnemar's test calculator works

For paired yes/no data, the subjects who answered the same way both times tell you nothing about change. McNemar's test looks only at the discordant pairs: χ² = (b − c)² ÷ (b + c) on 1 degree of freedom.

When b + c is small the chi-square approximation fails, so the calculator also gives the exact binomial p-value — which is the one to read below about 25 discordant pairs.

Formula: χ² = (b − c)² / (b + c), df = 1

Worked examples

InputsChi-square statisticNote
25 switched one way, 12 the other4.567568χ² = 4.57, p = 0.033
An even split0χ² = 0, p = 1
Few pairs changed5.444444read the exact p-value here

Frequently asked questions

What is McNemar's test for?

Paired binary data — the same subjects measured twice, or matched pairs, with a yes/no outcome.

Why do the unchanged pairs not count?

Because they are consistent with any amount of change in either direction. Only the switchers carry information about the direction of change.

When should I use the exact version?

When there are fewer than about 25 discordant pairs. Below that the chi-square approximation is unreliable.

How is it different from a chi-square test of independence?

Completely. That tests whether two variables are related across independent observations; this tests whether a paired proportion moved.

Where is it used?

Before-and-after surveys, matched case-control studies, and comparing two diagnostic tests on the same patients.

Where these figures come from

Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.