Analyze · Categorical

Contingency Table (Crosstab)

Cross-tabulates two categorical variables: counts with row and column totals, row, column or total percentages, the chi-square test of independence, Fisher's exact test on a 2×2 table, and Cramér's V.

In the menus Analyze › Categorical › Contingency Table (Crosstab)

Also searched as crosstab crosstabs cross tab cross tabulation contingency table two way table pivot table pivot

When to use it

You want to see how two categorical variables combine (a crosstab, cross-tabulation, two-way table or pivot count) and whether they are associated.

When not to: The two variables are the same people measured twice (paired data: use McNemar's test), or one of the variables is a measurement rather than a category (compare means instead).

Step by step

  1. Open it from the menu

    Click Analyze in the menu bar; under Categorical choose Contingency Table (Crosstab).

  2. Fill in the form

    Choose the columns: Rows of the table, Columns of the table, Layer (optional). The form lists only columns whose type fits each field.

  3. Check the options

    The options start at their defaults: Percentages, Alpha, Yates' continuity correction. Change one only when your question needs it.

  4. Run the analysis

    Press Run analysis. The Result Card opens on its Results tab.

What to choose in the form

Fields of the Contingency Table (Crosstab) form
Rows of the table Row Var requiredOne categorical or ordered categorical column. The row categorical variable
Columns of the table Col Var requiredOne categorical or ordered categorical column. The column categorical variable
Layer (optional) Layer VarOne categorical or ordered categorical column. Optional layer: one table per level of this variable
PercentagesWhich percentages to show beside the counts Default: row.
AlphaSignificance threshold Default: 0.05.
Yates' continuity correctionApply Yates' correction (only used for 2×2 tables) Default: on.

How to read the card

The Results tab starts with what to know first (rows left out, checks that did not pass), then the interpretation in words and the Key Results; charts and assumption checks follow further down. Learn More explains the method in plain words. Read a Result Card covers all four tabs.

A worked example

Penguins by island and species (344 birds).

Result: χ²(4) = 299.55, p < .001, Cramér's V = 0.660; row percentages: Biscoe 26.2% Adelie and 73.8% Gentoo, Dream 45.2% Adelie and 54.8% Chinstrap, Torgersen 100% Adelie.

Species and island are strongly associated: knowing the island almost tells you the species. The row percentages show how: Gentoo appear only on Biscoe and Chinstrap only on Dream.

From the Statistics Library.

The code tabs

Code gives this analysis as Python, R and MATLAB code (and SAS where the tab offers it), reading the data the way KernelStats did. Export sends the card to a report or to slides. See The Code tab.

Understand the statistics

Ask Oobi

Type one of these into Ask Oobi beside your data:

  • What share of each island's penguins belongs to each species?
  • Explain the contingency table (crosstab) in plain words.
  • What does cramer's V mean?

Last reviewed November 16, 2026.

Report an unclear step