T.TEST syntax: tails and type
array1, array2: the two samples. For types 2 and 3 they may have different lengths, as here (10 and 12). tails: 2 for a two-tailed test (is there any difference?), 1 for a one-tailed test (is group 1 specifically larger, or smaller?). type: 1 = paired, 2 = two samples with equal variances, 3 = two samples with unequal variances (Welch).
The result is a p-value, not the t statistic: the probability of a difference at least this large if the true means were equal. If p is below the significance level you chose in advance, usually 0.05, the difference is called significant. In the example the Welch two-tailed p-value is 0.0028, the equal-variance version gives 0.0020, and the one-tailed Welch test gives exactly half the two-tailed value, 0.0014.
Which type to choose
Paired (type 1) when each value in one column belongs to a specific value in the other: the same employees before and after training, the same stores in two months. The test works on the differences per pair and needs equal-length ranges with pairs in the same rows. Independent groups otherwise: different calls, different customers, different visitors in an A/B test.
For independent groups, type 3 (Welch) is the safer default. It does not assume equal variances and loses very little power when the variances happen to be equal. The pooled type 2 test can give misleading p-values when the variances and the group sizes differ. Choose one-tailed tests only if the direction was fixed before looking at the data; choosing the tail after seeing the result halves the p-value unfairly.
If you prefer a full report table, the Analysis ToolPak offers the same three tests (paired, equal variances, unequal variances) and prints means, variances, t, degrees of freedom and both p-values. The T.TEST formula has the advantage that it recalculates as soon as the data change.
Worked example: call handling time, old vs new script
Handling times in minutes (yellow), 10 calls with the old script and 12 with the new one. The summary runs T.TEST three ways and rebuilds the Welch test by hand.
| A | B | C | |
|---|---|---|---|
| 1 | Call | Old script (min) | New script (min) |
| 2 | #1 | 8.2 | 7.1 |
| 3 | #2 | 7.5 | 7.8 |
| 4 | #3 | 9.1 | 6.9 |
| 5 | #4 | 8.8 | 8.4 |
| 6 | #5 | 7.9 | 7.3 |
| 7 | #6 | 10.2 | 6.5 |
| 8 | #7 | 8.5 | 7.9 |
| 9 | #8 | 9.4 | 7.6 |
| 10 | #9 | 7.7 | 8.8 |
| 11 | #10 | 8.9 | 6.8 |
| 12 | #11 | 7.2 | |
| 13 | #12 | 7.5 | |
| 14 | |||
| 15 | Summary | Value | |
| 16 | Mean old | 8.62 | |
| 17 | Mean new | 7.48 | |
| 18 | Std dev old (STDEV.S) | 0.834 | |
| 19 | Std dev new (STDEV.S) | 0.667 | |
| 20 | n old | 10 | |
| 21 | n new | 12 | |
| 22 | Difference in means (old − new) | 1.14 | |
| 23 | p-value, Welch, two-tailed: T.TEST(…,2,3) | 0.0028 | |
| 24 | p-value, equal variances: T.TEST(…,2,2) | 0.0020 | |
| 25 | p-value, Welch, one-tailed: T.TEST(…,1,3) | 0.0014 | |
| 26 | Standard error of the difference | 0.327 | |
| 27 | Welch t statistic | 3.48 | |
| 28 | Welch degrees of freedom | 17.17 | |
| 29 | Critical t at 5%, two-tailed (T.INV.2T) | 2.110 | |
| 30 | 95% CI for the difference, lower | 0.45 | |
| 31 | 95% CI for the difference, upper | 1.83 | |
| 32 | Decision at α = 5% | Significant | |
- C23
=T.TEST(B2:B11,C2:C13,2,3)Two-tailed Welch t-test - C24
=T.TEST(B2:B11,C2:C13,2,2)Two-tailed, equal variances - C25
=T.TEST(B2:B11,C2:C13,1,3)One-tailed Welch t-test - C26
=SQRT(C18^2/C20+C19^2/C21)Standard error of the difference - C27
=C22/C26Welch t statistic - C28
=C26^4/((C18^2/C20)^2/(C20-1)+(C19^2/C21)^2/(C21-1))Welch–Satterthwaite degrees of freedom - C29
=T.INV.2T(0.05,C28)Critical t, df truncated - C30
=C22-C29*C26Lower 95% confidence limit
Fictional call-centre data. Significance at α = 5%, two-tailed.
The Welch t-test by hand
To see what T.TEST does, rebuild it. 1. Means and sample standard deviations with AVERAGE and STDEV.S: 8.62 and 0.834 for the old script, 7.48 and 0.667 for the new one. 2. Standard error of the difference: =SQRT(C18^2/C20+C19^2/C21) = √(0.834²/10 + 0.667²/12) = 0.327. 3. t = difference ÷ standard error = 1.137 ÷ 0.327 = 3.48. 4. Welch degrees of freedom with the Welch–Satterthwaite formula: 17.17.
5. Critical value: =T.INV.2T(0.05,C28) = 2.110. Because |t| = 3.48 is larger than 2.110, the result is significant at 5%, matching the p-value. Note that T.INV.2T and T.DIST.2T truncate the degrees of freedom to a whole number (17), so a p-value calculated by hand with T.DIST.2T can differ slightly in the last digits from T.TEST. 6. Confidence interval: difference ± critical t × standard error = 1.137 ± 2.110 × 0.327, from 0.45 to 1.83 minutes. The interval excludes zero, which is the same conclusion seen another way.
Reading the result correctly
A small p-value says the difference is unlikely to be pure noise; it does not say the difference is large or important. Always report the size of the effect too, here 1.14 minutes per call or about 13%, with its confidence interval. With very large samples even trivial differences become significant, and with very small ones real differences can be missed.
The t-test assumes independent observations and roughly normal means. With ten or more values per group and no extreme outliers, the means are usually close enough to normal. For heavily skewed data or ratings on a short scale, compare with the Mann-Whitney U test; for three or more groups use one-way ANOVA instead of many pairwise t-tests. To plan how many observations you need before a test, see A/B test sample size.
Common mistakes
- Reading T.TEST as the t statistic. T.TEST returns the p-value. Calculate t separately if you need it.
- Using type 1 for independent groups. A paired test needs real pairs. With different people or calls in each group, use type 3.
- Choosing one tail after seeing the data. It halves the p-value. Decide the direction before the test.
- Defaulting to equal variances. Type 2 can mislead when group sizes and spreads differ. Welch is safer.
- Reporting only p. Add the difference in means and its confidence interval so readers see the size of the effect.
- Running many t-tests on many groups. Each extra test raises the chance of a false positive. Use ANOVA or correct the significance level.
Frequently asked questions
How do I do a t-test in Excel?
Use =T.TEST(range1, range2, tails, type). For two independent groups and a two-sided question, =T.TEST(A2:A11, B2:B13, 2, 3) runs a Welch t-test and returns the p-value.
What do tails and type mean in T.TEST?
Tails is 1 for a one-tailed and 2 for a two-tailed test. Type is 1 for paired data, 2 for two samples with equal variances and 3 for two samples with unequal variances.
How do I interpret the T.TEST result?
It is a p-value. If it is below your significance level, usually 0.05, the difference between the means is statistically significant. It does not tell you how large the difference is.
Should I use a t-test with equal or unequal variances?
For independent groups the unequal-variance Welch test (type 3) is a safe default. It stays valid when the variances differ and loses very little when they are equal.
How do I get the t statistic in Excel?
Calculate it from the means, standard deviations and counts: for Welch, t = (mean1 - mean2) / SQRT(sd1^2/n1 + sd2^2/n2). The Analysis ToolPak's t-test tools also print it.