Chi-Square Calculator
Calculate the chi-square statistic and p-value from observed and expected frequencies.
This tool is for informational and educational purposes only. It is not a substitute for professional financial, medical, legal, or engineering advice. See Terms of Service.
Can't find what you need?
Request a ToolHow to Use the Chi-Square Calculator
Enter observed frequencies in the first field and expected frequencies in the second, both comma-separated. The lists must be the same length. The calculator computes the chi-square statistic, degrees of freedom, and the p-value.
About This Calculator
The chi-square test measures how well observed data matches expected data. The statistic is the sum of (observed - expected)^2 / expected for each category. A large chi-square value (small p-value) indicates the observed distribution differs significantly from the expected one. It is used for goodness-of-fit tests and tests of independence.
Frequently Asked Questions
What are the assumptions of the chi-square test?
Expected frequencies should generally be at least 5 in each category. Observations must be independent. The data should be frequency counts, not percentages or means.
How do I interpret the p-value?
A p-value less than 0.05 (at the 5% significance level) means the observed data differs significantly from the expected values. You would reject the null hypothesis that the distributions are the same.
What are degrees of freedom for chi-square?
For a goodness-of-fit test, df = number of categories - 1. For a test of independence on an r x c table, df = (r-1)(c-1).