 # How to do a T-Test in Google Sheets

In statistics, a t-test is a location test consisting of two samples, which is used to test the assumption that two populations have the same means. The original t-test uses a complex formula that can be used to manually calculate the value of t. However, the same can also be automatically calculated in Google Sheets, using its simpler and more convenient formula:

## Syntax

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

• range1 – The first set of data (group of cells) to be considered for the t-test.
• range2 – The second set of data (group of cells) to be considered for the t-test.
• tails – Represents the number of distribution tails.
• If 1: uses a one-tailed distribution.
• If 2: uses a two-tailed distribution.
• type – Represents the type of t-test.
• If 1: a paired test is performed.
• If 2: a two-sample equal variance (homoscedastic) test is performed.
• If 3: a two-sample unequal variance (heteroscedastic) test is performed.

## Sample usage

T.TEST(A1:A5, B1:B5, 2, 1)

• The first set of data includes the group of cells ranging from A1 to A5.
• The second set of data includes the group of cells ranging from B1 to B5.
• The sample represents a paired test, using a two-tailed distribution.