Skip to main content
MedCalc
Mail a PDF copy of this page to:
(Your email address will not be added to a mailing list)
working

Two-way Chi-squared calculator

Use the two-way Chi-squared test to evaluate the relationship between two classification factors (e.g. gender and profession).

 

Classification A - number of levels:
Classification B - number of levels:
 Cat. B.1Cat. B.2
Cat. A.1
Cat. A.2
Chi-squared test for trend

Required input

First, select the number of different categories for the two classification factors.

Next, enter the number of cases for each pair of categories.

Optionally, you can select a Chi-squared test for trend. The Cochran-Armitage test for trend (Cochran, 1954; Armitage, 1955) provides a more powerful test than the unordered test, but this test is only applicable if your classification table has 2 columns and 3 or more rows (or 2 rows and 3 or more columns), and if the data originate from ordered categories.

Interpretation

The results section contains the Chi-squared value, the Degrees of Freedom and associated P-value.

If the calculated P-value is small (<0.05), then there is a statistically significant relationship between the two classifications.

Start using MedCalc on your desktop today

Join thousands of researchers who trust MedCalc for precision and speed. Get started for as little as per year, or choose our popular lifetime license for and never worry about renewals again. Order information

Literature

  • Armitage P (1955) Tests for linear trends in proportions and frequencies. Biometrics 11:375-386.
  • Cochran WG (1954) Some methods for strengthening the common chi-squared tests. Biometrics 10:417-451.

How to cite this page

  • MedCalc Software Ltd. Two-way Chi-squared test. https://www.medcalc.org/en/calc/chisquared-2way.php (Version 23.5.5; accessed May 15, 2026)

Other free statistical calculators

See also