Chi-Square Independence Test Calculator
Compute Pearson chi-square, expected counts, an approximate p-value and Cramer’s V for a contingency table.
YOUR CALCULATION
Result
—
Calculation steps
Work through one step at a time or reveal the complete calculation. The steps use your current inputs.
How to calculate
Calculate each expected cell as row total times column total divided by the grand total. Sum squared observed-minus-expected differences divided by expected, and evaluate the chi-square upper tail.
Expectedᵢⱼ=rowᵢ×columnⱼ/N; χ²=sum((O−E)²/E); df=(rows−1)(columns−1)
Worked example
For counts [10,20;20,10], all expected cells equal 15, chi-square is 6.66667 with 1 degree of freedom, and the approximate p-value is 0.00982327.
Assumptions and input details
2–10 rows and columns of nonnegative integer counts; every row and column total must be positive. Pearson test without Yates correction or Fisher exact testing. Independent observations and mutually exclusive categories are required. Any expected count below 5 is flagged because asymptotic inference may be unreliable. A small p-value is evidence against independence under the model, not the probability that independence is true, an effect size or proof of causation. No automatic multiple-test adjustment. Cramer’s V is uncorrected.
References: NIST: contingency-table independence test
Using this calculator
Can I enter my own problem?
Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.
Are the results exact?
Results use floating-point arithmetic and displayed rounding. Read the formula, assumptions and any stated data precision before interpreting the result.
Is my input uploaded?
The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.
Evaluate paired actual and forecast values with signed bias, absolute errors and explicitly defined percentage metrics.
Enter a list of numbers to calculate mean, median, modes, quartiles, population and sample standard deviation, with a frequency histogram.
Calculate exactly k, at most k and at least k successes in independent trials. Explore the binomial distribution, expected value and standard deviation.
Reserved advertising space.