# The Excel TTEST Function

TTEST and T.TEST

In Excel 2010, the Ttest function has been renamed as the T.Test function.

Although it has been replaced, the Ttest function is still available in Excel 2010 (stored within the list of compatibility functions), for compatibility with earlier versions of Excel.

However, the Ttest function may not be available in future versions of Excel, so it is advised that you use the T.Test function if possible.

Related Function:
TDIST function

## Function Description

The Excel Ttest function calculates the probability associated with the Student's T Test, which is commonly used for identifying whether two data sets are likely to have come from the same two underlying populations with the same mean.

The syntax of the function is:

TTEST( array1, array2, tails, type )

where the function arguments are:

array1-The first data set.
array2-The second data set (must have the same length as array1).
tails-

The number of tails for the distribution. This must be either:

 1 - Uses the one-tailed distribution 2 - Uses the two-tailed distribution
type-

An integer that represents the type of t-test. This can be either:

 1 - Paired T-Test 2 - Two-sample equal variance T-Test 3 - Two-sample unequal variance T-Test

## Ttest Function Examples

AB
148
253
327
453
585
692
732
827
939
1084
1194
1257

Columns A and B of the above spreadsheet on the right contain two arrays of data.

The probability associated with the Student's paired t-test with a one-tailed distribution, for the two arrays of data can be calculated using the Excel Ttest function as follows:

=TTEST( A1:A12, B1:B12, 1, 1 )

This gives the result 0.449070689.

The probability associated with the Student's paired t-test with a two-tailed distribution, for the same two arrays of data is calculated by the formula:

=TTEST( A1:A12, B1:B12, 2, 1 )

This gives the result 0.898141379, (which is double the probability associated with the one-tailed test).

For further information and examples of the Excel Ttest function, see the Microsoft Office website.

## Excel Ttest Function Errors

If you get an error from the Excel Ttest Function, this is likely to be one of the following:

Common Errors
 #N/A - Occurs if the two supplied arrays have different lengths. #NUM! - Occurs if either:The supplied tails argument has any value other than 1 or 2orThe supplied type argument is not equal to 1, 2 or 3. #VALUE! - Occurs if either the supplied tails argument or the supplied type argument is non-numeric.