Practice free

T.TEST function

T.TEST compares the means of two samples, such as before and after results, and returns the p-value directly. A small p-value, under 0.05, suggests a real difference.

Example

Read it as a sentence: compare A1:A8 with F1:F5 using two tails and type 2 (equal variance), which gives 0.100081711.

Practice this in the app

Syntax

T.TEST(array1, array2, tails, type)

array1 (required)
First sample.
array2 (required)
Second sample.
tails (required)
1 for one-tailed, 2 for two-tailed.
type (required)
1 paired, 2 equal variance, 3 unequal variance.

Returns: The p-value of the t-test.

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=T.TEST({3,4,5,8,9,1,2,4,5},{6,19,3,2,14,4,5,17,1},2,2) 0.191995887 Array constants
=T.TEST(Data!A1:A8,Data!F1:F5,2,2) 0.100081711 Two-tailed, equal variance
=T.TEST(Data!A1:A8,Data!F1:F5,1,2) 0.050040856 One-tailed
=T.TEST(Data!A1:A8,Data!F1:F5,2,3) 0.080704593 Unequal variance (type 3)
=T.TEST(Data!F1:F5,Data!G1:G5,2,1) 0.089009343 Paired (type 1) equal sizes
=T.TEST(Data!A1:A8,Data!F1:F5,2.9,2) 0.100081711 Fractional tails truncated
=T.TEST({1},{2,3},2,2) #DIV/0! One-point sample
=T.TEST(Data!A1:A8,Data!F1:F5,2,1) #N/A Paired with different sizes

The Data sheet these formulas read

A cell that starts with = holds that formula.

Watch out for

  • Paired tests need equal-sized samples.
  • A small p-value (under 0.05) suggests a real difference, not its size.

Where it works

Excel
T.TEST arrived in Excel 2010. Older versions do not have it.
Google Sheets
Same name, same behaviour for everyday use.

Part of Statistical functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .