T.TEST Function

Excel Functions › Statistical

Excel 2010+ Statistical

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.


Quick answer:
=T.TEST({3,4,5,8,9,1,2,4,5},{6,19,3,2,14,4,5,17,1},2,1) paired two-tailed p ≈ 0.196

Syntax

=T.TEST(array1, array2, tails, type)
ArgumentDescription
array1RequiredThe first data set.
array2RequiredThe second data set.
tailsRequired1 for a one-tailed test, 2 for two-tailed.
typeRequired1 = 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.

=T.TEST({3,4,5,8,9,1,2,4,5},{6,19,3,2,14,4,5,17,1}, 2, 1) // paired, two-tailed ≈ 0.196

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.

=T.TEST({3,4,5,8,9,1,2,4,5},{6,19,3,2,14,4,5,17,1}, 1, 1) // one-tailed ≈ 0.098

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

Live demo

Pick a T.TEST example to see the formula and its result.

Result:

Practice workbook

📊
Download the free T.TEST practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

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)?
Use paired when each value in array1 is matched to a specific value in array2 — for example the same subjects measured before and after a treatment. The arrays must be the same length.
How do I interpret the result?
It is a p-value. A small value (often below 0.05) means the difference in means is unlikely to be due to chance, so you would reject the hypothesis that the means are equal.
What is the difference between type 2 and type 3?
Type 2 (homoscedastic) assumes the two populations share the same variance; type 3 (heteroscedastic, the Welch test) does not. If you are unsure the variances match, type 3 is the safer choice.

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

Related functions: T.DIST · T.DIST.2T · T.INV · T.INV.2T · F.TEST · Z.TEST