Chi Square Calculator

Enter observed and expected counts to instantly compute the chi-square statistic, degrees of freedom, and p-value.

Use the Chi Square Calculator

Test Configuration

Leave Expected blank to assume equal distribution.

Enter your data and click Calculate to see results.

Copied!

Summary

Enter observed and expected counts to instantly compute the chi-square statistic, degrees of freedom, and p-value.

How it works

  1. Choose between Goodness-of-Fit or Independence (contingency table) mode.
  2. Enter the number of categories or table dimensions.
  3. Fill in your observed counts (and expected counts for goodness-of-fit).
  4. The calculator computes χ² = Σ (O − E)² / E across all cells.
  5. Degrees of freedom are calculated automatically from your table size.
  6. The p-value is derived from the chi-square cumulative distribution function.

Use cases

  • Test whether a die is fair by comparing rolled outcomes to expected uniform distribution.
  • Analyze survey responses to check if preferences differ by demographic group.
  • Validate genetics experiments against expected Mendelian ratios.
  • Check whether website conversion rates are independent of traffic source.
  • Assess whether observed frequency data fits a theoretical distribution.
  • Quality-control checks on manufacturing defect rates across production lines.

Frequently Asked Questions

Last updated: 2026-09-22 · Reviewed by Nham Vu