The Excel T.TEST function returns the probability (p-value) associated with a Student's t-test — the chance that two data sets come from populations with the same mean.
Syntax
| Argument | Description | |
|---|---|---|
array1 | Required | The first data set. |
array2 | Required | The second data set. |
tails | Required | 1 for a one-tailed test, 2 for two-tailed. |
type | Required | 1 = paired; 2 = two-sample equal variance (homoscedastic); 3 = two-sample unequal variance (heteroscedastic). |
How to use it
T.TEST returns the p-value directly — no need to look up a t-statistic in a table. A small p (commonly below 0.05) suggests the two means differ more than chance alone would explain.
Choose type to match your design: 1 for paired (before/after on the same subjects), 2 for two independent samples with equal variance, and 3 when the two samples may have different variances. Set tails to 2 for a non-directional hypothesis.
Paired tests need equal-length arrays. For type 1 the two arrays must have the same number of points (each row is a matched pair) or Excel returns an error. Types 2 and 3 allow different sample sizes.
Try it: interactive demo
Pick a T.TEST example to see the formula and its result.
Practice workbook
Frequently asked questions
What do the tails and type arguments mean?
tails is 1 (one-tailed) or 2 (two-tailed). type selects the test: 1 = paired, 2 = two-sample equal variance, 3 = two-sample unequal variance.When should I use paired (type 1)?
How do I interpret the result?
What is the difference between type 2 and type 3?
Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class