Statistics & probability

McNemar paired binary test calculator

Compare discordant matched binary outcomes using exact or explicitly corrected asymptotic McNemar conventions, with concordant counts kept separate.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Try it, understand it

Explore the result

Only discordant pairs identify change direction. Exact mode sums a two-sided conditional binomial tail; approximate modes use one chi-square degree of freedom with the selected correction convention.

Worked example comparison
ExampleOutputWhat to notice
Worked exampleDiscordant count difference b minus c8With ten positive-to-negative and two negative-to-positive pairs, the discordant difference is eight and uncorrected statistic is 64/12. The exact two-sided conditional p value is 0.038574219.
Balanced switchesDiscordant count difference b minus c0There is no observed directional imbalance.
Corrected approximationMcNemar chi-square statistic4.083333The continuity-adjusted statistic is used instead of the exact tail.

Check your understanding

Do concordant pairs change p?

Not for the conditional symmetry calculation here.

Is an independent 2×2 table appropriate?

No, the counts must describe matched pairs.

Behind the numbers

How this calculation works

Only discordant pairs identify change direction. Exact mode sums a two-sided conditional binomial tail; approximate modes use one chi-square degree of freedom with the selected correction convention.

THE FORMULAUncorrected statistic = (b − c)²/(b+c); exact test conditions on discordant total b+c with probability one half

A worked example

With ten positive-to-negative and two negative-to-positive pairs, the discordant difference is eight and uncorrected statistic is 64/12. The exact two-sided conditional p value is 0.038574219.

Good to know

Independent matched pairs required. Exact mode supports at most 2,000 discordant pairs. No discordants gives a labeled p=1 convention, not evidence of equivalence.

Use matched outcomes rather than independent groups

Each subject or unit contributes one before/after pair. A table comparing unrelated groups does not become paired merely because its rows and columns have binary labels.

Concordant pairs agree before and after. Discordant pairs switch direction, and it is the balance between those two switching counts that the symmetry test examines.

Declare the exact or approximate convention

Exact mode uses the conditional binomial distribution with the discordant total fixed. Approximate modes use a chi-square tail, with an optional absolute-difference correction reduced by one.

These conventions can differ for small discordant totals. The page labels the selected method rather than presenting one unlabeled p value as universal.

No switching information is not proof of no effect

Changing the concordant counts alone does not change this conditional p value. With no discordant pairs, the direction balance contains no information.

The p=1 convention for that degenerate case is displayed alongside an explicit explanation. It does not establish equivalence or guarantee a sufficiently precise estimate of change.

Use the result with the next measurement

The paired t test differences calculator concerns numerical within-pair measurements. Binary switching counts require their own model rather than treating a 2×2 table as continuous differences.

Independent matched pairs required. Exact mode supports at most 2,000 discordant pairs. No discordants gives a labeled p=1 convention, not evidence of equivalence.

A few questions, answered

Do concordant pairs change p?

Not for the conditional symmetry calculation here.

Is an independent 2×2 table appropriate?

No, the counts must describe matched pairs.

What does no discordance mean?

There is no switch-direction information, not demonstrated equivalence.

Find your calculator

Start typing to explore the library.