Contingency Table Calculator
Contingency table and cross-tabulation calculator
Type observed counts or open CSV, Excel, SPSS, Stata, SAS or JSON data, then get the cross-tabulation with row, column and total percentages, chi-square, Fisher's exact test, odds ratios, Cramér's V, and other association measures.
How results are checked
Named statistical review pending. Selected automated reference cases are published on the validation page.Calculate online — no file needed
Type or paste your observed counts. Results update live, and the link in your address bar always reproduces this exact table.
| Total | |||
|---|---|---|---|
| 50 | |||
| 50 | |||
| Total | 50 | 50 | 100 |
Chi-square (χ²)
4.00
df = 1 · p = .046 · Cramér's V = 0.20
χ²(1, N = 100) = 4.00, p = .046, V = .20
All statistics
| Pearson chi-square | χ² = 4.000, df = 1, p = .046 |
| G-test (likelihood ratio) | G = 4.027, df = 1, p = .045 |
| Chi-square with Yates' correction | χ² = 3.240, p = .072 |
| Fisher's exact test (two-sided) | p = .071 |
| Odds ratio | 0.444 (95% CI 0.200–0.989) |
| Cramér's V | 0.200 (small) |
| Phi coefficient (φ) | -0.200 |
| Contingency coefficient (C) | 0.196 |
| Lambda (symmetric / row|col / col|row) | 0.200 / 0.200 / 0.200 |
| Goodman–Kruskal gamma (γ) | -0.385 |
| Kendall's tau-b / tau-c | -0.200 / -0.200 |
| Somers' d | -0.200 / -0.200 / -0.200 |
| Theil's U | 0.029 / 0.029 / 0.029 |
Working from a data file? Run every SPSS CROSSTABS statistic (chi-square, Fisher, kappa, McNemar and more) with the SPSS crosstabs statistics guide.
Open your data file
CSV, Excel, SPSS, Stata, SAS, R, Parquet, JSON, OpenDocument, Arrow/Feather or SQLite. Files are parsed in the browser before the workspace opens.
Supported files and requirements
- CSV .csv .tsv .txt
- Excel .xlsx .xlsm .xls .xlsb
- SPSS .sav .zsav .por
- Stata .dta
- SAS .sas7bdat .xpt
- R .rds .rdata .rda
- Parquet .parquet
- JSON .json .jsonl .ndjson
- OpenDocument .ods .fods
- Arrow/Feather .arrow .feather .ipc
- SQLite .sqlite .sqlite3 .db
Optional: a matching Qualtrics .qsf file adds question wording.
Use one row per respondent's answers.
Or try a realistic sample
What you get · real output from the sample
| NPS Group | Loyal Customer(A) | New Customer(B) | Prospect(C) | At Risk(D) |
|---|---|---|---|---|
| Promoter | 56%BCD | 35%D | 26% | 19% |
| Passive | 25% | 30% | 39%AD | 23% |
| Detractor | 19% | 34%A | 35%A | 58%ABC |
| Base n= | 188 | 164 | 140 | 108 |
What this is useful for
- Analyze 2 by 2 exposure/outcome tables.
- Compare categorical distributions across groups.
- Check small-sample tables with Fisher's exact test.
- Export a table with counts, percentages, and statistical context.
- Report chi-square, p-value, degrees of freedom, and Cramér's V for two categorical variables.
Workflow
Upload your survey data
Open a CSV, Excel, SPSS, Stata, SAS or JSON file, or start from a sample dataset. The file is parsed in the browser.
Choose variables
Assign row and column variables, then add filters, missing-value handling, recodes, or a supported saved survey design.
Export the result
Review counts, percentages, statistics, and charts, then export the result or create an aggregate snapshot link for review and citation.
Contingency table analysis
A contingency table shows the joint distribution of two categorical variables. The cells contain observed frequencies, while the margins show the totals for each variable. From those counts you can calculate expected counts, chi-square statistics, residuals, and association measures.
For a 2 by 2 table, Crosstabs can show odds ratios and Fisher's exact test when the table is unweighted. For larger tables, Cramér's V and residuals help explain the strength and location of the association.
Cross-tabulation, crosstab, contingency table: one table
Cross-tabulation is the operation; a crosstab or contingency table is its result. Survey and market research teams usually say crosstab, statisticians usually say contingency table, and the counts, margins, and tests are the same.
Use cross-tabulation when both variables are categorical: region by satisfaction, segment by product preference, exposure by outcome, or department by engagement level. If one variable is continuous, bin it first or use a method for continuous outcomes such as a t-test or ANOVA.
Interpreting statistical output
A p-value answers whether the association is unlikely under independence. It does not tell you whether the association is large enough to matter. Pair the p-value with an effect size, check expected counts, and look at adjusted residuals before reporting the table.
FAQ
Is a cross-tabulation calculator the same as a contingency table calculator?
Yes. A crosstab, cross-tabulation, and contingency table are the same basic table: counts of observations across two categorical variables. Crosstab is common in survey and market research; contingency table is common in statistics.
Can this calculate Fisher's exact test?
Yes, for eligible unweighted 2 by 2 integer-frequency tables. Untyped weighted requests fail closed, while supported survey-design runs use design-aware association instead of Fisher's exact test.
Can I upload raw data instead of typing a 2 by 2 table?
Yes. Upload CSV, Excel, SPSS, Stata, SAS or JSON data, then choose the row and column variables in the workspace.