🔒 Please log in to use tool features (fill sample / analyze / AI interpretation / export document)
ToolsChi-Square Test Calculator
Chi-Square Test Calculator OnlineFree to register, works on PC and mobile
Use it now →

Chi-Square Test: Goodness-of-Fit and Independence Online

What is the Chi-Square Test?

The chi-square test analyzes categorical data: the goodness-of-fit test checks whether observed frequencies follow a theoretical distribution or specified proportions, the independence test checks whether two categorical variables are independent in a contingency table, and the homogeneity test checks whether several populations share the same category distribution. The core statistic is χ² = Σ(Oᵢ−Eᵢ)²/Eᵢ, where O is the observed frequency and E the expected frequency under the null hypothesis; the larger χ², the more the data deviate from the hypothesis.

When to Use It

Use goodness-of-fit for a single row of categories (defect-type proportions, dice uniformity); independence for a rows-by-columns table such as defect type versus production line; and homogeneity for the same table shape when comparing populations, such as the conforming structures of three plants. The three methods share the same statistic, and the tool recognizes the data shape automatically.

How to Use It (Step by Step)

Select the test type and enter the frequencies as counts (never percentages), and the tool computes χ², degrees of freedom and p-value, outputs the expected-frequency table and standardized residuals, and adds association-strength measures such as Cramer's V or φ. Cells with a standardized residual above about 2 in absolute value are the main sources of the difference and are a good lead for improvement.

Key Formulas / Example

χ² = Σ(Oᵢ−Eᵢ)²/Eᵢ with degrees of freedom (r−1)(c−1) for tables and k−1 for goodness-of-fit. Assumptions: counts, independent observations, at least 80% of expected frequencies ≥ 5 and all ≥ 1; otherwise merge categories, increase the sample, or use Fisher's exact test. Very large samples make weak associations significant, so always check the effect size.

Use the Chi-Square Test Calculator Tool → Open the calculator online, sign in and start analysis
Frequently Asked Questions
What sample size does the chi-square test need?
At least 80% of cells should have an expected frequency of 5 or more and all cells at least 1; otherwise merge categories, increase the sample, or use Fisher's exact test.
What does a significant contingency table mean?
The row and column variables are not independent — an association exists. Its strength is measured by Cramer's V (0.1 small, 0.3 medium, 0.5 large); significant does not mean strong.
Can I use percentage data?
No — percentages must be converted back to actual counts (people, items), otherwise the expected frequencies are distorted and the test is invalid.
What about 2×2 tables?
Use φ for association strength, and Fisher's exact test when expected frequencies are small; the tool handles 2×2 tables automatically.