Chi-Square Calculator
Free online chi-square calculator. Chi-square test for independence. Visualize data easily.
Chi-Square Calculator
Embed this tool
Copy and paste the code below into your website to embed this tool for free. An attribution link to The Util Box is required.
<iframe src="https://www.theutilbox.org/embed/chi-square-calculator" width="600" height="500" frameborder="0" style="border: none; max-width: 100%;" title="Free Chi-Square Calculator tool from The Util Box"></iframe> <!-- Free tool by The Util Box — https://www.theutilbox.org/tools/chi-square-calculator --> <a href="https://www.theutilbox.org/tools/chi-square-calculator">Chi-Square Calculator by The Util Box</a>
Frequently Asked Questions about Chi-Square Calculator
Chi-Square Calculator — Goodness of Fit and Test of Independence
This chi-square calculator runs two of the most-used tests in statistics. The Goodness of Fit mode asks whether your observed counts match an expected distribution, and the Test of Independence mode asks whether two variables are related. Both give you the χ² statistic, the degrees of freedom, the p-value and a plain-language verdict.
The verdict is stated at the conventional threshold: significant at α = 0.05 means you reject the null hypothesis, and not significant means you fail to reject it.
The Two Tests
| Test | What it asks | Degrees of freedom |
|---|---|---|
| Goodness of fit | Do the observed counts match the expected distribution? | n − 1 |
| Test of independence | Are the two variables associated? | (rows − 1) × (cols − 1) |
In goodness-of-fit mode you paste your observed counts and your expected counts, one per line, and the two lists must be the same length. In independence mode you fill in a contingency table of up to five rows by five columns, and the expected frequencies are computed for you from the row and column totals — and shown in a table beneath the result, which is the first thing to check.
Honest Limits
- The p-value is a numerical approximation of the chi-square upper tail, computed with a series expansion of the incomplete gamma function. It is accurate to about four decimal places in the middle of the range but loses precision in the far tail, so a very small p-value should be read as "very small" rather than as an exact figure.
- α is fixed at 0.05 and cannot be changed.
- There is no Yates' continuity correction for 2×2 tables, where the correction can meaningfully change the verdict on a small sample.
- No effect size. A significant result tells you the association is unlikely to be chance; it does not tell you how strong it is. Use Cramér's V or the effect size calculator for that.
- Goodness-of-fit mode does not check that your totals agree, which the test requires — if the observed and expected sums differ, the answer is meaningless even though it will be computed.
- Changing the table dimensions clears the cells, so set the shape before typing your data.
Related Statistics Tools
- T-Test Calculator — comparing two means, where the data is continuous rather than counted.
- Correlation Coefficient — how strongly two variables move together.
- Linear Regression — the model a relationship implies.
- Descriptive Statistics — the summary numbers you would check before testing anything.
- Frequency Distribution — the counts a goodness-of-fit test is usually run on.
- Normal Distribution — the distribution many tests assume.
- Effect Size Calculator — how large an effect actually is.
- Sample Size Calculator — how much data you need for the test to mean something.
The calculation runs entirely in your browser and works offline.