=CHITEST(observed_range, expected_range)One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.
| Parameter | Required | Description |
|---|---|---|
| observed_range | Yes | The observed counts in a row, column, or table. |
| expected_range | Yes | The expected counts. Must match the size and shape of observed_range. |
CHITEST performs a chi-square test and returns its p-value. It compares the counts you recorded with the counts you would expect if there were no effect, and tells you how likely differences of that size would be by chance alone.
CHITEST is a legacy function kept for compatibility. Its modern equivalent is CHISQ.TEST, which takes the same two ranges and returns the same result. Prefer CHISQ.TEST in new sheets; use this page to understand or maintain older formulas.
You give CHITEST two ranges of the same size:
CHITEST calculates the chi-square statistic, the sum of (observed − expected)² ÷ expected over every cell, and converts it to a right-tailed p-value. Degrees of freedom are worked out from the shape of the ranges:
The result is the p-value only. CHITEST does not return the statistic itself.
Observed counts of 30 and 20 in B2:B3, with expected counts of 25 and 25 in C2:C3:
=CHITEST(B2:B3, C2:C3)The statistic is (5² ÷ 25) + (5² ÷ 25) = 2 with 1 degree of freedom, so the result is about 0.157. A 60/40 split in 50 trials is not strong evidence against an even split.
With observed counts in B2:D3 (2 rows × 3 columns), build the expected table in G2:I3 using row and column totals:
=SUM($B2:$D2) * SUM(B$2:B$3) / SUM($B$2:$D$3)Fill that formula across G2:I3, then:
=CHITEST(B2:D3, G2:I3)This returns the p-value with (2 − 1) × (3 − 1) = 2 degrees of freedom.
=CHITEST(B2:B8, ARRAYFORMULA(B2:B8*0 + SUM(B2:B8)/7))Tests whether counts for the seven days of the week are spread evenly, generating the expected counts inline.
=IF(CHITEST(B2:D3, G2:I3) < 0.05, "Related", "No evidence of a relationship")If you also want to report the chi-square statistic, calculate it alongside the p-value:
=SUMPRODUCT((B2:D3-G2:I3)^2/G2:I3)Feed it to CHISQ.DIST.RT with the degrees of freedom and you will get the same p-value that CHITEST returns.
An HR analyst maintaining an older engagement workbook finds =CHITEST(B2:D4, G2:I4). Understanding that it returns the p-value of a chi-square test of independence between department and survey response, they confirm the result matches CHISQ.TEST before modernising the sheet.
Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.
Browse our complete library of Google Sheets formula guides
Compare your options
Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.
AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.