Skip to content

Chi-square test calculator and crosstab APA table

A chi-square test tells you whether two categorical variables are associated, and it is valid only when no more than 20% of cells have an expected count below 5 and none is below 1 (Cochran, 1954). Pick two variables and the tool builds the crosstab as SPSS Crosstabs does, checks the expected counts, switches to Fisher's exact test when a 2×2 table has cells that are too small, and writes the results paragraph.

  1. Upload an Excel or CSV export of your data (one row per respondent), or try the sample data.
  2. Choose the row variable (usually the independent variable), the column variable and the percentages to show.
  3. Run the test, then download the Word file or copy the tables and text.

Do the whole thesis in one place: save your data as a project and the next tools load it for you. Open Project →

1. Add your data
One row per respondent, with column names in the first row. Pick two nominal or ordinal variables (gender, year of study, uses the service or not…) to build the crosstab.

Send to your study group

When the whole group uses one tool, your numbers match when you merge chapters.

Was this tool useful? Feedback / report a bug (by email; please do not paste real data).

When to use a chi-square test of independence

Chi-square or Fisher's exact test?

The Pearson chi-square is appropriate when no more than 20% of cells have an expected count below 5 and no cell has an expected count below 1 (Cochran, 1954). The test table reports how many cells break this rule. For a 2×2 table that fails the condition, report Fisher's exact test; the tool makes this choice for you and says so in the paragraph. For larger tables, merge sparse categories (for example Year 1 with Year 2) and run the test again.

Yates' continuity correction applies only to 2×2 tables and is usually too conservative; many texts recommend reporting the Pearson chi-square or Fisher's exact test instead.

How to read the output

Reporting it in APA 7 style

Give the chi-square with its degrees of freedom and sample size, the exact p value without a leading zero, and the effect size, followed by a sentence on which groups differ. A template: “There was a statistically significant association between year of study and recruitment channel, χ²(4, N = 240) = value, p = value, Cramér's V = value.” Present the crosstab as a table with counts and percentages, and note in the table note which percentages are shown. The tool writes this paragraph from your own results, adds the references, and saves the section to the results chapter report builder.

Worked example: the built-in sample data

Click “Use sample data” to load 240 student responses with gender, year of study (Years 2 to 4), the main channel used to recruit survey respondents (Facebook groups, friends and classmates, messaging apps) and whether the student paid an incentive. Crossing year of study with recruitment channel gives a 3 × 3 table, so the tool reports the Pearson chi-square, the likelihood ratio and Cramér's V with the 3 × k benchmarks; crossing gender with paying an incentive gives a 2 × 2 table, where you also see Yates' correction, phi and Fisher's exact test.

FAQ

Can I use the chi-square test with a small sample?

Only if the expected counts meet Cochran's (1954) rule. With a 2×2 table that fails it, report Fisher's exact test; with a larger table, merge categories with few cases.

Which variable goes in the rows?

Put the independent variable (the grouping you compare, such as year of study) in the rows and show row percentages. The chi-square value itself is the same either way.

My test is significant. Which groups differ?

Look at the cells in bold: their adjusted residuals exceed 1.96 in absolute value. The paragraph names up to three cells where a group chose a category more often than expected.

I have a yes/no outcome and several predictors. What now?

A chi-square test looks at one pair of variables at a time. To estimate the effect of several predictors together, use binary logistic regression.

References

One of the free research tools of Research Corner.