T.TEST in Google Sheets: Paired and Two-Sample Tests
Use T.TEST in Google Sheets with the correct tails and test type, check paired differences, and avoid treating a one-tailed magnitude probability as directional evidence.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: for A2:A6 = 10, 12, 14, 16, 18 and B2:B6 = 11, 14, 15, 19, 21, =T.TEST(A2:A6,B2:B6,2,1) has expected result 0.0110564934. It performs a paired, two-tailed test on the five aligned pairs.
Syntax and test choices
=T.TEST(range1, range2, tails, type)
The Google T.TEST reference documents these numeric selectors:
| Argument | Value | Meaning |
|---|---|---|
| tails | 1 | One-tail probability |
| tails | 2 | Two-tail probability |
| type | 1 | Paired test |
| type | 2 | Independent two-sample test assuming equal variances |
| type | 3 | Independent two-sample test allowing unequal variances |
All four arguments are supplied. Google states that the two ranges must have the same number of data points; the examples respect that documented constraint for every type. General statistical software may support other shapes, but that does not establish Google’s native behavior.
Google also explicitly allows the spelling TTEST. The result is a probability, not the t statistic or the difference in means.
Worked example: aligned repeated measurements
Enter these synthetic measurements from the same five items:
| Row | A: before | B: after | B minus A |
|---|---|---|---|
| 2 | 10 | 11 | 1 |
| 3 | 12 | 14 | 2 |
| 4 | 14 | 15 | 1 |
| 5 | 16 | 19 | 3 |
| 6 | 18 | 21 | 3 |
In C2, enter =B2-A2 and fill down. The mean difference is 2, the sample standard deviation of differences is 1, and there are 5 pairs.
Use:
=T.TEST(A2:A6,B2:B6,2,1)
Expected p-value: 0.0110564934. Pairing means row 2 in one range corresponds to row 2 in the other. Sorting the columns independently would break those relationships even though each column still contains the same values.
Independent calculation
For the differences, the t-statistic magnitude is:
=ABS(AVERAGE(C2:C6))/(STDEV.S(C2:C6)/SQRT(COUNT(C2:C6)))
Expected result: 4.4721359550. With 4 degrees of freedom, the combined two-tail area is approximately 0.0110564934.
NIST’s two-sample t-test reference explains paired observations and the distinct unpaired equal- and unequal-variance models. Google’s linked published paired example was also independently reproduced at approximately 0.8845282882, providing a separate first-party numerical check.
Advanced application: compare the model assumptions
If the same two columns instead represented independent groups, the paired model would be inappropriate. For the equal-variance independent calculation:
=T.TEST(A2:A6,B2:B6,2,2)
Expected result: 0.4060214615. The unequal-variance calculation is:
=T.TEST(A2:A6,B2:B6,2,3)
The standard unequal-variance mathematical expectation is approximately 0.4073384708. These independent-group results differ greatly from the paired result because the paired calculation uses the variability of within-item differences.
The data collection design determines whether pairing is justified. Choose the model before inspecting which p-value is smallest. A paired test is not simply a more powerful alternative that can be selected whenever two columns have equal lengths.
One tail does not automatically encode your direction
Google states that T.TEST uses a nonnegative test statistic and that the two-tail result is double the one-tail result. Thus:
=T.TEST(A2:A6,B2:B6,1,1)
has expected result 0.0055282467, half the two-tail result. The function’s one-tail magnitude probability alone does not show whether the observed difference points in the direction of a prespecified claim. Inspect the signed mean difference and the hypothesis separately.
Reversing the two ranges changes the direction of the difference but does not create a different two-sided conclusion. Do not interpret a small one-tail magnitude probability as support for a directional hypothesis contradicted by the observed sign.
Errors and interpretation
Google documents a division-by-zero error when both ranges have zero variance. Check matched counts, numeric selector values and the pairing of rows. Missing observations can break pairs; do not replace them with zero or independently filter each range without preserving correspondence.
Native treatment of all blank/text combinations, unequal-length unpaired ranges and other degenerate cases was not established here. Use varying numeric observations with the documented shape in reproducible tests.
A p-value is not the probability that the populations have equal means, and a large p-value does not prove equivalence. Report the mean difference and context alongside the probability. Independence, suitable sampling and distribution assumptions remain important.
Availability and verification
T.TEST and TTEST are currently documented for rolling Google Sheets. Original introduction date, first release and last functioning numbered version were not established.
NOT_TESTED_IN_GOOGLE_SHEETS. Individual Google documentation, its read-only published paired example and NIST formulas were inspected on October 17, 2026. Original differences, statistics and probabilities were independently calculated, not executed in Sheets.