In Excel: use =T.TEST(array1, array2, 2, 3) — it returns a p-value for the tails (1 or 2) and test type (1 paired, 2 equal variance, 3 unequal variance) you pass, and below 0.05 is the conventional threshold for calling a difference significant.
On this page8
Syntax
Arguments
| Argument | required / optional | Description |
|---|---|---|
array1 | required | The first sample. |
array2 | required | The second sample. |
tails | required | 1 for a one-tailed test, 2 for two-tailed. |
type | required | 1 paired, 2 two-sample equal variance, 3 two-sample unequal variance. |
Related functions
n = 6 · mean = 14.67
Variance = 17.067
Need it as an auditable file?
Ships inside the linked template — formula-driven, unlocked, audit-ready.
What this does
T.TEST compares two samples and returns the probability of seeing a difference this large if the two populations actually had the same mean. The type argument matters more than most people realise: 1 is for paired measurements (the same subjects before and after), 3 is for two independent groups whose variances may differ, and 3 is the safer default for independent samples because assuming equal variance rarely holds. A p-value below 0.05 conventionally means "unlikely to be chance", but it says nothing about how large or how important the difference is — a trivial difference becomes significant with a large enough sample. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “calculate t test in excel”. Start on a copy or a tiny sample, keep the affected cells visible, and compare the result with the tool above before you touch the real workbook. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. The point is a calculation you can defend to a CFO or an auditor, but the practical win is that someone else can open the file and understand what happened without asking you.
A worked example
Comparing conversion times for two page designs, 200 sessions each in B2:B201 and C2:C201: =T.TEST(B2:B201, C2:C201, 2, 3) returning 0.03 says a difference this large would arise by chance about 3 % of the time. Before-and-after measurements on the same people use the paired form: =T.TEST(before, after, 2, 1). T.TEST is the standard A/B significance check, and its type argument is where most spreadsheet significance testing quietly goes wrong. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.
In Google Sheets
Everything above works in Google Sheets too. Excel and Sheets share the formula syntax used here; only the surrounding menus are arranged differently. That portability is deliberate — learn it once and it follows you between the two tools and across Windows and Mac. Keep this page bookmarked for the next time the same question comes up. Better still, rebuild the example once in your own sheet — doing it yourself, with the tool above to check against, is what turns a copied formula into a technique you own. If you take one thing from this page on “calculate t test in excel”, make it the habit rather than the keystrokes: set the problem up with labelled inputs, reference those cells, and let Excel do the recomputing. Bookmark the page for the syntax, but do the example once in a blank sheet and check it against the tool above — five minutes of hands-on practice fixes the method in memory far better than re-reading, and it surfaces the small snags while they are still harmless. After that the technique is genuinely yours: faster than searching for it again, and reliable enough to drop into work that other people depend on.
Common mistakes
- Using type 2 (equal variance) by default, when the variances usually differ and type 3 is the honest choice.
- Choosing a one-tailed test after seeing the data, which halves the p-value without justification.
- Reporting significance without the effect size; with 100,000 rows almost anything is significant.
Frequently asked questions
What does the p-value mean?
The probability of a difference this large arising by chance if the populations were identical. It is not the probability that your conclusion is correct.
Which type should I use?
1 for paired measurements on the same subjects; 3 for two independent groups. Type 2 assumes equal variance, which usually does not hold.
One or two tails?
Two, unless you committed to a direction before collecting data.