How to use this calculator
For goodness of fit, enter observed counts and pre-specified category probabilities. For independence, enter table rows.
Formula and method
χ² = Σ(O−E)²/E. Expected table cell = row total × column total / grand total.
Worked example
Observed 25,35,40 with expected probabilities .25,.35,.40 gives χ²=0 and p=1.
Assumptions and supported scope
Pearson asymptotic tests only, 2–50 goodness-of-fit cells or 2–20 rows/columns. No exact test, Yates correction, structural zero handling or fitted-model adjustment beyond user-specified parameter count.
Method references
Method and worked example checked against the calculator implementation. About our methods · Report a correction