In this article:

How to Do a Chi Square Test in Google Sheets (2024 Update)

May 8, 2024

How to Do a Chi Square Test in Google Sheets

The CHISQ.TEST function can be used to perform the Chi-square test easily in Google Sheets:

The syntax for the function is CHISQ.TEST(actual_range, expected_range), where:

  • actual_range is the range of observed frequencies (your data without totals).
  • expected_range is the range of expected frequencies.

Here's how you can apply it:

Step 1: Organize Your Data

First, you need to organize your data into a contingency table format. Suppose you're looking at the relationship between Gender (Male/Female) and Preference for a new product (Like/Dislike). Your table might look something like this:

chi square test google sheets

Step 2: Calculate Expected Frequencies

Before using the CHISQ.TEST function, you need to calculate the expected frequencies for each category based on your total observations. The formula for expected frequency is: (Row Total * Column Total) / Grand Total.

For example, for the "Male (Like)" category:

Row Total for Male = 50

Column Total for Like = 45

Grand Total = 100

The expected frequency for Male who like the product would be (50 * 45) / 100 = 22.5.

You'll need to calculate this for each cell in your contingency table.

chi square test in google sheets

Step 3: Perform the Chi-Square Test

Assuming observed frequencies are in B2:C3 and expected frequencies are in E2:F3, your Chi-square formula will be:

=CHISQ.TEST(B2:C3, E2:F3)

how to do a chi square test in google sheets

Press Enter to execute the formula. This will give you the chi-square test statistic.

Step 4: Interpret the Results

The result of the chi-square test will give you a p-value.

  • If the p-value is less than your chosen significance level (usually 0.05), you can reject the null hypothesis, concluding that there is a significant association between the variables.
  • If the p-value is greater than your chosen significance level, you fail to reject the null hypothesis, indicating that there is not enough evidence to suggest a significant association between the variables.

We hope that this article has helped you and given you a better understanding of how to do a chi square test in Google Sheets. If you enjoyed this article, you might also like our articles on how to use Autocrat for Google Sheets and how to combine ARRAYFORMULA with FILTER in Google Sheets.

Get Google Sheets productivity and automation tips delivered straight to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We'll email you 1-3 times a week — and never share your information.

Work less, automate more!

Use Lido to connect your spreadsheets to email, Slack, calendars, and more to automate data transfers and eliminate manual copying and pasting. View all use cases ->