Advanced McNemar Test Calculator

Test paired proportions with exact and asymptotic methods. Review discordant counts, significance, intervals, and assumptions. Export results quickly for reports and method checks today.

Calculator Inputs

Before Positive and After Positive
Before Positive and After Negative
Before Negative and After Positive
Before Negative and After Negative

Example Data Table

This sample shows paired classifications for the same subjects measured twice.

Before \ After After Positive After Negative Row total
Before Positive 52 9 61
Before Negative 17 34 51
Column total 69 43 112

Here, the discordant cells are b = 9 and c = 17. McNemar’s test focuses on those two cells because they represent the actual paired changes.

Formula Used

Uncorrected McNemar chi-square
χ² = (b − c)² / (b + c)
Continuity-corrected McNemar chi-square
χ² = (|b − c| − 1)² / (b + c)
Exact binomial two-sided p-value
n = b + c, with success probability 0.5 under the null hypothesis.
p = 2 × Σ [ C(n, x) × 0.5ⁿ ] for x = 0 to min(b, c)
Matched-pairs odds ratio
OR = b / c
Confidence interval is computed on the log scale and exponentiated back.

McNemar’s test evaluates marginal homogeneity in a paired 2×2 table. It is best for before-after studies, matched case-control designs, and paired classifier comparisons with binary outcomes.

How to Use This Calculator

  1. Enter labels for the first and second assessments.
  2. Fill the four paired counts a, b, c, and d.
  3. Choose your primary decision method and alpha level.
  4. Select a confidence level for the matched odds ratio.
  5. Click Calculate McNemar Test.
  6. Review the p-values, odds ratio, confidence interval, and chart.
  7. Use CSV for spreadsheet work and PDF for reporting.

Frequently Asked Questions

1. What does McNemar’s test measure?

It checks whether paired binary outcomes changed symmetrically. The test ignores concordant pairs and compares only the discordant cells, b and c.

2. When should I use the exact version?

Use the exact binomial method when discordant pairs are few. It is more reliable than the asymptotic approximation for small samples.

3. Why are cells a and d not central to the test?

They are concordant pairs, so they show no change between measurements. McNemar’s logic depends on the imbalance between b and c.

4. What does the matched-pairs odds ratio mean?

It summarizes directional change. Values above 1 indicate more b transitions than c transitions, while values below 1 indicate the reverse.

5. Can I use this for independent samples?

No. McNemar’s test requires paired observations from the same subjects, matched subjects, or repeated binary classifications.

6. What if b and c are both zero?

There are no discordant pairs, so no observed change exists. The calculator returns p = 1.0000 and shows no evidence of marginal difference.

7. Should I prefer corrected or uncorrected chi-square?

The corrected version is more conservative. Many analysts prefer it for moderate samples, while the exact method remains best for small discordant counts.

8. What kind of projects commonly use this test?

It is common in diagnostic studies, pre-post interventions, usability testing, classifier comparison, and matched case-control research with binary outcomes.

Related Calculators

score test calculatorcochran q testtype one errorregression significance calculatortype two errormean comparison calculatorpoisson test calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.