T.TEST
TheT.TEST
function calculates the probability associated with a Student's ttest. This function is commonly used in statistics to determine whether two samples are likely to have come from the same two underlying populations that have the same mean. It returns the probability that the two samples are different. The function assumes that the two samples are independent of each other and have equal variances.
 How to use
T.TEST
formula?  Examples of using
T.TEST
formula T.TEST
formula not working? Similar formulas to
T.TEST
Usage
Use the T.TEST
formula with the syntax shown below, it has 3 required parameters and 1 optional parameter:
 range1 (required):
The first range of data to compare.  range2 (required):
The second range of data to compare.  tails (required):
The number of tails to use in the calculation. Either 1 (onetailed) or 2 (twotailed).  type (optional):
The type of ttest to use. Either 1 (paired) or 2 (unpaired). If omitted, defaults to 2.
Examples
Here are a few example use cases that explain how to use theT.TEST
formula in Google Sheets.
Comparing the means of two samples
Suppose you have two sets of data and you want to determine whether their means are significantly different. You can use the T.TEST
function to calculate the probability that the two samples are different. If the resulting probability is less than your chosen significance level (usually 0.05), you can reject the null hypothesis that the two samples have the same mean.
Determining the significance of a correlation
You can use the T.TEST
function to determine whether a correlation coefficient is significantly different from zero. To do this, you first calculate the correlation coefficient using the CORREL
function and then use the T.TEST
function with the appropriate degrees of freedom to calculate the probability that the correlation coefficient is different from zero.
Testing for statistical outliers
You can use the T.TEST
function to test for statistical outliers in a dataset. To do this, you first calculate the mean and standard deviation of the dataset using the AVERAGE
and STDEV
functions, respectively. You can then use the T.TEST
function to determine whether any individual data points are significantly different from the mean.
Common Mistakes
T.TEST
not working? Here are some common mistakes people make when using the T.TEST
Google Sheets Formula:
Missing data
If any cells in the data ranges are empty or contain nonnumeric data, the T.TEST
function will return an error. Make sure all cells in the data ranges contain valid numeric data.
Incorrect tails parameter
Make sure the tails parameter is set correctly for your test. If you are doing a onetailed test, set tails to 1. If you are doing a twotailed test, set tails to 2.
Related Formulas
The following functions are similar to T.TEST
or are often used with it in a formula:

T.DIST
The
T.DIST
function returns the probability of a Student's tdistribution with a specified degrees of freedom. This function is usually used in hypothesis testing to determine the probability that a sample mean is within a specified range of values. 
T.INV
The
T.INV
function returns the inverse of the Student's tdistribution for the provided probability and degrees of freedom. This function is commonly used to calculate a critical value from the tdistribution when working with small sample sizes. 
TREND
The
TREND
formula is used to calculate future values based on historical data. It fits a straight line (using the method of least squares) to the arrays specified in theknown_data_y
andknown_data_x
parameters and then uses that line to calculate new yvalues for the array specified in thenew_data_x
parameter. Ifb
is set to TRUE, then the calculation will include the yintercept of the line. This formula is commonly used in forecasting and trend analysis. 
CORREL
The
CORREL
formula returns the correlation coefficient between two sets of data. This coefficient represents the strength of the linear relationship between the two sets of data, with values ranging from 1 (perfect negative correlation) to 1 (perfect positive correlation). 
AVERAGE
The AVERAGE function calculates the average (arithmetic mean) of the values passed to it. It is commonly used to find the average of a range of cells containing numerical data.
Learn More
You can learn more about the T.TEST
Google Sheets function on Google Support.