Chi-square test calculator
Use goodness-of-fit mode for one categorical variable or independence mode for a contingency table with two categorical variables.
Use this free chi-square calculator to run a chi-square test online from a test statistic, observed and expected counts, or a contingency table. It calculates the chi-square statistic, degrees of freedom, right-tail p-value, alpha decision, expected counts, and interpretation for goodness-of-fit and independence analysis.
Choose the setup that matches your assignment. Use test-statistic mode when you already have a chi-square value and degrees of freedom, goodness-of-fit mode for observed versus expected categories, or independence mode for a contingency table.
Use this mode for a chi-square p-value calculator or a chi-square difference test after you calculate the statistic difference and df difference.
Enter counts separated by commas, spaces, tabs, or new lines.
Leave as 0 unless your course subtracts estimated parameters from degrees of freedom.
Enter observed counts only. Use one row per category and separate columns with commas, spaces, or tabs.
Need help interpreting the output? See guidance and tutoring options.
Chi-square goodness-of-fit and independence tests usually use a right-tail p-value. Match the setup, degrees of freedom, and rounding to your course instructions.
| Item | Value | Contribution |
|---|---|---|
| Calculate a chi-square result to view details. | ||
Get help choosing the test, reviewing expected counts, checking assumptions, or explaining the result in context.
Mention chi-square in your request and include the test type, what you have tried, relevant counts or anonymized output, and your deadline. For tutoring, add your time zone and preferred times. We confirm the scope, availability, and price before work begins.
Working with SPSS output? Start with our guide to reading SPSS output. For help choosing a test, explore hypothesis testing guidance.
Choose from three tasks: find a p-value from a chi-square statistic, compare observed and expected category counts, or test association in a contingency table.
Use goodness-of-fit mode for one categorical variable or independence mode for a contingency table with two categorical variables.
The output includes the chi-square statistic, degrees of freedom, p-value, alpha decision, and expected-count details.
Use statistic mode when your software or formula already gives the chi-square value and degrees of freedom.
For nested models, enter the difference in chi-square statistics and the difference in degrees of freedom in statistic mode.
Enter a chi-square statistic and degrees of freedom to calculate the right-tail p-value.
Paste observed and expected counts to calculate the chi-square statistic, p-value, and decision.
Paste a contingency table to calculate expected counts, degrees of freedom, p-value, and interpretation.
Review the method, statistic, degrees of freedom, alpha decision, and short explanation together.
The basic chi-square contribution is (observed - expected)^2 / expected. The calculator adds those contributions across categories or table cells and then uses the matching degrees of freedom.
| Test type | Degrees of freedom | Use when |
|---|---|---|
| Goodness of fit | categories - 1 - estimated parameters | You compare observed counts with expected counts for one categorical variable. |
| Independence | (rows - 1) * (columns - 1) | You test whether two categorical variables are associated. |
| Difference test | df larger model - df smaller model | You compare nested model outputs after calculating the chi-square difference. |
It calculates chi-square p-values from a test statistic, goodness-of-fit results from observed and expected counts, and independence-test results from a contingency table.
Yes. You can calculate a chi-square test online by entering a chi-square statistic, observed and expected counts, or a contingency table.
A larger chi-square statistic means the observed counts are farther from the expected counts, so common chi-square goodness-of-fit and independence tests use the right tail.
Enter each observed count and the matching expected count. The calculator adds (observed - expected)^2 / expected across categories and uses degrees of freedom equal to categories minus one minus estimated parameters.
Paste the contingency table of observed counts. The calculator computes expected counts from row totals and column totals, then adds each cell contribution.
Report the chi-square statistic, degrees of freedom, p-value, alpha level, decision, and a conclusion in the context of the variables or categories.
For nested-model comparisons, first calculate the difference between the two chi-square statistics and the difference between their degrees of freedom in your software output. Then use the test-statistic mode with those difference values.
Expected counts are the counts predicted under the null hypothesis. In an independence test, they come from row total times column total divided by the grand total.
Use this calculator to check chi-square computations, compare software output, and prepare tutoring questions. For graded work, follow your course rules and explain the method used.
Share your question, what you have tried, and your deadline. We’ll confirm the scope, availability, and price before work begins.
Request Statistics Guidance →