Nirmion
يساعد ابحث عن أداة

MATH / CATEGORICAL STATISTICS

2x2 Chi Square Statistic Calculator

Calculate the uncorrected Pearson chi-square statistic for a two-by-two contingency table. Review the symbolic equation, substituted values, interpretation boundary, and result in one guided workspace.

  • 01 Calculated in this tab
  • 02 Values stay in this browser tab
  • 03 Use boundary

Conversion input

Known value

Filter by unit name, symbol, or code. Your current selections remain available.

Preparing the calculator...

OBSERVED VS EXPECTED / 2X2 TABLE

See which cells are driving the chi-square statistic

Use this explainer when you need to audit a 2x2 table rather than stop at one test statistic. With the reviewed default counts a = 3, b = 2, c = 15, and d = 35, the calculator returns chi-square = 9.09090909 with 1 degree of freedom. The sections below show the row totals, column totals, expected counts, and cell-by-cell contributions behind that result.

Worked default example

Entered counts
Observed counts: a = 3, b = 2, c = 15, d = 35.
Row and column totals
Top row = 5, bottom row = 5, left column = 45, right column = 55, grand total = 1.
Expected counts under independence
Expected a = 22.5, b = 27.5, c = 22.5, d = 27.5. The smallest expected count is 22.5.
2x2 shortcut formula
The calculator's direct formula path is 1 x (3 x 35 - 2 x 15)^2 / [(5)(5)(45)(55)] = 9.09090909.
Equivalent Pearson sum
The same result also appears as (3 - 22.5)^2 / 22.5 + (2 - 27.5)^2 / 27.5 + (15 - 22.5)^2 / 22.5 + (35 - 27.5)^2 / 27.5 = 9.09090909.

What to enter and how to read the result

Enter four observed counts from one 2x2 contingency table. The main result card reports the uncorrected Pearson chi-square statistic, and the first supporting metric reports the degrees of freedom, which stays 1 for every 2x2 table. This page does not label your categories, calculate a p-value, or switch to a continuity-corrected or exact test.

What the calculator actually does

Nirmion evaluates the 2x2 shortcut formula n(ad-bc)^2 / [(a+b)(c+d)(a+c)(b+d)], which is algebraically equivalent to the usual sum of (observed - expected)^2 / expected across all four cells. In the reviewed default example, the largest contributions come from cells a and c at 2.5 each, while cells b and d contribute 2.045455 each, adding to chi-square = 9.09090909.

Where this model stops helping

Use raw counts, not percentages, rates, or rounded shares. The observations should be independent, and expected counts that are small, commonly below 5, weaken this uncorrected Pearson approximation. When that happens, consider Fisher's exact test, a continuity correction, or a fuller hypothesis-test workflow outside this calculator.

Reference and next checks

The linked OpenStax section explains the general chi-square test of independence, including expected-count construction and degrees of freedom. If you want a follow-up percentage check, a standard-score comparison, or a spread measure for numeric data, continue with the related calculators below.

Read OpenStax on chi-square independence
Table row Column 1 Column 2 Row total
Top row Cell aObserved: 3Expected: 22.5Contribution: 2.5Cell bObserved: 2Expected: 27.5Contribution: 2.0454555
Bottom row Cell cObserved: 15Expected: 22.5Contribution: 2.5Cell dObserved: 35Expected: 27.5Contribution: 2.0454555
Column total 45551Grand total

Longer bars mark larger cell contributions to chi-square. In this example, cells a and c contribute more than b and d.

The table turns one statistic into an audit trail: observed counts, expected counts, marginal totals, and each cell's share of chi-square = 9.09090909.

COMMON QUESTIONS

2x2 chi-square calculator FAQs

Can I enter percentages instead of counts?

No. Enter the observed counts in each cell. Percentages or rates lose the sample size that the chi-square statistic depends on.

Why is the degrees-of-freedom value always 1 here?

A 2x2 contingency table always has (2 - 1)(2 - 1) = 1 degree of freedom. Once the row totals and column totals are fixed, only one cell count can vary freely.

When should I avoid using this result by itself?

Do not stop at this number when the data are paired, the observations are not independent, or expected counts are small. This page also does not return a p-value, Yates correction, or Fisher exact result.

Use boundary

Calculation path

Calculate the uncorrected Pearson chi-square statistic for a two-by-two contingency table. The page evaluates the displayed equation from your supplied values and presents both symbolic and substituted KaTeX working so the arithmetic can be checked.

Calculation path

chi^2=n(ad-bc)^2/[(a+b)(c+d)(a+c)(b+d)]

What you provide

What you provide

  • Cell a count, using the same scenario as the other inputs
  • Cell b count, using the same scenario as the other inputs
  • Cell c count, using the same scenario as the other inputs
  • Cell d count, using the same scenario as the other inputs

What you receive

What you receive

  • Chi-square statistic from the stated equation
  • A symbolic formula plus substituted working with your values
  • Visible assumptions, field guidance, and an authoritative learning reference

Use boundary

Choose the maximum decimal places shown. This does not increase source accuracy.

Interpret the result only when the sampling design, independence, distribution, and measurement assumptions fit the data.

Use internally consistent units and retain extra precision when carrying the result into another calculation.

Reviewed reference factors

Reviewed reference factors