# Statistics in Excel: what T.TEST really does, its pitfalls, and the alternatives

> Excel's T.TEST returns only a p-value, and its type argument decides which test you ran. Pick the type from your design, protect raw data from auto-conversion, and use R, Python, JASP or jamovi for more.

Canonical: https://www.licklider.ai/alternatives/excel-for-statistics-alternatives/
Section: Alternatives › Statistics software
Author: Licklider · Published 2026-11-11 · Last reviewed 2026-11-11 (UTC)

> **Disclosure.** Licklider makes SciGround, one of the options on this page. Options are grouped by the job they do rather than ranked, and each statement about another product names its source and the date we checked it. Statements about each product come from its own pages; before you choose, try the products yourself to see their screens and confirm what they offer.

> **Quick answer.** Excel can run a t-test, but `=T.TEST()` returns **only a p-value**, and its **type** argument decides which test you ran: 1 is paired, 2 assumes equal variances (Student's t-test), 3 does not (Welch's t-test). For two separate groups, use type 3; for the same animals measured twice, or matched pairs, use type 1, and keep tails = 2. In the constructed example below, the same two columns give p = 0.0025 as paired and p = 0.44 with either unpaired type. Neither T.TEST nor the Analysis ToolPak prints the difference's confidence interval; for that, and for Welch's ANOVA or a repeated-measures model beyond two groups, use R, Python (also available inside Excel as Python in Excel), JASP or jamovi; the ToolPak's one-way ANOVA assumes equal variances. Keep gene names and IDs safe from Excel's automatic conversion.

**Terms used below.** *T.TEST*: Excel's function that returns the p-value of a t-test. *Type*: T.TEST's last argument, which chooses the test. *Tails*: 2 tests for a difference in either direction; 1 halves that p-value whatever the direction of the difference, so check the direction yourself. *Paired*: two measurements on the same animal, or on deliberately matched animals. *Matched pairs*: different animals entered as a pair because they share something (the same litter, day or batch), for example littermates split one per group; analysed like paired data. *Student's t-test*: assumes both groups have the same spread. *Welch's t-test*: does not assume equal spread. *Analysis ToolPak*: an Excel add-in with t-tests, ANOVA and other tools. *p-value*: the chance of a result at least this extreme if there were no real difference. *t*: the test statistic. *df* (degrees of freedom): a number printed with the test that reflects the amount of independent data. *Confidence interval (CI)*: the range of differences compatible with the data. *Variance*: the square of the standard deviation, a measure of spread. *ANOVA*: a test comparing three or more group means.

## What Excel does, from Microsoft's documentation

