Paired t-Test Calculator
Test before-and-after data on the same subjects — paste two columns or enter the summary of the differences — with the mean difference, t statistic, p-value, confidence interval and a differences histogram.
| Pair | Before | After | Difference (after − before) |
|---|---|---|---|
| 1 | 80.00 | 83.00 | 3.00 |
| 2 | 78.00 | 80.00 | 2.00 |
| 3 | 85.00 | 88.00 | 3.00 |
| 4 | 72.00 | 74.00 | 2.00 |
| 5 | 88.00 | 90.00 | 2.00 |
| 6 | 75.00 | 78.00 | 3.00 |
| 7 | 82.00 | 83.00 | 1.00 |
| 8 | 77.00 | 81.00 | 4.00 |
| 9 | 79.00 | 81.00 | 2.00 |
| 10 | 84.00 | 87.00 | 3.00 |
Reject H₀ at α = 0.05 — with t = 9.303 and a p-value of < 0.0001, the mean difference of 2.50 is significant.
Calculation
Differences histogram — mean difference marked
The histogram shows the 10 differences (after − before). The vertical line marks the mean difference of 2.50.
A paired t-test compares two measurements taken on the same subjects — before and after a treatment, or under two conditions. Paste both columns and get the mean difference, t-statistic, degrees of freedom, p-value and confidence interval, plus a histogram of the differences.
Use this test when the SAME subjects are measured twice — before and after, or under two conditions. If the two groups are different people, use the two-sample t-test instead. If you have ONE sample against a claimed value, use the one-sample t-test.
How to use the paired t-test calculator
- Choose a mode: Raw data to paste the before and after columns, or Summary of differences if you already know n, the mean difference and its standard deviation.
- In Raw data mode, paste the before values and the after values in the same order, separated by commas, spaces or line breaks. Both columns need the same number of values — each before value is matched to the after value in the same row.
- Choose the significance level (α) and the tail: two-tailed, or one-tailed for d̄ > 0 or d̄ < 0.
- Read the headline t statistic, then check the results grid for the p-value, mean difference, SD of the differences, Cohen’s dz, 95% confidence interval and standard error. The calculation ledger shows every step, and the chart shows the histogram of the differences.
Try it now: with the default example (10 students before and after a revision course), the calculator gives t = 9.303, df = 9 and a two-tailed p-value of < 0.0001 — the course clearly helped. Switch to Summary of differences and enter n = 10, mean difference 2.50 and SD 0.8498 to get the same answer.
When should you use a paired t-test?
Use a paired t-test when the same subjects or units are measured twice and you want to know whether the mean changed — for example, test scores before and after a course, blood pressure before and after a drug, or sales before and after a promotion. It is the right test when:
- The two columns are matched: each value in the before column belongs to the same subject as the value in the same row of the after column (or the pairs are matched, such as twins or matched controls).
- The differences are approximately normal, or the sample is large enough that the central limit theorem applies.
- The pairs are independent of each other — one subject’s change does not affect another’s.
- The measurements are on a continuous scale.
Because the pairing removes the between-subject variation, a paired test is much more powerful than an unpaired test on the same data. On the same numbers, a paired test can be highly significant while the unpaired test finds nothing — see paired vs unpaired t-test.
A paired t-test is a one-sample t-test on the differences
The paired test works by turning each pair into a single number — the difference, d = after − before — and then running a one-sample t-test on those differences, testing whether their mean is zero:
t = d̄ / (sd / √n), with df = n − 1, where d̄ is the mean difference, sd is the standard deviation of the differences and n is the number of pairs.
That is why the differences are the data: the before and after values themselves do not need to be normal, only their differences do. And it is why zeros are kept — a pair with no change (d = 0) still counts toward n and pulls the mean difference toward zero. The Wilcoxon signed-rank test, a non-parametric alternative, drops zero differences instead.
| Check | What it means |
|---|---|
| Pairs matched | Each before value belongs to the same subject as the after value in the same row |
| Differences roughly normal | Check the histogram of the differences, especially with small samples |
| Pairs independent | One subject’s change does not affect another’s |
| At least 2 pairs | df = n − 1, so n = 1 leaves no degrees of freedom |
How do I read the p-value, Cohen’s dz and the confidence interval together?
Three numbers, one story. Read them as a group rather than in isolation:
- P-value: the probability of getting a mean difference at least as far from 0 as yours, if the null hypothesis (no change) were true. If p < α, reject H₀; if p > α, do not. Learn more about what a p-value is and what it cannot tell you.
- Cohen’s dz: the size of the mean difference in standard deviation units, dz = d̄ / sd. Roughly, 0.2 is small, 0.5 is medium and 0.8 is large. A tiny p-value with a tiny dz can mean a real but trivial difference.
- 95% confidence interval: the range of plausible values for the true mean difference, d̄ ± t* · (sd / √n). If the interval excludes 0, the two-tailed test at 5% rejects — the two must agree. You can build one directly with a confidence interval calculator for a mean and standard deviation.
Example: in the worked example below, p < 0.0001 (significant), dz = 2.94 (a very large effect) and the 95% CI is [1.89, 3.11], which excludes 0 — all three agree that the course helped.
Worked example: ten students before and after a revision course
Ten students take a test before and after a revision course. Their scores rise in every case — the question is whether the average rise is real or could be chance.
Slope graph: each line is one student, from the score before the course to the score after it. Every line rises — the course helped all ten students.
Before: [80, 78, 85, 72, 88, 75, 82, 77, 79, 84]. After: [83, 80, 88, 74, 90, 78, 83, 81, 81, 87]. Differences (after − before): [3, 2, 3, 2, 2, 3, 1, 4, 2, 3]. Mean difference d̄ = 2.50, sd = 0.8498, SE = 0.2687, t = 9.303, df = 9, two-tailed p < 0.0001 → reject H₀ at α = 0.05. 95% CI for the mean improvement = [1.89, 3.11]. Cohen’s dz = 2.50 / 0.8498 = 2.94 (very large).
Every student improved by 1 to 4 points, so the mean difference of 2.50 points is not carried by one outlier — the histogram of the differences (in the calculator above) shows the same thing: the differences cluster at 2 and 3, with the mean marked at 2.50.
Paired t-test in Excel
T.TEST with type 1 = paired: =T.TEST(A2:A11,B2:B11,2,1) runs the two-tailed paired test on two columns. Type 2 is the pooled (Student) two-sample test and type 3 is Welch — both for independent groups, not pairs. For the p-value from a t statistic, use T.DIST.2T; for the critical t, use T.INV.2T.
Frequently asked questions
How do I know my data are paired?
Your data are paired when the same subjects or units are measured twice — before and after a treatment, or under two conditions — or when each observation in one column is matched to one in the other, such as twins or matched controls. If the two columns are different people with no matching, the data are independent — use the two-sample t-test instead.
Can I run an unpaired test on paired data?
You can, but you should not: an unpaired test ignores the pairing and drowns the real difference in the between-subject variation, so it loses power. On the same numbers a paired test can be highly significant while the unpaired test finds nothing — see paired vs unpaired t-test.
What if some differences are zero?
Zeros are kept in the count: a pair with no change still counts toward n and pulls the mean difference toward zero. That is different from the Wilcoxon signed-rank test, which drops zero differences.
What if the pairs have different n?
They cannot. Both columns need the same number of values, in the same order, because each before value is matched to the after value in the same row. If one column is shorter, the calculator will tell you that both columns need the same number of values.
Do paired tests need normal data?
The DIFFERENCES need to be roughly normal, not the raw before and after values. With small samples, check the histogram of the differences; with large samples the test is robust to mild departures from normality.
When should I use Wilcoxon instead?
When the differences are clearly non-normal and the sample is small, a non-parametric alternative such as the Wilcoxon signed-rank test is safer, because it does not assume the differences are normal.
Source: the paired-sample t test follows the NIST/SEMATECH e-Handbook, 7.3.1.1. Analysis of paired observations. For the unpaired version, see the two-sample t-test calculator, and for the distribution itself, the t-distribution calculator.
See all 62 free statistics tools on Empirical Rule Calculators.
Next steps
More Tools to Explore
Keep going with the calculators that pair with the paired t-test — the one-sample t-test, the t-distribution, effect sizes and confidence intervals.
One-Sample T-Test Calculator
A paired t-test is a one-sample t-test on the differences — run it here.
Two-Sample t-Test Calculator
Two independent groups instead of the same subjects twice.
T-Distribution Calculator
Look up any area, p-value or critical t for any degrees of freedom.
Cohen’s d Calculator
Measure how big the mean difference is, not just whether it is significant.
CI from Mean and Standard Deviation Calculator
Build a confidence interval for a mean from x̄, s and n.
Z-Score Calculator
Turn any raw score into a z-score and read off its percentile.
Explore All Tools →
Browse all 62 free statistics tools — every calculator on this site in one place.