T.TEST in Excel: Compare Samples With a Deliberate t-Test Design
Compare T.TEST and legacy TTEST paired, pooled and Welch designs, tail and type selectors, truncation and magnitude-based one-tail probabilities.
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
- Microsoft T.TEST reference.
- Microsoft function catalog and introduction-marker explanation.
- Editorial testing standards.
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.
Legacy TTEST compatibility contract
=TTEST(array1,array2,tails,type) requires all four arguments. Tails is 1 or 2; type 1 is paired, 2 is independent equal-variance and 3 is independent unequal-variance. The counterpart is T.TEST. Microsoft documents truncation of tails/type, #VALUE! for nonnumeric selectors, #NUM! for unsupported tails, and #N/A for unequal paired observation counts. Its remarks do not fully enumerate unsupported-type or degenerate-data errors; valid types are only 1–3.
Original legacy example and independent check
In a fresh worksheet enter 3, 6, 9, 12 in A2:A5 and 2, 4, 6, 8 in B2:B5. =TTEST(A2:A5,B2:B5,2,1) independently targets 0.0304662917. Paired differences are 1, 2, 3, 4, with mean 2.5, sample variance 5/3 and standard error SQRT((5/3)/4). The magnitude is 3.8729833462 with three degrees; integrate both outside t tails to obtain the target. Tails=1 independently targets 0.0152331458.
Migration traps
Preserve pairing, tail count and type when changing the name. Equal list lengths do not justify treating independent samples as paired. Microsoft specifies a nonnegative statistic: reversing the arrays does not make the one-tail probability directional. Retain the signed difference separately and check a prespecified directional hypothesis rather than automatically reporting the smaller tail. Types 2 and 3 are different models, not fallback settings for an inconvenient paired result. Numeric targets use the paired-difference equation and independent t integration, not native Excel execution.
Compatibility and verification scope
Checked October 19, 2026 against the Microsoft legacy TTEST reference. Its current Applies To list includes Microsoft 365 (Windows/Mac), Excel 2024 and 2021 (Windows/Mac), 2019 and 2016. The Excel 2010 function-change reference places the renamed counterpart in that transition and retains old names for backward compatibility. This does not date the original legacy function’s introduction. Compatibility status is not retirement: no removal release or last-working build is established here. Keep old-workbook compatibility needs in view, test before migration, and do not assume identical numerical behavior across versions. This addition is a documentation review with independent calculations; it supplies no native Excel evidence.