Roboculator
Online CalculatorsCategoriesDate & EventsNews
Get Started
Online CalculatorsCategoriesDate & EventsNewsGet Started
Roboculator

Smart calculators for every challenge. Free, fast, and private.

Categories

  • Finance
  • Health
  • Math
  • Construction
  • Conversion
  • Everyday Life

Popular Tools

  • Date & Events
  • Loan Calculator
  • BMI Calculator
  • Percentage Calc
  • Latest News
  • Search All

Resources

  • Glossary
  • Topic Tags
  • News & Insights

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  • Editorial Policy
  • Disclaimer
© 2026 Roboculator. All rights reserved.
Roboculator

roboculator.com

  1. Home
  2. /Statistics
  3. /Statistical Inference & Hypothesis Testing
  4. /McNemar's Test Calculator

McNemar's Test Calculator

Calculator

Results

Total pairs

90

Discordant pairs

20

Positive rate before

0.6111

Positive rate after

0.5

Rate change (after - before)

-0.1111

Discordant balance (c - b)

-10

Net change share among discordant pairs

-0.5

McNemar chi-square (uncorrected)

5

McNemar chi-square (continuity corrected)

4.05

Results

Total pairs

90

Discordant pairs

20

Positive rate before

0.6111

Positive rate after

0.5

Rate change (after - before)

-0.1111

Discordant balance (c - b)

-10

Net change share among discordant pairs

-0.5

McNemar chi-square (uncorrected)

5

McNemar chi-square (continuity corrected)

4.05

The McNemar's Test Calculator analyzes paired nominal data to test whether the row and column marginal frequencies are equal — essentially testing for a change in proportions for matched pairs. This test is commonly used in before-after studies, matched case-control designs, and diagnostic test comparisons on the same subjects.

Enter the four cells of your 2×2 matched-pairs table: concordant pairs (both positive or both negative) and discordant pairs (changes between conditions). The calculator computes both the corrected and uncorrected McNemar chi-square statistics.

Visual Analysis

How It Works

McNemar's test focuses on the discordant pairs — cases where the two measurements disagree. In a before/after design:

After +After −
Before +ab
Before −cd

The null hypothesis is that the probability of changing from + to − equals the probability of changing from − to +, i.e., P(b) = P(c). The test statistic with continuity correction is:

$$\chi^2 = \frac{(|b - c| - 1)^2}{b + c}$$

Without continuity correction:

$$\chi^2 = \frac{(b - c)^2}{b + c}$$

This statistic follows a chi-square distribution with 1 degree of freedom under the null hypothesis. The continuity correction (subtracting 1 from |b − c|) improves the chi-square approximation for small discordant counts. For very small discordant totals (b + c < 25), an exact binomial test is preferable.

Only the discordant pairs (b and c) contribute information about the change — concordant pairs (a and d) provide no evidence about differential change rates.

Understanding Your Results

Interpreting McNemar's test results:

  • Chi-Square Statistic: Compare to 3.841 (critical value at α = 0.05, df = 1). If χ² > 3.841, conclude that the proportions differ significantly between the two conditions.
  • Discordant Pairs: The test only uses discordant pairs (b and c). If the total discordant count is very small (< 10), prefer the exact binomial test over the chi-square approximation.
  • Proportion Difference: Shows the direction and magnitude of change. A positive difference means the proportion decreased from before to after (more b than c).
  • Corrected vs. Uncorrected: The corrected version is more conservative. For larger samples (b + c > 25), both versions give similar results.

Worked Examples

Treatment Before/After Study

Inputs

a40
b15
c5
d30

Results

chi square4.05
chi square uncorr5
discordant total20
prop diff0.1111

90 patients tested before and after treatment. 15 improved → worsened, 5 worsened → improved. χ² = 4.05 > 3.841, indicating a significant change in proportions.

Diagnostic Test Comparison

Inputs

a25
b8
c10
d57

Results

chi square0.0556
chi square uncorr0.2222
discordant total18
prop diff-0.02

Two diagnostic tests on same patients. 8 vs 10 discordant — χ² = 0.056 << 3.841, no significant difference between the tests' positivity rates.

Frequently Asked Questions

Use McNemar's test when: (1) You have paired or matched binary data, (2) The same subjects are measured at two time points (before/after), (3) Two diagnostic tests are compared on the same subjects, or (4) Matched case-control data need to be analyzed. The key requirement is that the data are dependent (paired), not independent.

Concordant pairs (both + or both −) provide no information about whether the marginal proportions differ. Only discordant pairs (b and c) contain information about the direction and extent of change. If b = c, the marginal proportions are exactly equal regardless of the concordant pair counts. This is analogous to how a paired t-test uses only the differences, not the original values.

The continuity correction subtracts 1 from |b − c| before squaring, compensating for using a continuous distribution to approximate a discrete statistic. Use it when the total number of discordant pairs is small (< 25). For larger discordant totals, the correction has minimal effect. Some statisticians always use the uncorrected version and rely on exact tests for small samples.

When b + c < 25 (or especially < 10), the chi-square approximation is unreliable. Use the exact binomial test instead: under H₀, b follows a Binomial(b+c, 0.5) distribution. Compute the two-sided p-value as the probability of observing b or a more extreme value under this binomial distribution.

McNemar's test is essentially a sign test applied to binary data. The sign test counts how many paired differences are positive vs. negative and tests whether the signs are equally likely. McNemar's test does the same for binary outcomes — counting b (changed in one direction) vs. c (changed in the other direction).

Yes. The Stuart-Maxwell test and Bhapkar's test generalize McNemar's test to k×k tables with more than two categories. For ordered categories, the sign test for matched pairs can be applied. These extensions test whether the marginal distributions differ across multiple paired categorical outcomes.

Sources & Methodology

McNemar, Q. (1947). Note on the Sampling Error of the Difference Between Correlated Proportions or Percentages. Psychometrika, 12(2), 153-157. | Agresti, A. (2013). Categorical Data Analysis, 3rd Edition. Wiley. | Lachin, J.M. (2011). Biostatistical Methods, 2nd Edition. Wiley.
R

Roboculator Team

The Roboculator Team explains calculations, planning tools, and practical formulas in clear language for real-life situations.

How helpful was this calculator?

Be the first to rate!

Related Calculators

P-Value Calculator

Statistical Inference & Hypothesis Testing

Confidence Interval Calculator

Statistical Inference & Hypothesis Testing

Margin of Error Calculator

Statistical Inference & Hypothesis Testing

Sample Size Calculator

Statistical Inference & Hypothesis Testing

Critical Value Calculator

Statistical Inference & Hypothesis Testing

Z-Test Calculator

Statistical Inference & Hypothesis Testing