Chi Square Calculator

Test of independence, degrees of freedom and goodness-of-fit. Input your observed frequencies and expected values to find your chi-square statistic, p-value, and critical value.

Test whether observed frequencies match a hypothesized distribution. Enter your observed and expected counts below.

4
Category Observed (O) Expected (E)
Total 0 0

Test whether two categorical variables are independent using a contingency table. Enter your observed frequencies.

2
2

Look up a critical value from degrees of freedom and α, or find the p-value from a chi-square statistic.

Find Critical Value χ²crit
Find p-value from χ²
Chi-Square Critical Value Table (Right-Tail)
df \ α 0.10 0.05 0.025 0.01 0.001

Definition: What is Chi Squared?

The chi-square test (χ²) measures how much observed data deviates from what you would expect if no relationship existed — or if a specific theoretical distribution held true. It’s one of the most widely used statistical tests in research, science, and data analysis.

Unlike tests that compare means or proportions, the chi-square test works exclusively with categorical data:

  • Survey responses
  • Demographic groups
  • Product preferences
  • Usages and tendencies among a group

There are two primary applications. The goodness-of-fit test asks whether a single variable’s observed frequency distribution matches a hypothesized one — for example, whether dice rolls are truly uniform.

The test of independence asks whether two categorical variables are related — for example, whether smoking habits differ across age groups.

Both use the same underlying statistic but differ in how degrees of freedom are calculated.

The Formula / Equation

The chi-square statistic is calculated as:

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

Where O is each observed frequency, E is the corresponding expected frequency, and the summation runs across all categories or cells.

Each term measures the squared deviation between what you saw and what you predicted, normalized by the expected count. Larger differences produce larger χ² values. The degrees of freedom (df) equal k − 1 for goodness-of-fit tests, or (rows − 1)(columns − 1) for independence tests. The resulting statistic is compared against a chi-square distribution to produce a p-value.

Analysis of this Chi Square Value

Once you have your χ² statistic and p-value, interpretation follows a consistent framework.

If your p-value falls below your chosen significance level — typically α = 0.05 — you reject the null hypothesis, concluding the observed pattern is unlikely due to chance alone.

A p-value above α means you fail to reject the null…

The data is consistent with your expected distribution or with independence between variables.

Effect size matters too. A statistically significant result with a tiny Cramér’s V (close to 0) may be practically meaningless despite the low p-value — particularly in large samples where even trivial differences become detectable. Always interpret chi-square results alongside sample size, effect size, and domain context rather than treating significance as a binary verdict.

Scroll to Top