Home  /  Blog  /  Finance & Stats
Finance & Stats

P Value in Excel — T.TEST Formula, With Examples

By admin 29 November 2026 Finance & Stats

You tested two versions of a page, and the new one averaged $57 against the old one’s $52. Is the new one really better, or did you just get lucky? A p-value answers that question in one number: the probability of seeing a difference this big if there was actually no real difference between the two groups. If that probability is small — 0.05 or less — the difference is statistically significant, and you can reasonably conclude it is genuine. If it is bigger, you cannot. Excel has a function for it — T.TEST — and this guide gives you that formula first, works it through on two campaigns with a result you can check, and covers the 0.05 line, one-tailed versus two-tailed, and the mistakes that catch everyone.

Quick takeaway: the p-value is the probability of seeing this difference if there was no real difference.

  • =T.TEST(array1, array2, 2, 2) — the p-value for two groups, two-tailed, equal variance.
  • p ≤ 0.05: statistically significant — reject the null hypothesis.
  • p > 0.05: not significant — you cannot conclude there is a difference.
  • A big p-value does not prove there is no difference. It proves nothing.
P Value in Excel — T.TEST Formula, With Examples

The Formula — T.TEST

=T.TEST(A2:A11, B2:B11, 2, 2)
PartWhat it does
A2:A11The first group (array1)
B2:B11The second group (array2)
2Tails — 1 for one-tailed, 2 for two-tailed
2Type — 1 for paired, 2 for two-sample equal variance, 3 for two-sample unequal variance

T.TEST returns the p-value directly — a number between 0 and 1 — and it works in every current version of Excel with no add-in. The older TTEST function still exists for compatibility with earlier versions.

Worked Example — Two Campaigns, One P-Value

Daily clicks for two email campaigns, ten days each:

DayA: Old designB: New design
14558
25254
34862
46056
55060
65552
74759
85857
95155
104961
Mean51.557.4

=T.TEST(A2:A11, B2:B11, 2, 2) gives 0.0048. The p-value is 0.0048, below 0.05, so the difference is statistically significant: there is only a 0.48% chance of seeing a difference this big if the two designs were actually the same. The null hypothesis — that the two means are the same — is rejected. The new design really is better. The same test with type 3 (unequal variance) gives 0.0055 — the same conclusion. With tails 1 (one-tailed) it gives 0.0024 — half the two-tailed value, because a one-tailed test only looks in one direction.

The Not-Significant Case — Same Formula, Other Side of the Line

Two more groups, ten values each:

DayAB
15150
24953
35353
45451
55452
64955
75054
85050
95453
105054
Mean51.452.5

The same formula, =T.TEST(A2:A11, B2:B11, 2, 2), gives 0.2182. The p-value is 0.2182, above 0.05, so the difference is not statistically significant: there is a 21.8% chance of seeing a difference this big by luck alone. You cannot conclude the groups differ. And that is not proof that they are the same — it is only proof that this data cannot tell them apart. More data might.

Paired Data — Before and After

When the same people are measured twice — before and after a change — use type 1, the paired test. Ten employees’ productivity scores, before and after a new tool:

EmployeeBeforeAfter
16062
26262
36161
46365
56061
66162
76263
86162
96365
106161
Mean61.462.4

=T.TEST(before, after, 2, 1) gives 0.0038. The p-value is below 0.05, so the improvement is statistically significant — even though the means moved by only 1.0, because almost every employee improved by a little. That is the point of a paired test: it compares each person with themselves, so the noise between people does not hide the change.

The 0.05 Line — What It Is and What It Is Not

p-valueVerdictWhat it means
0.001Highly significantA 0.1% chance of seeing this by luck
0.0048SignificantA 0.48% chance of seeing this by luck
0.05The lineA 5% chance of seeing this by luck
0.06Not significantA 6% chance — just over the line, and still not significant
0.2182Not significantA 21.8% chance of seeing this by luck

0.05 is a convention, not a law of nature — the standard cutoff in most business and research settings. A p-value of 0.06 is not “almost significant”; it is not significant. And a p-value of 0.0048 does not mean the difference is big or important — only that it is unlikely to be luck. Size and significance are different questions.

