PMT Function in Excel — With Examples (Loan Payment, Mortgage, Savings)
Learn the PMT function in Excel: monthly loan and mortgage payments, the negative sign, total interest, and savings goals.
Read Guide →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.
=T.TEST(A2:A11, B2:B11, 2, 2)
| Part | What it does |
|---|---|
A2:A11 | The first group (array1) |
B2:B11 | The second group (array2) |
2 | Tails — 1 for one-tailed, 2 for two-tailed |
2 | Type — 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.
Daily clicks for two email campaigns, ten days each:
| Day | A: Old design | B: New design |
|---|---|---|
| 1 | 45 | 58 |
| 2 | 52 | 54 |
| 3 | 48 | 62 |
| 4 | 60 | 56 |
| 5 | 50 | 60 |
| 6 | 55 | 52 |
| 7 | 47 | 59 |
| 8 | 58 | 57 |
| 9 | 51 | 55 |
| 10 | 49 | 61 |
| Mean | 51.5 | 57.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.
Two more groups, ten values each:
| Day | A | B |
|---|---|---|
| 1 | 51 | 50 |
| 2 | 49 | 53 |
| 3 | 53 | 53 |
| 4 | 54 | 51 |
| 5 | 54 | 52 |
| 6 | 49 | 55 |
| 7 | 50 | 54 |
| 8 | 50 | 50 |
| 9 | 54 | 53 |
| 10 | 50 | 54 |
| Mean | 51.4 | 52.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.
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:
| Employee | Before | After |
|---|---|---|
| 1 | 60 | 62 |
| 2 | 62 | 62 |
| 3 | 61 | 61 |
| 4 | 63 | 65 |
| 5 | 60 | 61 |
| 6 | 61 | 62 |
| 7 | 62 | 63 |
| 8 | 61 | 62 |
| 9 | 63 | 65 |
| 10 | 61 | 61 |
| Mean | 61.4 | 62.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.
| p-value | Verdict | What it means |
|---|---|---|
| 0.001 | Highly significant | A 0.1% chance of seeing this by luck |
| 0.0048 | Significant | A 0.48% chance of seeing this by luck |
| 0.05 | The line | A 5% chance of seeing this by luck |
| 0.06 | Not significant | A 6% chance — just over the line, and still not significant |
| 0.2182 | Not significant | A 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.
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-score | Two-tailed p-value |
|---|---|
| 1.50 | 0.1336 |
| 1.96 | 0.05 |
| 2.58 | 0.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.
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.
| Mistake | What happens | Fix |
|---|---|---|
| You used type 2 for paired data | The test ignores that the same people were measured twice | Use type 1 for before-and-after data |
| You used tails 1 without predicting the direction | The p-value is half what it should be | Use tails 2 unless you predicted the direction in advance |
| You called 0.06 “almost significant” | It is not significant — the line is 0.05 | Report it as not significant |
| You called a big p-value proof of no difference | It proves nothing — the data may just be too small | Say “no significant difference found” |
| You called a small p-value proof the difference is big | It proves the difference is unlikely to be luck, not that it is large | Report the size of the difference too |
| You ran many tests and reported the smallest p-value | One in twenty tests passes 0.05 by luck alone | That is the multiple-testing problem — correct for it, or say so |
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.
Learn the PMT function in Excel: monthly loan and mortgage payments, the negative sign, total interest, and savings goals.
Read Guide →Learn the percentile formula in Excel: 90th, 75th and 95th percentiles, quartiles, and PERCENTILE.INC vs EXC — with worked examples.
Read Guide →Learn the z score formula in Excel: STANDARDIZE, how to read a z score, percentiles, and comparing scores on different scales.
Read Guide →