Chi-Square Test Calculator (Independence & Goodness of Fit)

Run a chi-square test of independence on a contingency table or a goodness-of-fit test on observed counts — χ², df, p-value, expected counts and Cramér's…

Results

Enter your details and click Calculate to see your results.
About This Calculator

χ² = Σ(O − E)²/E. Independence: E = row total × column total / grand total, df = (r − 1)(c − 1). Goodness of fit: df = k − 1.

Example

Example: table [10 20; 30 40] → χ² = 0.7936507937, p = 0.3729984836.

Assumptions

Expected counts should be at least 5 in most cells; for small 2×2 tables use Fisher's exact test.

Frequently Asked Questions

Can I enter percentages as expected values?

Yes — expected values are rescaled to the observed total, so ratios like 1 2 1 work.

Related Calculators

About the Author

Imran Hossain
Imran Hossain

Professional SEO, Digital Marketer Specialist

I am a Certified Google Ads Expert And Professional SEO, Digital Marketing Specialist

View full profile