About Chi-Square Goodness of Fit Calculator
This chi-square goodness-of-fit calculator tests whether the observed counts in your categories match an expected distribution, with equal, proportional or custom expected values. It is free, needs no sign-up and runs in your browser, so nothing you enter is uploaded.
The page opens on a classic example: a die rolled 60 times that landed 5, 8, 9, 8, 10 and 20 times on its six faces. With equal expected counts of 10 the chi-square is 13.4 on 5 degrees of freedom, which is significant at the 5% level, and the contributions show that the 20 sixes drive the result.
Choose All equal for a fair-die or uniform test, Proportions for a ratio such as the 9:3:3:1 of Mendel’s peas, or Counts if you already have expected counts that add up to the observed total. If you estimated parameters from the data, enter how many, and each one takes away a degree of freedom.
How to use Chi-Square Goodness of Fit Calculator
- Choose the test: goodness of fit, independence or critical value.
- For goodness of fit, type the observed counts and choose how the expected values are given. For independence, type the counts into the table and add or remove rows and columns as needed.
- Choose a significance level, usually 0.05.
- Read the chi-square statistic, the degrees of freedom, the p-value, the critical value and, for a table, Cramér’s V.
- Check the warning about small expected counts, then open the expected counts, contributions and step-by-step working.
Features
- Goodness of fit with equal, proportional or custom expected values, and an option for estimated parameters.
- Test of independence with an editable contingency table up to 10 by 10, usable on a phone.
- Expected counts and each cell’s contribution to chi-square.
- Cramér’s V effect size with a plain-language label.
- A warning when any expected count is under 5.
- Critical value look-up for any degrees of freedom and significance level.
- A bell curve with the rejection region and statistic, and step-by-step KaTeX working.
Goodness of fit
The statistic sums the standardised squared differences over the k categories.
χ² = Σ (O_i − E_i)² / E_i, df = k − 1 − m
E_i = N × π_iWorked examples
Die: 5, 8, 9, 8, 10, 20 against equal counts gives χ² = 13.4, df = 5, p = 0.020
Wikipedia, chi-squared test, fair-die example.
Peas: 315, 108, 101, 32 against 9:3:3:1 gives χ² = 0.47, df = 3, p = 0.925
18, 22, 20, 40 against 25 each gives χ² = 12.32, df = 3, p = 0.006
Privacy: how it works
- The test is calculated by code in your own browser tab. Your counts are not sent to Ulkaa or any other server.
- There is no account and nothing is stored once you close the tab.
Tips
- Enter counts, not percentages. Percentages change the sample size and so the statistic.
- For a 2 by 2 table the test of independence with no continuity correction can be a little too liberal. Compare with Fisher’s exact test when counts are small.
- Look at the contributions to see which cells drive the result, instead of stopping at the p-value.
- Rows and columns of a table must each contain at least one non-zero count.
Frequently asked questions
Is it really free?
Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.
Do I need an account?
No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.
Does it run in my browser?
Yes. Your counts are processed by code running in your browser tab, on your own device.
Is my data uploaded?
No. Your counts are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.
What does goodness of fit test?
Whether the observed distribution of one categorical variable differs from a distribution you expected, such as equal frequencies or a genetic ratio.
Why did the p-value come out very high?
A p-value close to 1 means the observed counts are very close to the expected ones, closer than chance alone usually produces. It is not evidence of a problem by itself.
More Chi-Square Calculator pages
- Chi-Square CalculatorRun a chi-square goodness-of-fit test or a test of independence on a contingency table, with expected counts and Cramér’s V.
- Chi-Square Test of Independence CalculatorEnter a table of counts and see whether the two variables are related.
- Chi-Square Critical Value TableLook up the chi-square critical value for any degrees of freedom and significance level.