Online Tool Store Online Tool Store

Chi-Square Test Calculator

Compute a chi-square goodness-of-fit statistic, degrees of freedom, and p-value from observed vs. expected counts. Runs entirely in your browser.

🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.

Example

Chi-Square Test Calculator

Observed vs expected

Observed: 45, 30, 25 · Expected: 33.3, 33.3, 33.3

Example shown — replace it with your own observed/expected counts.

Result

χ² ≈ 6.68, df = 2, p ≈ 0.035

How it works

  1. Enter your observed counts for each category.
  2. Enter (or accept the default) expected counts per category.
  3. Get the chi-square statistic, degrees of freedom, and p-value.

The formula

The chi-square statistic sums the squared difference between observed and expected, scaled by expected:

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

FAQ

What is a chi-square test used for?

It checks whether observed category counts differ significantly from what you'd expect under a null hypothesis, commonly used for survey data and categorical comparisons.

How do I read the p-value?

A small p-value (typically under 0.05) suggests the observed differences are unlikely to be due to chance alone, so you'd reject the null hypothesis.

What are degrees of freedom here?

For a goodness-of-fit test, degrees of freedom equal the number of categories minus one — it feeds into how the chi-square statistic maps to a p-value.

What p-value counts as statistically significant?

By common convention, p < 0.05 is treated as significant, though some fields use a stricter 0.01 threshold — check what standard applies to your context before drawing conclusions.

How we compare

FeatureOnline Tool StoreStatistics software (SPSS/R)Manual formula in a spreadsheet
No software install
Instant, in-browser result Setup requiredManual
Free to use Often paid

For a quick chi-square check on a small dataset, this beats opening statistics software for one calculation.

Explore related tools

Embed this tool

Paste this on your own site — it stays free, and every file still stays in your visitor's browser, not yours or ours.