Home / Science / Social sciences / Sociology and survey research / Cross-tab and chi-squareTool #747

Cross-tab and chi-square test calculator with weights, Cramér's V and Fisher's exact test (free)

Turn raw survey answers into a cross-tabulation with row, column and total percentages, then test it: Pearson chi-square, likelihood-ratio G², Cramér's V, adjusted residuals, Fisher's exact test for 2 × 2, and a design-effect correction for weighted data. Matches scipy.

Keep it one tap away for everyday use.

Bookmark Cross-tab and chi-square?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Your survey
  2. Pick 2 items
  3. Cross-tab
  4. χ² test
Nothing is uploadedWorks offline once open

Your survey data

Rows with a blank answer in either question (or a blank weight) are left out and counted. A weight column makes each person count for their weight, as survey weights do.

What it does

A cross-tabulation shows how the answers to one survey question are spread across the answers to another: for example, how people of different ages travel to work. This tool builds the table from your raw data (one row per respondent) and tests whether the two questions are related:

  • Counts and percentages: row %, column % or total %, with totals.
  • Pearson chi-square and the likelihood-ratio G² test of independence, with degrees of freedom and p-values.
  • Cramér’s V, the strength of the relationship from 0 (none) to 1.
  • Adjusted standardised residuals for every cell, marked when beyond ±1.96, so you can see which combinations are more or less common than chance.
  • For 2 × 2 tables: Yates’ continuity correction, Fisher’s exact test and the odds ratio.
  • Survey weights: weighted counts and percentages, and a chi-square corrected for the design effect of the weights.

It works well with the sample size and power calculator, the reliability and agreement and the CSV profiler and SQL playground.

How to use it

  1. Paste your data or open a CSV or Excel file: one row per respondent, one column per question, with a header row.
  2. Choose the question for the rows and the one for the columns. Columns with 2 to 50 different answers are offered.
  3. If your data has a weight column, choose it under Weight.
  4. Switch between row %, column %, total % and counts only. Download the table as CSV, or the full report as an image, PDF or Word file.

Rows with a blank answer in either question are left out and the tool says how many.

Weighted data, explained

With weights, simply running the chi-square on the weighted counts is wrong: the weighted total is not the number of people asked, and unequal weights make estimates less precise. This tool uses a simple, clearly stated correction in the spirit of Rao and Scott’s first-order adjustment. It computes the chi-square from the weighted shares as if they came from the actual number of respondents, then divides it by Kish’s design effect of the weights, deff = n Σw² / (Σw)². This handles unequal weights only. If your survey also has clusters or strata, use survey software with the full Rao-Scott correction.

Worked example (made-up data)

The sample is a made-up survey of 240 people: age group, region, main way of getting to work and a weight. Two people did not answer the transport question, so 238 are used. Age group by transport gives Pearson χ² = 22.455 with 4 degrees of freedom, p = 0.0002, G² = 24.223, and Cramér’s V = 0.217. The residuals show that people aged 18 to 34 use the bus or train more than expected (adjusted residual +3.91) and those 55 and over use it less (−3.79).

With the weight column, the design effect is 1.208 (an effective sample of about 197), and the design-adjusted χ² is 19.205, p = 0.0007.

For a 2 × 2 table such as [[3, 1], [1, 3]], Fisher’s exact two-sided p is 0.486 and the odds ratio 9.

How it was checked

Counts, expected counts, Pearson χ² (with and without Yates’ correction), G², Cramér’s V and Fisher’s exact test (two-sided and one-sided, and the odds ratio) agree with scipy, and the Pearson and adjusted residuals with statsmodels, to at least nine significant figures. The weighted correction matches an independent numpy calculation.

Frequently asked questions

When should I use Fisher’s exact test? When any expected count in a 2 × 2 table is below 5; the tool warns you. For bigger tables with small cells, merge categories.

What is a big Cramér’s V? It depends on the table size. The tool labels it negligible, small, medium or large using Cohen’s guidelines adjusted for the number of categories.

Is my survey data uploaded? No. Everything runs in your browser and works offline.

Where the numbers come from

  • Formulas: Pearson (1900), the likelihood-ratio G² test, Cramér (1946), Haberman (1973) adjusted residuals, Fisher (1922) exact test, Yates (1934) correction, Kish (1965) design effect for weights, and the first-order idea of Rao and Scott (1981). Example data made up.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Related tools

CSV profiler and SQL playground #38 Open CSV, TSV or Excel files and get a profile of every column: type, missing values, distinct values, range and most common values. Then query them with SQL (SQLite), join files, and download the result. Nothing is uploaded. Reliability and agreement #40 Check a questionnaire scale with Cronbach's alpha and item statistics, or rater agreement with Cohen's kappa (weighted too), Fleiss' kappa and all six intraclass correlations with 95 % intervals. Matches R's psych package. Sample size and power calculator #32 How many subjects, samples or survey responses do you need? Sample size for comparing two means, paired data, two proportions, or a survey's margin of error, with power curves. Matches R and G*Power. Likert chart #748 Turn agree/disagree survey answers into a diverging stacked bar chart centred on the neutral answer, sorted by agreement, with % agree, medians and means per statement. Paste raw answers or counts; download PNG, SVG and CSV. Social network analysis #749 Turn 'name your friends' survey answers or an edge list into a network: in- and out-degree, betweenness, closeness and eigenvector centrality, density, reciprocity, components, Louvain communities and a force-directed drawing. Matches networkx; nothing leaves your browser. Qualitative coding #750 Open your own interview transcripts or texts, tag passages with codes from a colour-coded code book, and see counts per document, a code co-occurrence matrix and every passage for a code. Export CSV or JSON. Nothing is uploaded.