Chi-Square Calculator

Pearson chi-square hub: goodness-of-fit for one categorical variable or test of independence on a contingency table, with p-value and step-by-step working.

Enter values separated by commas or spaces

Enter values separated by commas or spaces; must match observed length and total

Choose the right chi-square test

Goodness-of-fit compares one row of counts to a model. Independence compares two categorical variables in an r×c table. For expected-count options and G statistic, use goodness-of-fit calculator or Fisher exact for 2×2 tables with small counts.

χ² = Σ (O − E)² / E

Worked example: fair die (goodness of fit)

Observed 5, 8, 9, 8, 10, 20 vs expected 10 each: χ² = 13.4, df = 5, p ≈ 0.0199, significant bias at α = 0.05. See chi-square test guide and chi-square critical value table.

Frequently Asked Questions

What is the difference between goodness-of-fit and independence tests?

Goodness-of-fit compares one set of observed category counts against expected counts from a theoretical model. Independence tests whether two categorical variables in a contingency table are related.

Why must expected frequencies be at least 5?

The chi-square distribution approximates the sampling distribution when expected counts are large enough; otherwise combine categories or use Fisher's exact test for 2×2 tables.

Do observed and expected totals need to match?

Yes for goodness-of-fit: expected counts must sum to the observed total. The dedicated goodness-of-fit page rejects mismatched totals instead of rescaling.

Can I run this test on means?

No. Chi-square applies to categorical counts. For continuous data use t-tests or ANOVA.

My result is significant. What should I report?

Report χ², df, N, and p (for the die example: χ²(5, N=60)=13.4, p≈0.02) and inspect which categories deviate most.

TI-84?

χ²GOF-Test for goodness of fit; χ²-Test for independence on matrix [A].

Already have χ² and df?

Use the chi-square CDF tool to convert the statistic to a p-value.

Where is Cramér's V?

On the independence test page and when you select independence mode here; it measures association strength after a significant test.

Embed This Calculator

Add this free calculator to your course page or LMS.

Adjust the height value to fit your page.