Why Excel T.TEST and Data Analysis Return Different P Values
Question details
Understand why Excel's T.TEST function and Data Analysis t-test can produce different two-tailed P values.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Comparing two independent samples with an unequal-variance t-test.
- Observed behavior
- T.TEST and the Data Analysis tool return slightly different two-tailed P values for the same samples.
Identify the two sample ranges and confirm that an independent, unequal-variance t-test is appropriate. Make sure both methods use the same observations and compare two-tailed P values.
Compare the unequal-variance test settings
Use matching inputs to check whether the difference is due to test settings or the tools' calculations.
For an unequal-variance test, T.TEST uses the calculated degrees of freedom without rounding, so it can use a noninteger value. The Data Analysis tool uses a different implementation, which can produce a slightly different P value. This difference is expected.
In an empty cell, enter =T.TEST(A2:A11,B2:B11,2,3), replacing the ranges with your two samples. The arguments 2 and 3 specify a two-tailed, unequal-variance test.
Select Data > Data Analysis > t-Test: Two-Sample Assuming Unequal Variances. Enter the same sample ranges, set the hypothesized mean difference to 0, and select an output location.
Compare the formula result with P(T<=t) two-tail in the Data Analysis output. Check the ranges and the Labels setting if the difference is larger than expected.

Work with Statistical Spreadsheets in WPS Office
WPS Office is a free, lightweight alternative for working with spreadsheets in a familiar interface. Open compatible Excel files and continue your spreadsheet work without starting over; it does not change how Excel's two t-test methods calculate P values.

Frequently Asked Questions
Which T.TEST arguments specify a two-tailed unequal-variance test?
Use 2 for the tails argument and 3 for the type argument, as in =T.TEST(A2:A11,B2:B11,2,3). Replace the ranges with your sample data.
Which Data Analysis result should I compare with T.TEST?
In the output from Data > Data Analysis > t-Test: Two-Sample Assuming Unequal Variances, compare P(T<=t) two-tail with the result of T.TEST using 2 tails and type 3.
Does a different P value mean one of the tests is wrong?
Not necessarily. T.TEST can use noninteger calculated degrees of freedom, while the Data Analysis tool uses a different implementation. First confirm that both tests use the same data and settings.
What if Data Analysis is missing from the Data tab?
Enable the Analysis ToolPak add-in in Excel's add-in settings, then return to the Data tab and select Data Analysis.




