How To T Test In Google Sheets

When it comes to statistical analysis, Google Sheets can be a handy tool. One common statistical test that often needs to be conducted is the t-test. This is a test that compares two averages (means) and tells you if they are different from each other. Despite sounding complicated, performing a t-test in Google Sheets is actually straightforward. Let’s delve right into it.

Understanding T-Test

Before we start, it is important to understand what a t-test is. A t-test compares the means of two groups to determine the likelihood that the two populations from which they were sampled have different means. Essentially, it checks whether the difference between the groups is significant or not.

Steps to Perform a T-Test in Google Sheets

Step 1: Prepare Your Data

Firstly, you need to prepare your data. Arrange your data in two columns where each column represents a group for comparison. For example, you might have two columns representing test scores for two different classes.

Step 2: Use the T.TEST Function

Google Sheets provides a function called T.TEST to perform a t-test. Here’s how to use it:

=T.TEST(range1, range2, tails, type)


  • range1 and range2 are the two data sets you want to compare.
  • tails specifies the number of distribution tails. Use 1 for a one-tailed distribution and 2 for a two-tailed distribution.
  • type is the type of t-test to perform. Use 1 for a paired t-test, 2 for a two-sample equal variance (homoscedastic) t-test, or 3 for a two-sample unequal variance (heteroscedastic) t-test.

Step 3: Interpret the Results

The T.TEST function returns the probability that you would see such a large difference in means if the two populations have the same mean (i.e., the p-value). If this value is small (typically ≤ 0.05), it indicates that the difference is statistically significant.


Let’s say we have test scores from two classrooms and we want to find out if there is a significant difference in the test scores. Here’s how we might use the T.TEST function:

=T.TEST(A2:A10, B2:B10, 2, 2)

This formula will calculate the two-tail p-value for a two-sample equal variance (homoscedastic) t-test.


And that’s it! You now know how to perform a t-test in Google Sheets, this will come in handy when you need to compare data sets for your analysis. Remember to always interpret your results with care and understanding.