Microsoft's T.TEST page defines the arguments: "Tails Required. Specifies the number of distribution tails. If tails = 1, T.TEST uses the one-tailed distribution. If tails = 2, T.TEST uses the two-tailed distribution. Type Required. The kind of t-Test to perform", with type 1 as "Paired", type 2 as "Two-sample equal variance (homoscedastic)" and type 3 as "Two-sample unequal variance (heteroscedastic)" ([Microsoft Support: T.TEST](https://support.microsoft.com/en-us/office/t-test-function-d4e08ec3-c545-485f-962e-276f7cbed055), checked 11 November 2026). Microsoft also states that T.TEST computes "a non-negative t-statistic", so with tails = 1 it reports the one-sided p-value without checking which group is higher. The Analysis ToolPak (Windows: File > Options > Add-Ins > Manage Excel Add-ins > Go; Mac: Tools > Excel Add-ins) adds t-test and ANOVA tools that print t, the means and variances, and the p-values, but not a confidence interval for the difference; for the unequal-variance t-test, "the value of df is rounded to the nearest integer", so its p-value can differ slightly from T.TEST's ([Microsoft Support: Analysis ToolPak](https://support.microsoft.com/en-us/office/use-the-analysis-toolpak-to-perform-complex-data-analysis-6c67ccf0-f4a9-487c-8dec-bdb5a2cefab6)).

## Worked check: the type argument changes the answer

A typical sheet: column A holds 8 values before treatment and column B the same 8 mice after treatment; mice differ a lot from each other, and on average a mouse rises by about 3.5 units. Each row holds one mouse, so the two values in a row must belong to the same animal. The table shows what each T.TEST call computes; the same values are reproduced in Python and R. Stored files: [sheet.csv](/alternatives/excel-for-statistics-alternatives/sheet.csv), [check.py](/alternatives/excel-for-statistics-alternatives/check.py), [check.R](/alternatives/excel-for-statistics-alternatives/check.R) and [their output](/alternatives/excel-for-statistics-alternatives/check_output.txt).

| Excel formula `=T.TEST(array1, array2, tails, type)` (constructed data) | Test | p |
| --- | --- | --- |
| `=T.TEST(A2:A9,B2:B9,2,1)` | Paired, two-tailed | 0.0025 |
| `=T.TEST(A2:A9,B2:B9,2,2)` | Unpaired, equal variances (Student's t-test) | 0.4418 |
| `=T.TEST(A2:A9,B2:B9,2,3)` | Unpaired, unequal variances (Welch's t-test) | 0.4420 |
| `=T.TEST(A2:A9,B2:B9,1,1)` | Paired, one-tailed | 0.0013 |

Because these are the same mice, the paired test (type 1) is the right one, and it finds the change; the unpaired types ignore the pairing and find no clear difference. One-tailed (tails = 1) halves the p-value whichever way the change goes, so it is justified only if the planned direction was fixed before the data were seen and the data follow that direction ([one- vs two-tailed tests](/guides/one-vs-two-tailed-test/)). The paired test pairs row 1 with row 1, row 2 with row 2 and so on; sorting one column breaks the pairs without warning. For two separate groups of animals, type 3 is the safer default ([Welch's vs Student's t-test](/guides/welch-vs-student-t-test/)). T.TEST does not print t, the degrees of freedom, the difference or its confidence interval, which a reviewer will ask for. If you are checking Python code from an assistant: SciPy's `ttest_ind` is Student's test (type 2) unless the call sets `equal_var=False` (type 3), and `ttest_rel` is the paired test (type 1). To run the snippets, install Python with `pip install pandas scipy` (or R from r-project.org) and save the CSV next to the script.

```python
import pandas as pd
from scipy import stats

d = pd.read_csv("sheet.csv")                        # export your two columns as CSV; change file and column names to yours
r = stats.ttest_rel(d.B_after, d.A_before)           # paired, like =T.TEST(...,2,1); after minus before, so a positive CI is a rise
print(r, r.confidence_interval())                    # t, p, df and the 95% CI of the mean change
```

```r
d <- read.csv("sheet.csv")
t.test(d$B_after, d$A_before, paired = TRUE)        # paired, like =T.TEST(...,2,1); prints t, df, p and the 95% CI
```

## Known problems with Excel for research data

- **Gene names turned into dates.** Ziemann and colleagues "confirmed gene name errors in 987 supplementary files from 704 published articles"; that is, 19.6% of articles with gene lists in Excel files ([Ziemann et al. 2016](https://doi.org/10.1186/s13059-016-1044-7)). A later scan found errors "in 30.9% (3,436/11,117) of articles with supplementary Excel gene lists" ([Abeysooriya et al. 2021](https://doi.org/10.1371/journal.pcbi.1008984)). Import identifiers as text, and check a few after every import.
- **Accuracy of statistical functions.** A review of older versions found that "Excel 2007, like its predecessors, fails a standard set of intermediate-level accuracy tests" ([McCullough & Heiser 2008](https://doi.org/10.1016/j.csda.2008.03.004)); a later review found partial improvements ([Mélard 2014](https://doi.org/10.1007/s00180-014-0482-5)). These studies tested older versions, and we did not test current Excel; rerunning a key result in a second program is a cheap safeguard.
- **Hidden steps.** Formulas spread across cells are hard to audit; a replication of a widely cited economics paper found a spreadsheet coding error, together with selective exclusion of data and unusual weighting, that changed the original paper's results ([Herndon et al. 2014](https://doi.org/10.1093/cje/bet075)). Keep raw data on a separate, untouched sheet.

## The options, grouped by job

Each row states its source and the date we checked it.

| Option | Best for | Less suited for | Basis (checked 11 November 2026) |
| --- | --- | --- | --- |
| **Excel (T.TEST, Analysis ToolPak)** | Quick checks on data already in a sheet; two-group t-tests, F.TEST, CORREL and LINEST, and the ToolPak's ANOVA; Python in Excel for scripted analyses on supported licences | Mixed models, survival, non-parametric tests beyond the basics; a full audit trail | [T.TEST](https://support.microsoft.com/en-us/office/t-test-function-d4e08ec3-c545-485f-962e-276f7cbed055); [Analysis ToolPak](https://support.microsoft.com/en-us/office/use-the-analysis-toolpak-to-perform-complex-data-analysis-6c67ccf0-f4a9-487c-8dec-bdb5a2cefab6); [Python in Excel availability](https://support.microsoft.com/en-us/excel/python/python-in-excel-availability) |
| **Copilot in Excel or Claude for Excel** | AI help inside the workbook; Copilot's advanced analysis mode "runs Python code" | The assistant sees columns, not your design; it needs to be told which values are paired or nested | [Copilot in Excel](https://support.microsoft.com/en-us/topic/get-direct-answers-to-your-data-analysis-questions-bb6d0b9c-f42a-46ea-b67d-f7d4ebb2b51b); [Claude for Microsoft 365](https://claude.com/blog/collaborate-with-claude-across-excel-powerpoint-word-and-outlook); our [comparison](/alternatives/ai-assistants-for-statistical-analysis/) |
| **JASP or jamovi** | Free point-and-click analysis with full output; open CSV files exported from Excel (paired data: T-Tests → Paired Samples T-Test in JASP; Analyses → T-Tests → Paired Samples T-Test in jamovi) | Analyses outside their menus | [jasp-stats.org](https://jasp-stats.org/); [jamovi.org](https://www.jamovi.org/) |
| **GraphPad Prism** | Point-and-click analysis and publication graphs | No-budget settings (commercial licence) | [graphpad.com/features](https://www.graphpad.com/features); our [Prism alternatives page](/alternatives/graphpad-prism-alternatives/) |
| **R or Python** | Any analysis you want to rerun and cite, from the same CSV export | Readers who will not write code | [r-project.org](https://www.r-project.org/); [SciPy documentation](https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.ttest_ind.html) |
| **SciGround** (our product) | Checking its supported analyses inside ChatGPT or Claude, with a shareable record | Results that do not pass through it; it does not work inside Excel | Our capability pages: [supported analyses](/sciground/analyses/) and [the limits of those analyses](/sciground/analyses/limits/) |

## If you stay in Excel: a checklist

1. **Choose the type from the design**, before you look at the data: 1 for the same animals measured twice or matched pairs (for example, littermates split one per group), 3 for two separate groups. Keep tails = 2 unless a one-sided test was planned.
2. **Report more than p.** The ToolPak's t-test tool gives t, df and the means; for the difference's 95% confidence interval, use a short R or Python script on a CSV export (or Python in Excel). For a paired design you can also stay in Excel: put the differences in a helper column (`=B2-A2`), then compute `=AVERAGE(C2:C9)` ± `T.INV.2T(0.05,COUNT(C2:C9)-1)*STDEV.S(C2:C9)/SQRT(COUNT(C2:C9))`; for the example this gives 1.67 to 5.23, the same as the paired test.
3. **More than two groups:** the ToolPak's one-way ANOVA assumes equal variances; we recommend Welch's ANOVA ([Welch's ANOVA](/guides/welch-anova/)), which needs R, Python, JASP or jamovi. If the same animals were measured at three or more times, use a repeated-measures model ([repeated measures ANOVA vs mixed model](/guides/repeated-measures-anova-vs-mixed-model/)). Avoid running many T.TEST calls; plan a correction ([which correction to use](/guides/which-multiple-comparison-correction/)).
4. **Protect identifiers.** Format the identifier column as Text before pasting, or set it to Text in the import dialog, so gene names and sample IDs are not converted; keep an untouched raw-data sheet.
5. **One value per animal.** Average technical replicates first ([what counts as n](/guides/what-counts-as-n/)).

## Report it

> Two-group comparisons used [a paired t-test / Welch's t-test], two-tailed ([Excel T.TEST type 1 / 3; R 4.3.3 / Python 3.13 with SciPy 1.18.1]); one value per mouse (n = [8]). Results are reported as the mean difference with its 95% confidence interval, t, df and p.

Replace the bracketed values with your own.

## How we compared

- **Sources:** Microsoft's T.TEST and Analysis ToolPak pages, checked on 11 November 2026; published studies on Excel's accuracy and gene-name errors, linked above; our other comparison pages for the AI tools and for Prism (which also covers JASP and jamovi).
- **Our reproducible check:** the calculations Microsoft documents for each T.TEST type, run in SciPy 1.18.1 and R 4.3.3 with stored code. It tests the methods, not Excel itself.
- **No hands-on testing** of Excel or any other product was done.
- **Conflict of interest:** Licklider makes SciGround.

## Questions

**Is Excel accurate enough for a t-test?** The published accuracy problems concerned older versions and more advanced functions, and we did not test current Excel; the risk we can show is choosing the wrong type. Report the test type and rerun the key result in R, Python, JASP or jamovi.

**Type 2 or type 3 in T.TEST?** Type 3 (Welch's t-test) for two separate groups, chosen in advance; type 2 when a stated reason in advance supports equal spread; type 1 if the same animals were measured twice.

**What should I use instead of Excel?** JASP or jamovi if you want menus and free software; R or Python if you want a script you can rerun; Prism if your lab uses it for graphs. All read CSV files exported from Excel.

## References

- Ziemann M, Eren Y, El-Osta A (2016). Gene name errors are widespread in the scientific literature. *Genome Biology* 17:177. [doi:10.1186/s13059-016-1044-7](https://doi.org/10.1186/s13059-016-1044-7)
- Abeysooriya M, Soria M, Kasu MS, Ziemann M (2021). Gene name errors: lessons not learned. *PLOS Computational Biology* 17:e1008984. [doi:10.1371/journal.pcbi.1008984](https://doi.org/10.1371/journal.pcbi.1008984)
- McCullough BD, Heiser DA (2008). On the accuracy of statistical procedures in Microsoft Excel 2007. *Computational Statistics & Data Analysis* 52:4570–4578. [doi:10.1016/j.csda.2008.03.004](https://doi.org/10.1016/j.csda.2008.03.004)
- Mélard G (2014). On the accuracy of statistical procedures in Microsoft Excel 2010. *Computational Statistics* 29:1095–1128. [doi:10.1007/s00180-014-0482-5](https://doi.org/10.1007/s00180-014-0482-5)
- Herndon T, Ash M, Pollin R (2014). Does high public debt consistently stifle economic growth? A critique of Reinhart and Rogoff. *Cambridge Journal of Economics* 38:257–279. [doi:10.1093/cje/bet075](https://doi.org/10.1093/cje/bet075)
- Microsoft Support. T.TEST function; Use the Analysis ToolPak to perform complex data analysis. [support.microsoft.com](https://support.microsoft.com/en-us/office/t-test-function-d4e08ec3-c545-485f-962e-276f7cbed055) (checked 11 November 2026)

## Changes

- 11 November 2026: first published.

*Microsoft Excel, Microsoft Copilot, Claude, ChatGPT, GraphPad Prism, JASP, jamovi, R and Python are names of their owners' products. Licklider is not affiliated with Microsoft, Anthropic, OpenAI, GraphPad, the JASP team, the jamovi project, the R Foundation or the Python Software Foundation.*

## Related

- [SPSS alternatives](https://www.licklider.ai/alternatives/spss-alternatives/)
- [GraphPad Prism alternatives](https://www.licklider.ai/alternatives/graphpad-prism-alternatives/)
- [Paired vs unpaired t-test](https://www.licklider.ai/guides/paired-vs-unpaired-t-test/)
- [Welch's t-test vs Student's t-test](https://www.licklider.ai/guides/welch-vs-student-t-test/)

## How this page was made

- Written and published by Licklider, which makes SciGround, one of the options compared here.
- Statements about other products come from their own public pages and documentation, checked on 11 November 2026, and from published studies; each is linked. No hands-on testing of any product was done.
- The worked check reproduces with stored code (Python 3.13 with SciPy 1.18.1; R 4.3.3) the calculations that Excel's documentation describes for each T.TEST type; both languages print the same numbers.
- Separate review passes checked the statistics, the citations, the product and comparative statements, and readability before publication.
