Chi-Square Calculator (Goodness-of-Fit)
Use this tool to compute a chi-square test statistic, degrees of freedom, p-value, and critical value.
What does “chi square in calculator” mean?
When people search for chi square in calculator, they usually want one of two things: (1) a way to compute the chi-square statistic quickly, or (2) a way to get the p-value and decision for a hypothesis test without doing long manual math. This page gives you both.
The calculator above focuses on the chi-square goodness-of-fit test, where you compare observed counts against expected counts. It is common in genetics, survey analysis, quality control, and A/B-style category testing.
Core formula
For each category, compute:
(Observed − Expected)2 / Expected
Then sum all category contributions:
χ2 = Σ ((O - E)2/E)
A larger chi-square statistic means your observed results are farther from the expected pattern.
How to use this chi-square calculator
Step 1: Enter observed counts
Type counts as a comma-separated or space-separated list. Example: 12, 17, 14, 19.
Step 2: Enter expected counts (or leave blank)
If you already know the expected distribution, enter it directly. If you leave it blank, the calculator assumes all categories are equally likely.
Step 3: Set estimated parameters
If your expected probabilities were estimated from the same data, reduce degrees of freedom accordingly: df = k - 1 - m, where k is number of categories and m is number of estimated parameters.
Step 4: Click calculate
You’ll get:
- Chi-square statistic
- Degrees of freedom
- Right-tail p-value
- Critical value at your alpha
- Reject / fail-to-reject decision
Interpreting results quickly
- Small p-value (typically < 0.05): evidence against the null hypothesis.
- Large p-value: data are reasonably consistent with the expected distribution.
- Big category contribution: that category drives most of the mismatch.
Doing chi square on a handheld or graphing calculator
TI-84 style workflow (common approach)
- Enter observed counts in a list (for example, L1).
- Enter expected counts in another list (for example, L2).
- Use the built-in χ2-GOF Test menu command.
- Read statistic, p-value, and df from the output screen.
The exact menu path varies by model and OS version, but the setup logic is the same: observed list, expected list, then run the test.
Common mistakes to avoid
- Using percentages instead of counts without converting properly.
- Mismatched lengths between observed and expected lists.
- Negative or zero expected counts (not allowed).
- Forgetting to adjust df when parameters are estimated from data.
- Ignoring tiny expected counts; many analysts prefer expected counts around 5+ per category.
Short worked example
Suppose observed counts are 18, 22, 25, 35 and expected counts are 25, 25, 25, 25. The calculator computes category contributions, sums them to get χ2, then reports a p-value from the chi-square distribution with df = 3 (if no parameters estimated).
If p is below your alpha (say 0.05), you reject the idea that the categories follow the expected equal split.
Final note
This page is designed as a practical “chi square in calculator” guide: enter counts, click once, and interpret correctly. If you need a contingency-table chi-square test of independence, the same statistic family applies, but setup and degrees-of-freedom rules are slightly different.