In this article:

T-test in Google Sheets: The Ultimate Guide in 2024

t test google sheets
Source: zapier.com

What is a T Test in Google Sheets?

A t-test in Google Sheets is a statistical analysis used to compare the means of two groups and determine if they are significantly different from each other. It's particularly useful in analyzing small sample sizes. Google Sheets doesn't have a built-in function specifically named "t-test," but you can perform a t-test using other available functions.

T-Test Syntax

In Google Sheets, you can perform a t-test using the T.TEST function. The syntax for this function is as follows:

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

Here's what each part of the syntax means:

  1. range1: This is the first range of sample data.
  2. range2: This is the second range of sample data.
  3. tails: This specifies the number of tails for the test. Use 1 for a one-tailed test and 2 for a two-tailed test.
  4. type: This determines the type of t-test to perform. There are three options:
  • 1 for a paired test,
  • 2 for a two-sample equal variance (homoscedastic) test,
  • 3 for a two-sample unequal variance (heteroscedastic) test

For example, if you have two sets of data in A1:A10 and B1:B10, and you want to perform a two-tailed, two-sample equal variance t-test, you would use:

T.TEST(A1:A10, B1:B10, 2, 2)

This function will return the p-value of the t-test, which can help you determine whether the differences between the two sets of data are statistically significant.

How to do a T-test in Google Sheets

Follow these steps to perform some of the most common types of T-tests in Google Sheets.

Paired T-Test

The Paired T-Test compares two related groups, such as the same subjects before and after an intervention to see if there's a significant change.

1. Input Your Data

Input your paired data into two columns. For instance, use columns A and B for pre-test and post-test scores.

t test google sheets

2. Select an Empty Cell

Click on a cell where you want the t-test result to appear.

ttest google sheets

3. Insert the T.TEST Formula

Type `=T.TEST(A1:A10, B1:B10, 2, 1)` for a paired t-test. Adjust the cell range to match your data.

t test in google sheets

4. Interpret the Result

The cell will display the p-value. A value less than 0.05 typically indicates a significant difference.

google sheets t test

Two-Sample Equal Variance T-Test

The Two-sample equal variance t-test is used when comparing two independent groups assumed to have equal variances. This test helps determine if there's a significant difference in their means.

1. Enter Your Data

Place your two data sets in separate columns. For example, group one in column A and group two in column B.

how to do a t test in google sheets

2. Select an Empty Cell

Choose a cell for the t-test result.

how to do t test in google sheets

3. Insert the T.TEST Formula

Use `=T.TEST(A1:A10, B1:B10, 2, 2)` for equal variance. Adjust the range to your data.

t test on google sheets

4. Interpret the Result

A p-value less than 0.05 usually means the groups are significantly different.

Two-Sample Unequal Variance T-Test

The two-sample unequal variance t-test is ideal for comparing two independent groups with different variances. This test assesses if their means significantly differ from each other.

1. Enter Your Data

Input your two data sets in two columns, like columns A and B.

2. Select an Empty Cell

Click on a cell for the t-test output.

3. Insert the T.TEST Formula

Type `=T.TEST(A1:A10, B1:B10, 2, 3)` for unequal variance. Ensure the cell range is correct.

4. Interpret the Result

The displayed p-value helps determine if there's a significant difference. Less than 0.05 usually indicates significance.

We hope that you now have a better understanding of how to do a t-test in Google Sheets. If you enjoyed this article, you might also like our article on how to set up the percentile formula in Google Sheets or our article on how to translate on Google Sheets. 

Automate everything you track in spreadsheets with Lido
Learn more

Automate manual tasks with Lido

Save hours on repetitive and tedious work. Lido is a new spreadsheet that connects your spreadsheets, forms, PDFs, and email inbox.

Trigger
Action
Select trigger
When a cell value in Google Sheets changes
Check Google Sheets for today's date
When a new row is added to Google Sheets
On new Google Form submission
Send me a daily reminder
On new Typeform submission
When a cell value in database changes
Check database for today's date
When a new row is added in database
When a new HubSpot customer is created
Select action
ADDCALENDAREVENT
Creates a one- or multiple-day calendar event with optional attendees
ADDHUBSPOT
Adds an object to Hubspot
ADDSLACKCHANNEL
Create a Slack channel, and optionally add a topic or members
CALLURL
Makes any HTTP request
CREATEGOOGLEDOC
Replaces [@column_name] values in a Google Doc with the corresponding table row's values
CREATEPDF
Replaces [@column_name] values in a Google Doc with the corresponding table row's values, then export it as a PDF
FETCH
Makes any HTTP request and returns the response
INSERTROWS
Inserts given array below defined values in given worksheet
SENDGMAIL
Sends an email using your Google account
SENDOUTLOOK
Sends an email using your Microsoft Outlook account
SENDSLACK
Sends a Slack message
SENDSMS
Sends an SMS message using your Twilio account
UPDATECELL
Updates cells with given values
UPDATEHUBSPOT
Updates a property of a Hubspot object
Trigger is required
Action is required
Get started