When you have two categorical variables and want to see how they relate, a crosstab is usually the first table you should build. It shows the counts in every combination of categories, and with a few extra options switched on, it also tells you whether the pattern you see is bigger than chance. This tutorial walks you through running crosstabs in SPSS, reading row and column percentages, checking expected counts, and using residuals to find the cells driving the result.
We will use one example throughout: 200 students, split by teaching method (lecture or workshop) and exam outcome (pass or fail). The question is whether the pass rate differs between the two methods.
What Is a Crosstab?
A crosstab, short for cross-tabulation or contingency table, shows the joint frequency distribution of two categorical variables. One variable forms the rows and the other forms the columns, and each cell holds the number of cases in that combination of categories.
For our example, the table has two rows (lecture, workshop) and two columns (pass, fail):
- Lecture and pass: 55 students
- Lecture and fail: 45 students
- Workshop and pass: 80 students
- Workshop and fail: 20 students
Raw counts are hard to compare when groups are different sizes. That is why SPSS lets you add percentages, expected counts, and residuals to the same table.
Use a crosstab whenever both variables are nominal or ordinal — for example, treatment group and recovery status. If either variable is continuous, a crosstab is the wrong tool; use a t-test, correlation, or regression instead.
Before You Start: Setting Up Your Data
Crosstabs need two categorical variables, each with value labels. In our example, Method is coded 1 = Lecture and 2 = Workshop, and Outcome is coded 1 = Pass and 2 = Fail. Check three things first:
- Both variables are categorical. In Variable View, Measure should say Nominal (or Ordinal) — not Scale.
- Value labels are defined. Without labels, your table shows bare numbers like 1 and 2.
- No unexpected missing values. A quick Frequencies run shows whether any cases carry values you did not plan, such as 9 for “not recorded.”
How to Run Crosstabs in SPSS: Step by Step
- Click Analyze > Descriptive Statistics > Crosstabs.
- Move one variable into the Row(s) box and the other into the Column(s) box. Put the grouping variable in the rows and the outcome in the columns. Here, Method goes in the rows and Outcome in the columns.
- Click Cells. Under Counts, tick Observed and Expected. Under Percentages, tick Row and Column. Under Residuals, tick Adjusted standardized. Click Continue.
- Click Statistics and tick Chi-square if you want a significance test alongside the table. Click Continue.
- Click OK. SPSS prints the crosstab and, if requested, the chi-square test results in the Output window.
Reading Percentages: Row, Column, and Total
Percentages are where most of the interpretation happens, but you have to know which percentage you are looking at. SPSS offers three kinds, and they answer three different questions.
Row percentages
A row percentage divides each cell by its row total. It answers: “Within this row, how are cases split across the columns?” In our example, 55% of lecture students passed and 45% failed, while 80% of workshop students passed and 20% failed. The 25-percentage-point gap between 55% and 80% is the headline finding of this table.
Column percentages
A column percentage divides each cell by its column total. It answers: “Within this column, how are cases split across the rows?” Of the 135 students who passed, 40.7% were in the lecture group and 59.3% in the workshop group. Of the 65 who failed, 69.2% were in the lecture group and 30.8% in the workshop group.
Total percentages
A total percentage divides each cell by the grand total of all cases. The 80 workshop students who passed are 40% of all 200 students. Total percentages are handy for describing the sample, but they are rarely the right basis for comparing groups, because they mix group size and outcome rate together.
The golden rule: compare percentages in the direction of your grouping variable. If your groups are in the rows, compare row percentages across rows. Comparing column percentages when your groups are in the rows is one of the most common interpretation mistakes.
Expected Counts: What Would Happen If There Were No Relationship?
The expected count is the number of cases you would see in a cell if the two variables were completely unrelated — if teaching method had nothing to do with passing. SPSS calculates it from the row and column totals: multiply the row total by the column total, then divide by the grand total.
For the lecture-and-pass cell: the row total is 100 lecture students, the column total is 135 passes, and the grand total is 200. So the expected count is (100 × 135) / 200 = 67.5. We observed 55 passes in the lecture group, 12.5 fewer than expected if method made no difference. The workshop-and-pass cell has the same expected count, but we observed 80; the two fail cells each have an expected count of 32.5.
Expected counts matter for two reasons. First, they give you a baseline for judging whether an observed count is high or low: a cell with 55 cases looks unremarkable until you know 67.5 were expected. Second, they are the basis of the chi-square test, which sums up the gaps between observed and expected counts across all cells. They also carry a practical warning: the chi-square test becomes unreliable when expected counts are too small. The standard rule is that no more than 20% of cells should have an expected count below 5, and no cell should have an expected count below 1. If your table breaks that rule, combine categories where it makes sense, or use Fisher’s exact test for a 2 × 2 table.
Residuals: Finding the Cells That Drive the Result
Percentages and expected counts tell you that a relationship exists. Residuals tell you where it lives — which specific cells are larger or smaller than expected. The one you want is the adjusted standardized residual.
- Raw residual: the observed count minus the expected count. In our example, the lecture-and-pass cell has a raw residual of 55 − 67.5 = −12.5.
- Standardized residual: the raw residual divided by the square root of the expected count. This adjusts for cell size.
- Adjusted standardized residual: the raw residual divided by an estimate of its standard error, taking the row and column proportions into account. This version follows an approximately standard normal distribution, so you can judge it against the familiar cut-offs of ±1.96 and ±2.58.
In our example, all four cells have adjusted standardized residuals of about ±3.77. The lecture-and-pass cell (−3.77) and the workshop-and-fail cell (−3.77) contain significantly fewer cases than expected. The lecture-and-fail cell (+3.77) and the workshop-and-pass cell (+3.77) contain significantly more.
How to read them in practice:
- An adjusted standardized residual beyond ±1.96 means that cell differs significantly from expectation at the 5% level; beyond ±2.58 at the 1% level.
- A positive residual means more cases than expected in that cell; a negative residual means fewer.
- In large tables, residuals point straight to the cells doing all the work.
One caution: in very large samples, even trivial differences produce large residuals, because the standard error shrinks as the sample grows. Always report the percentages alongside the residuals.
Adding the Chi-Square Test
The crosstab describes the pattern; the chi-square test of independence tells you whether the pattern is statistically significant. Tick Chi-square in the Statistics dialog, and SPSS adds a Chi-Square Tests table to the output. Read the Pearson Chi-Square row: its value, its degrees of freedom, and its p-value.
For our example, the result is χ²(1, N = 200) = 14.25, p < .001. The degrees of freedom for a crosstab are (rows − 1) × (columns − 1), so a 2 × 2 table has 1 degree of freedom. Report the chi-square result with the percentages and, for a 2 × 2 table, an effect size such as phi (φ = .27 in this example), which SPSS prints when you tick Phi and Cramer’s V in the Statistics dialog.
SPSS Syntax for Crosstabs
Everything above can be reproduced with syntax. Paste this into a syntax window, replace the variable names with your own, and run it:
CROSSTABS
/TABLES=Method BY Outcome
/FORMAT=AVALUE TABLES
/STATISTICS=CHISQ PHI
/CELLS=COUNT EXPECTED ROW COLUMN ASRESID
/COUNT ROUND CELL.The /CELLS line is the important one: COUNT gives observed counts, EXPECTED adds expected counts, ROW and COLUMN add the two percentage directions, and ASRESID adds the adjusted standardized residuals. /STATISTICS=CHISQ PHI adds the chi-square test and the phi coefficient.
Reporting in APA Style (7th ed.)
Report the result in one or two sentences in the text, with the full table in the text or an appendix. Give the chi-square value, degrees of freedom, sample size, p-value, and effect size, and describe the pattern in percentages. For our example:
“Teaching method was significantly associated with exam outcome, χ²(1, N = 200) = 14.25, p < .001, φ = .27. Students in the workshop condition passed at a higher rate (80%) than students in the lecture condition (55%). Adjusted standardized residuals showed that the workshop group had significantly more passes than expected (adjusted residual = 3.77), while the lecture group had significantly fewer (adjusted residual = −3.77).”
APA formatting notes:
- Use the Greek letter χ², italicized, with degrees of freedom in parentheses immediately after it.
- Report exact p-values when SPSS gives them, except that p-values below .001 are written as p < .001. Do not write p = .000; SPSS prints .000 only because it rounds to three decimals.
- Give percentages to a sensible precision — whole percentages are usually enough in text, one decimal place in a table.
Key Takeaways
- A crosstab shows how two categorical variables are distributed together; start with the counts, then add percentages, expected counts, and residuals to interpret the pattern.
- Compare row percentages when your groups are in the rows, and column percentages when your groups are in the columns — mixing them up is the most common interpretation error.
- Expected counts show what each cell would hold if the variables were unrelated; they are the baseline for the chi-square test and the check for whether the test is valid.
- Adjusted standardized residuals beyond ±1.96 flag the cells that differ significantly from expectation — positive means more cases than expected, negative means fewer.
- Report the chi-square result with the percentages and an effect size, and describe the pattern in plain language before quoting the test statistic.
Frequently Asked Questions
What is the difference between a crosstab and a chi-square test?
A crosstab is the table itself — the counts, percentages, and residuals that describe how two categorical variables are related. The chi-square test is a significance test you can run on that table to judge whether the pattern is larger than chance.
Should I use row percentages or column percentages?
Use the percentages that match the direction of your grouping variable. If your groups are in the rows (for example, treatment groups), compare row percentages across the rows. If your groups are in the columns, compare column percentages.
What do I do if my expected counts are too small?
Check the rule first: the chi-square test is unreliable if more than 20% of cells have expected counts below 5, or any cell has an expected count below 1. Options are to combine categories that make conceptual sense, collect more data, or switch to Fisher’s exact test for a 2 × 2 table.
How do I read adjusted standardized residuals?
Treat them like z-scores. A value beyond ±1.96 is significant at the 5% level, beyond ±2.58 at the 1% level. A positive residual means that cell has more cases than expected under independence; a negative residual means fewer.
Need this done on your data? Get a free quote → /services/