T.TEST Function
Returns the p-value of a t-test comparing the means of two samples.
Category
Statistical
Available in
Excel 2010+, Microsoft 365
Returns
A number
Overview
T.TEST checks whether two sets of numbers have genuinely different averages, or whether the gap could just be chance. It returns a p-value. A p-value is the chance of seeing a difference at least this big if there were really no difference. Below 0.05 is the usual cut-off for calling a result statistically significant.
type chooses the test: 1 paired (the same items measured twice, such as stores before and after a change), 2 two independent samples with equal variance, 3 two independent samples with unequal variance (the safer choice when unsure).
Syntax
Arguments
| Argument | Required? | What it does |
|---|---|---|
| array1 | Yes | The first sample. |
| array2 | Yes | The second sample (the same size for a paired test). |
| tails | Yes | 1 for a one-sided test, 2 for two-sided. |
| type | Yes | 1 paired, 2 two-sample equal variance, 3 two-sample unequal variance. |
Examples
Example 1 — Did the redesign raise order values?
Average order value ($) at eight Northstar stores, before and after a checkout redesign.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Store | Before | After | Measure | Result |
| 2 | Store 1 | 42 | 46 | Paired p | 0.00001 |
| 3 | Store 2 | 38 | 44 | Unpaired p | 0.0046 |
| 4 | Store 3 | 45 | 49 | Avg before | 40.75 |
| 5 | Store 4 | 40 | 43 | Avg after | 45.38 |
| 6 | Store 5 | 37 | 41 | ||
| 7 | Store 6 | 44 | 48 | ||
| 8 | Store 7 | 41 | 47 | ||
| 9 | Store 8 | 39 | 45 |
Every store rose by $3–6, so the paired test is overwhelming (p ≈ 0.00001). Ignoring the pairing still gives p ≈ 0.005 — both far below 0.05.
Example 2 — Two independent groups, equal variance
If the two columns were different stores, use type 2 (or 3).
Returns about 0.0046.
Common mistakes
- It returns a p-value, not t. T.TEST gives the probability directly. For the t statistic itself, use the Analysis ToolPak or calculate it.
- #N/A A paired test (type 1) with ranges of different sizes.
- #NUM! tails isn't 1 or 2, or type isn't 1, 2 or 3.
- Significant isn't the same as important. With big samples, tiny differences become significant. Check the size of the gap as well.
Notes
- T.TEST replaces the older TTEST function.
- Related functions: T.DIST.2T, Z.TEST, F.TEST, CONFIDENCE.T.

Author
Kyle Stott
Certified Microsoft Excel Expert
Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.