ToolPatch

One page. One job. Done.

← Back to all tools
Statistics

Chi-Square GOF Calculator

Calculate chi-square goodness-of-fit statistic from observed vs expected counts.

Last validated: 2026-02-14

Chi-Square Goodness-of-Fit Calculator tests whether observed categorical counts match an expected distribution. Observed counts are the frequencies actually collected, while expected counts come from a theory, historical ratio, model, or stated probability distribution. The chi-square statistic sums the squared differences between observed and expected counts after scaling by expected counts, so larger discrepancies contribute more evidence against the model. Degrees of freedom depend on the number of categories and any estimated parameters. The p-value describes how unusual the observed mismatch would be if the expected distribution were correct. This test is useful for categorical model checks, but expected counts should generally be large enough and observations should be independent.

Permalink

Input Pattern

Enter values in the left panel, keep units explicit, run the calculation, then copy or share the result. Invalid fields are highlighted immediately.

Chi-Square GOF Inputs

Result

Chi-square: 2.000000

df: 3

How to use this tool

  1. Enter Observed counts, Expected counts for the chi square gof calculator, keeping units, dates, or text format consistent with the form labels.
  2. Confirm sample size, ordering, and distribution assumptions before relying on the calculated result.
  3. Click "Run the tool" and review Chi-Square GOF Inputs, Result for the primary output.
  4. Check the statistical assumptions and sample context before using the result in a report or decision.

Worked Example

Auto-generated from the tool's current default or entered inputs.

Example Inputs

  • Observed: 30, 25, 20, 25
  • Expected: 25, 25, 25, 25
  • Chi square: 2.0
  • Df: 3

Expected Outputs

  • Chi square: 2
  • Df: 3

Interpretation

Confidence and limitations

Formula References

Assumptions

Explore more versions

Tailored guides for specific audiences, regions, and scenarios.

Hypothesis testing resources

Recommend statistics textbooks and data analysis courses.

Sponsored