Skip to content

Crosstab Generator

Paste two categorical columns — survey answers, groups, yes/no responses — and get a crosstab with counts and row, column and total percentages, plus an APA-style table you can copy straight into Word. Free, no sign-up, and your data never leave your browser.

Data entry

0 cases read

Percentages in the APA table

Enter some cases — each with a value for both variables — to build the table.

How to Use the Crosstab Generator

  1. 1. Enter your cases. Paste two columns from a spreadsheet, one case per line (a tab, comma or semicolon between the two values), or switch to two separate lists. Tick “The first line holds the variable names” if you copied the header row.
  2. 2. Tidy the categories. Upper and lower case are merged by default, so “yes”, “Yes” and “YES” count together. Choose the order the categories appear in — first appearance keeps Likert scales in order, alphabetical sorts them.
  3. 3. Name the variables and choose the percentages. The names go into the table title. Pick row, column or total percentages for the APA table; all three plain tables are always shown.
  4. 4. Copy. The APA table copies as formatted text for Word or Google Docs; counts copy as CSV or Markdown.

Row, Column and Total Percentages

A crosstab (also called a contingency table or two-way table) counts how many cases fall into each combination of two categorical variables. The counts are the facts; the percentages tell you what they mean. There are three ways to compute them, and the choice changes the story:

PercentageDivide each count byEach… adds to 100%Answers
RowIts row totalRowWithin each row group, how are cases split across the columns?
ColumnIts column totalColumnWithin each column category, which row groups do the cases come from?
TotalThe grand totalWhole tableWhat share of all cases is in each cell?

In the margins, the Total row of a row-percentage table shows how all cases split across the columns, and the Total column of a column-percentage table shows the split across the rows.

A good rule: put the percentages in the direction of the comparison you want to make. If your rows are groups (first-years and seniors) and you are comparing groups on an outcome (where they study), use row percentages, so every group adds to 100% and the groups are directly comparable. Column percentages answer the reverse question.

A Worked Example

Click “Try an example” to load 36 students, each with a class standing and a favourite place to study. The table is 2 × 3:

Class standingLibraryHomeCafeTotal
First-year74314
Senior59822
Total12131136

Raw counts hide the pattern because there are more seniors than first-years. Row percentages show it: 50.0% of first-years prefer the library, compared with 22.7% of seniors, while 40.9% of seniors prefer home against 28.6% of first-years. Column percentages answer a different question — 58.3% of the library users are first-years — and total percentages say that first-years in the library are 19.4% of everyone surveyed.

The next step is a test of independence. Run the same six counts through the Chi-Square Test Calculator and you get χ²(2) = 2.89, p = .235, with Cramér's V of 0.28. But two expected counts are below 5 (4.67 and 4.28), so the chi-square approximation is not reliable here; that is a cue to collect more data, merge categories, or use an exact test.

The APA Table

APA 7 asks for the table number in bold, the title in italic title case on the next line, horizontal rules only — above and below the column headings and under the last row — no vertical lines, and a note beneath explaining what the entries are. The generator follows that layout, writes each cell as n (percentage), separates the Total row with a rule, and adds a note such as “Cell entries are n (row percentage).” The table number and variable names are editable. Always check the finished table against your journal's or instructor's requirements, which may differ on decimal places or on whether to show the Total row.

Frequently Asked Questions

What is a crosstab?
A crosstab, short for cross-tabulation and also called a contingency table, is a grid that counts how many cases fall into each combination of two categorical variables. The rows are the categories of one variable, the columns are the categories of the other, and the margins hold the totals.
Should I use row or column percentages?
Use the direction in which you want to compare. If the rows are the groups you are comparing, such as treatment and control, use row percentages so that each group adds to 100%. If the columns are the groups, use column percentages. Total percentages are best for describing the sample as a whole.
How do I make a crosstab from survey data?
Copy the two columns you want from your spreadsheet and paste them in, one respondent per line. The generator counts every combination of answers. Leave out respondents with a blank in either column — the tool reports how many were skipped — or recode the blanks to a “No answer” category if you want them in the table.
How do I test whether the two variables are related?
Use a chi-square test of independence on the counts, with Cramér's V or phi as the effect size. If any expected count is below 5, or the table is 2 × 2 with small numbers, use Fisher's exact test instead. The counts table copies straight into the Chi-Square Test Calculator.
How do you format a crosstab in APA style?
Number the table in bold, put an italic title case title below it, draw rules only at the top, under the column headings and at the bottom, and report cells as n (%). A note below the table explains the percentages. Report the test of association, such as χ²(2) = 2.89, p = .235, in the text.
How many categories can a crosstab have?
The generator accepts up to 25 categories per variable. In practice, tables with more than five or six categories on a side are hard to read and produce many small cells, so group rare categories together first.

Related Tools

More in Statistics Calculators

See all Statistics Calculators