Skip to content
Advertisement
Hosinger Special Offer

Chi-Square Test Calculator

Chi-Square Test Calculator from Gizcalc helps you estimate results quickly within the Math & Statistics category.

  • Instant results
  • Charts & tables
  • Save & compare
  • Private – runs in your browser
p-value —

Sample inputs are pre-filled so you can see a result quickly. Results are estimates only and may not be accurate because prices, interest rates, taxes, fees, fuel costs, tariffs, market returns, medical costs, and local rules can change. Please verify current values before making financial, tax, legal, medical, or business decisions.

Formula used

χ² = Σ (O − E)² ÷ E

  • O = the observed count in a category
  • E = the expected count in that category
  • df = the number of categories − 1

About the Chi-Square Test Calculator

What is the Chi-Square Test Calculator?

The chi-square goodness-of-fit test checks whether observed counts in categories match what you expected. Is a die fair? Do customers prefer all four product colours equally? Do survey results match census proportions?

Enter the observed count for each category and either your expected counts or “equal for every category”. The calculator adds up each category's contribution to χ², uses k − 1 degrees of freedom and returns the p-value with a decision at your chosen significance level.

How to use the Chi-Square Test Calculator

  1. Observed Counts (separated by commas) — raw counts, not percentages. (sample: 48, 35, 15, 3)
  2. Expected Counts (sample: Use the expected counts below)
  3. Expected Counts (same order) — counts in the same order; their total should match the observed total. (sample: 50, 30, 15, 6)
  4. Significance Level (α) (sample: 0.05 (5%))
  5. Press Run Chi-Square Test (results also refresh as you type). The result card shows the p-value, along with Chi-square statistic (χ²), Degrees of freedom and Decision.

Formula used

χ² = Σ (O − E)² ÷ E

  • O = the observed count in a category
  • E = the expected count in that category
  • df = the number of categories − 1

The p-value is the upper-tail probability of the chi-square distribution with df degrees of freedom. A large χ² (small p) means the observed counts differ from the expected pattern more than chance would explain.

Worked example

These are the sample values already filled in the calculator above, and the result it returns for them:

InputSample value
Observed Counts (separated by commas)48, 35, 15, 3
Expected CountsUse the expected counts below
Expected Counts (same order)50, 30, 15, 6
Significance Level (α)0.05 (5%)
ResultValue
p-value0.491157
Chi-square statistic (χ²)2.4133
Degrees of freedom3
DecisionFail to reject H₀ (not significant at α = 0.05)

Tips for using the Chi-Square Test Calculator

  • Each expected count should be at least 5 for the test to be reliable; merge small categories if needed.
  • Always use raw counts — converting to percentages changes χ² and gives the wrong p-value.
  • The table in the results shows which categories contribute most to the difference.

Frequently asked questions

Multiply the total count by the expected proportion for each category. For 120 rolls of a fair die, each face is expected 120 × 1/6 = 20 times.

The number of categories minus one. Four categories give 3 degrees of freedom.

The observed counts are consistent with the expected distribution; there is no significant evidence of a difference.

This tool performs the goodness-of-fit test for one row of categories. A test of independence for a two-way table needs row × column expected counts and (r − 1)(c − 1) degrees of freedom.