From a Z-Score to a P-Value

The p-value and the z-score are the same idea in two forms. A z-score of 1.96 is the 0.05 line: the two-tailed p-value for z = 1.96 is 0.05. The formula is:

=2*(1-NORM.S.DIST(ABS(z), TRUE))
z-scoreTwo-tailed p-value
1.500.1336
1.960.05
2.580.0099

So the exam score from the z-score article — z = 1.5 — has a two-tailed p-value of 0.1336, above 0.05, and would not be significant. The full guide to z-scores is the z score article, and the full guide to the standard error is the standard error formula article.

TDIST — The P-Value From a t Statistic

If you already have a t statistic instead of raw data, TDIST gives the p-value from it:

=T.DIST.2T(t, deg_freedom)

For a t statistic of 2.5 with 8 degrees of freedom, the two-tailed p-value is 0.0369 — below 0.05, significant. For t = 1.41 with 8 degrees of freedom, it is 0.1962 — above 0.05, not significant. Report the result as t(8) = 1.41, p = 0.196: the t statistic, the degrees of freedom, and the p-value, in that order.

Common Mistakes

MistakeWhat happensFix
You used type 2 for paired dataThe test ignores that the same people were measured twiceUse type 1 for before-and-after data
You used tails 1 without predicting the directionThe p-value is half what it should beUse tails 2 unless you predicted the direction in advance
You called 0.06 “almost significant”It is not significant — the line is 0.05Report it as not significant
You called a big p-value proof of no differenceIt proves nothing — the data may just be too smallSay “no significant difference found”
You called a small p-value proof the difference is bigIt proves the difference is unlikely to be luck, not that it is largeReport the size of the difference too
You ran many tests and reported the smallest p-valueOne in twenty tests passes 0.05 by luck aloneThat is the multiple-testing problem — correct for it, or say so

Frequently Asked Questions

What is the p value formula in Excel? =T.TEST(array1, array2, tails, type). For example, two campaigns with means 51.5 and 57.4 give p = 0.0048 with tails 2 and type 2. If you have a t statistic instead of raw data, use =T.DIST.2T(t, deg_freedom).

What does a p-value of 0.05 mean? It means there is a 5% chance of seeing a difference this big if there was actually no real difference. 0.05 is the standard cutoff: at or below it, the result is statistically significant.

How do I find the p-value in Excel? Use T.TEST for two groups of data, or T.DIST.2T from a t statistic. For a full statistical table — means, variances, degrees of freedom, the t statistic and both p-values — use Data > Data Analysis > t-Test.

One-tailed or two-tailed — which should I use? Two-tailed (2) for most comparisons, because you want to know if there is any difference, in either direction. One-tailed (1) only when you predicted the direction in advance.

Paired or two-sample — which type do I pick? Paired (1) when the same people or items are measured twice — before and after. Two-sample (2 or 3) when the groups are different people or items.

Is a p-value of 0.06 significant? No. The line is 0.05, and 0.06 is above it. It is not “almost significant” — it is not significant.

Does a p-value above 0.05 prove there is no difference? No. It only proves this data cannot show a difference. More data might.

That is the p-value formula in Excel: T.TEST, with the two groups, the tails and the type — one function that returns the probability of seeing your difference if there was no real difference at all. The number it gives you is a probability, not a verdict on size: below 0.05, the difference is statistically significant, and you can reasonably conclude it is genuine; above 0.05, you cannot, and that is not proof that the groups are the same. Remember the two things that matter: pick the right type — paired for before-and-after, two-sample for different groups — and use two tails unless you predicted the direction in advance. And remember what the p-value is for: deciding whether a difference is real, not whether it is big. From here, the next statistics to learn are the ones this formula is built on — the z score article, the standard deviation formula and the average formula — and the full learning order for the whole site is on the Excel Formulas hub.


About admin

Author of Excel formula guides on this blog.

View all guides by admin →

Keep Learning

Related guides