In this article:

May 8, 2024

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.

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:

**range1:**This is the first range of sample data.**range2:**This is the second range of sample data.**tails:**This specifies the number of tails for the test. Use 1 for a one-tailed test and 2 for a two-tailed test.**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.

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

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.

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

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

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

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

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.

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

Choose a cell for the t-test result.

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

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

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.

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

Click on a cell for the t-test output.

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

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.

Get Google Sheets productivity and automation tips delivered straight to your inbox

We'll email you 1-3 times a week — and never share your information.

Get your copy of our free Google Sheets automation guide!

- 27 pages of Google Sheets tips and tricks to save time
- Covers pivot tables and other advanced topics
- 100% free

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 ->