Contingency Table Calculator

Contingency Table Calculator

Create contingency tables from spreadsheet data and calculate chi-square, Fisher's exact test, odds ratios, Cramer's V, and other association measures.

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.

Table sizeTip: paste a block of counts straight from a spreadsheet.
Total
50
50
Total5050100

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 ratio0.444 (95% CI 0.200 – 0.989)
Cramér's V0.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 (symmetric / row|col / col|row)-0.200 / -0.200 / -0.200
Theil's U (symmetric / row|col / col|row)0.029 / 0.029 / 0.029

Open your data file

CSV or XLSX. Files are parsed in the browser before the workspace opens.

Drop your spreadsheet here

CSV, XLSX, or SPSS .sav · up to 50 MB

View examples

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.

Workflow

01

Upload CSV or XLSX

Open a spreadsheet or start from a sample dataset. The file is parsed in the browser.

02

Choose variables

Assign row and column variables, then add filters, weights, missing-value handling, or recodes.

03

Export the result

Review counts, percentages, statistics, charts, and optional AI interpretation before exporting.

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, Cramer's V and residuals help explain the strength and location of the association.

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

What is the difference between a crosstab and a contingency table?

They refer to 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 unweighted 2 by 2 tables. Weighted tables hide Fisher's exact test because it requires unweighted integer counts.

Can I upload raw data instead of typing a 2 by 2 table?

Yes. Upload CSV or XLSX data, then choose the row and column variables in the workspace.

Related pages