TTEST function
Returns the probability associated with a Student's tTest. Use TTEST to determine whether two samples are likely to have come from the same two underlying populations that have the same mean.
Important This function has been replaced with one or more new functions that may provide improved accuracy and whose names better reflect their usage. This function is still available for compatibility with earlier versions of Excel. However, if backward compatibility is not required, you should consider using the new functions from now on, because they more accurately describe their functionality.
For more information about the new function, see T.TEST function.
Syntax
TTEST(array1,array2,tails,type)
The TTEST function syntax has the following arguments:

Array1 Required. The first data set.

Array2 Required. The second data set.

Tails Required. Specifies the number of distribution tails. If tails = 1, TTEST uses the onetailed distribution. If tails = 2, TTEST uses the twotailed distribution.

Type Required. The kind of tTest to perform.
If type equals 
This test is performed 
1 
Paired 
2 
Twosample equal variance (homoscedastic) 
3 
Twosample unequal variance (heteroscedastic) 
Remarks

If array1 and array2 have a different number of data points, and type = 1 (paired), TTEST returns the #N/A error value.

The tails and type arguments are truncated to integers.

If tails or type is nonnumeric, TTEST returns the #VALUE! error value.

If tails is any value other than 1 or 2, TTEST returns the #NUM! error value.

TTEST uses the data in array1 and array2 to compute a nonnegative tstatistic. If tails=1, TTEST returns the probability of a higher value of the tstatistic under the assumption that array1 and array2 are samples from populations with the same mean. The value returned by TTEST when tails=2 is double that returned when tails=1 and corresponds to the probability of a higher absolute value of the tstatistic under the “same population means” assumption.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How do I copy an example?

Select the example in this article.
Important Do not select the row or column headers.
Selecting an example from Help

Press CTRL+C.

In Excel, create a blank workbook or worksheet.

In the worksheet, select cell A1, and press CTRL+V.
Important For the example to work properly, you must paste it into cell A1 of the worksheet.

To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.
After you copy the example to a blank worksheet, you can adapt it to suit your needs.

