Contact

T.TEST in Excel: Compare Samples With a Deliberate t-Test Design

Statistical Intermediate Microsoft Excel

Use Excel T.TEST with paired, pooled or Welch designs, audit full sample calculations and understand its magnitude-based one-tail convention.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: with 8, 9, 11, 12, 14, 15 in A2:A7 and 4, 8, 8, 9, 9, 10 in B2:B7, =T.TEST(A2:A7,B2:B7,2,1) has independent paired two-sided probability 0.0024060693.

Syntax and design options

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

All arguments are required. The first two are data ranges. tails is one or two. type=1 is paired, type=2 is two independent samples with equal variances, and type=3 is two independent samples with unequal variances, commonly called the Welch design.

Choose the design from how the observations were obtained and the justified assumptions. Equal list lengths do not create meaningful pairing. Selecting the smallest output after trying every type is not a valid design-selection rule.

Microsoft explicitly states that T.TEST uses a nonnegative t statistic. Its one-tail result is therefore magnitude-based, not automatically a test of a direction encoded by the order of the two arrays.

Example 1: audit the paired calculation

Use the six paired rows in the quick answer. In C2 enter =A2-B2 and fill down. Differences are 4, 1, 3, 3, 5 and 5.

Their mean is 3.5 and sample variance is 2.3. The independent paired statistic is =3.5/SQRT(2.3/6), approximately 5.6530099716, with five degrees of freedom.

The two-tail t probability at that magnitude is 0.0024060693. The calculation uses variation in the paired differences, not a pooled variance of the two original columns treated as independent samples.

Each row must represent the intended matched pair. Sorting or shifting only one column can produce a different test without changing either column’s set of numbers.

Example 2: compare independent designs as separate illustrations

The same numeric columns have means 11.5 and 8, and sample variances 7.5 and 4.4.

If they instead represented independent samples, =T.TEST(A2:A7,B2:B7,2,2) would have independent pooled-variance target 0.0322514999. The statistic is 2.4852506087 with ten degrees.

The Welch formula =T.TEST(A2:A7,B2:B7,2,3) independently targets 0.0337363218. Equal sample sizes make its statistic the same here, but its effective degrees are 9.3645020500.

These comparisons illustrate different mathematical procedures. They do not justify reclassifying truly paired observations as independent or rounding Welch’s derived degrees by hand.

Advanced application: preserve direction separately

For the paired data, tails=1 has independent target 0.0012030346, half the two-tail probability. Reversing A and B reverses the signed mean difference but does not change the magnitude-based output described by Microsoft.

A prespecified directional alternative must account for whether the observed difference points in that direction. Do not automatically label the smaller tail as that directional p-value. Keep the signed mean difference and array order visible.

The p-value also does not measure effect size or practical importance. Retain the estimated difference and relevant units instead of reporting only a probability.

Advanced application: reproduce the complete official dataset

The source’s first array is 3, 4, 5, 8, 9, 1, 2, 4, 5 and the second is 6, 19, 3, 2, 14, 4, 5, 17, 1.

Put these nine pairs in E2:F10. =T.TEST(E2:E10,F2:F10,2,1) independently yields 0.1960157849, matching the displayed 0.196016.

The signed paired statistic from first-minus-second differences is approximately −1.4106912317. The two-sided probability depends on its magnitude. This makes the source example a useful check that the sign of a paired effect is separate from the returned probability.

Errors and troubleshooting

Microsoft documents #N/A when paired arrays have different numbers of data points. It says tails and type are truncated to integers, #VALUE! occurs for nonnumeric tails or type, and #NUM! occurs when tails is not one or two.

Use only the documented integer type values one through three; the dedicated remarks do not enumerate every unsupported-type or degenerate-data error. Constant paired differences and insufficient usable observations require investigation rather than replacement of an error with a guessed p-value.

The examples use complete numeric ranges. Native blank, Boolean and error-cell handling was not tested here. Statistical assumptions, dependence and outliers require separate assessment; a valid formula does not prove that populations have the same mean or that a hypothesis is true.

Availability and version history

  • Current documentation: the dedicated Microsoft reference lists Excel for Microsoft 365, Excel for Microsoft 365 for Mac, Excel 2024, Excel 2024 for Mac, Excel 2021, Excel 2021 for Mac, Excel 2019, Excel 2016.
  • Introduced: Microsoft’s alphabetical catalog marks T.TEST as introduced in Excel 2010. Exact first build and platform-specific introduction dates remain unverified.
  • Last functioning version: unknown; a current help listing is not a last-working-build test.
  • Evidence checked: October 15, 2026. Official documentation was freshly retrieved; examples were independently calculated. No native Excel, Mac or web-client execution was performed.

References and verification

Examples use English function names and comma separators. Expected numbers are rounded independent mathematical calculations; documented error expectations are labeled as such. They are not captured Excel output. All illustrative data and policies are fictional.