Chi-Square Goodness-of-Fit Calculator
The chi-square goodness-of-fit calculator compares observed category counts with a supplied set of expected counts and reports the statistic, degrees of freedom and approximate upper-tail p-value.
How to use this calculator
- Enter observed and expected counts in matching category order. Use positive expected counts and ensure both totals agree within rounding.
- Check the units and definitions before comparing results with another source.
- Change one input at a time when comparing scenarios, and keep the reporting period and assumptions consistent.
Formula used by the chi square goodness of fit calculator
χ² = Σ((observedᵢ − expectedᵢ)²/expectedᵢ); df = categories − 1
- χ² = Σ((observedᵢ − expectedᵢ)²/expectedᵢ); df = categories − 1
- The expected counts must represent a valid model and have approximately the same total as observed counts. Small expected counts can invalidate the usual approximation.
- Inputs are checked for required values and valid ranges; displayed results are rounded for readability.
Worked examples
Worked example
Observed counts 20, 30 and 50 are compared with expected counts of about 33.33 in each of three categories.
The statistic is approximately 14.0 with 2 degrees of freedom; the upper-tail p-value is small under the stated null model.
The statistic is approximately 14.0 with 2 degrees of freedom; the upper-tail p-value is small under the stated null model.
Understanding the result
The chi-square goodness-of-fit calculator compares observed category counts with a supplied set of expected counts and reports the statistic, degrees of freedom and approximate upper-tail p-value.
The expected counts must represent a valid model and have approximately the same total as observed counts. Small expected counts can invalidate the usual approximation.
Important notes
The expected counts must represent a valid model and have approximately the same total as observed counts. Small expected counts can invalidate the usual approximation.
The result applies to the numbers and assumptions entered here; verify specifications for safety-critical or regulated uses.
Frequently asked questions
What does the p-value mean?
It describes how unusual a statistic at least this large would be under the specified null model and its assumptions.
Can this prove a cause?
No. A goodness-of-fit test evaluates compatibility with an expected distribution; it does not establish causation.
How do I use this calculator?
Enter observed and expected counts in matching category order. Use positive expected counts and ensure both totals agree within rounding.
Affiliate recommendations
Tools related to Chi-Square Goodness-of-Fit Calculator
These tools are selected for the calculator topic. The Calc Studio may earn a commission from purchases made through affiliate links.
- Growth Wise SAT & ACT prep Visit partner ↗
SAT and ACT study tools, flashcards, and preparation resources for students.
See the Affiliate Disclosure for details.
Related calculators
- Test Grade Calculator — Calculate the score needed on a final assessment to reach a target overall grade.
- Square Root Calculator — Calculate the square root of a non-negative number.
- Two-Proportion Z-Test Calculator — Compare two independent success proportions using a pooled z statistic and a two-sided normal approximation.
- 2×2 Matrix Calculator — Add, subtract and multiply 2×2 matrices and calculate each determinant with transparent row and column inputs.
- Square Footage Calculator — Calculate the area and perimeter of a rectangular room, floor, wall, or other space.
- Circle Calculator — Calculate circle area, circumference, and diameter from radius.
Related explanations
Learn the method behind the number or compare the terminology before using the calculator.
- How to Calculate Percent Error — Learn the percent error formula and how to compare an experimental value with a reference or accepted value.
- How to Calculate Percentage Change — Learn the percentage change formula, how to calculate increases and decreases, and why the original value matters.
- Percentage Change — Learn what percentage change means, how to calculate increases and decreases, and how the original value affects the result.
This page provides a calculation tool plus explanatory information so you can understand what the result means and when the underlying method may not fit your situation.