What is a Paired t-Test Calculator?
A paired t-test (dependent samples t-test) checks whether the mean difference between two matched measurements is zero. Compute d = Before − After for every pair, then run a one-sample t-test on those differences: the paired t test formula is t = d̄ / (s_d / √n) with df = n − 1, where n is the number of pairs. Example: ten adults whose resting heart rate dropped by an average of d̄ = 3.4 bpm (s_d = 2.1187) give t = 5.07, df = 9 and a two-tailed p = 0.00067, so the change is significant at α = 0.05.
What the Paired t-Test Calculator does
This free paired t test calculator takes two columns of matched data, or just the mean and standard deviation of the differences, and returns the paired t statistic, degrees of freedom, p-value, critical value and a reject or fail-to-reject decision for a two-tailed, left-tailed or right-tailed test. With raw data it builds a differences table (each d and its squared deviation) and shows every step of calculating the paired t test with your numbers. It also reports Cohen’s d_z and a 95% confidence interval for the mean difference, and draws the t distribution with the rejection region shaded.
It works as a paired difference t test calculator, a dependent samples t test calculator or a t test calculator for paired samples: the names all describe the same test. Paired or independent? Use this page when every value in one column belongs with exactly one value in the other: the same people before and after a programme, the same parts measured by two gauges, or twins and matched case-control pairs. If the two columns come from different people, the samples are independent: use the Independent Samples t-Test Calculator (or the Welch’s t-test when the spreads differ). Not sure which test you need? The T-Test Calculator covers all three designs in one place.
How to use the Paired t-Test Calculator
- Choose the alternative hypothesis for μ_d, the population mean of Before − After. Two-tailed (≠) is the default; right-tailed means you expect a decrease, left-tailed means you expect an increase.
- Set the significance level α, usually 0.05.
- Under Paired data, type or paste one row per subject with the Before and After values (paste two columns straight from Excel or Google Sheets). If you only have the mean and SD of the differences, choose Summary of differences and enter d̄, s_d and the number of pairs n.
- Read t, df and the p-value, then check the differences table and open the step-by-step solution. The three example buttons above the calculator load the worked examples on this page.
What is a paired sample t-test?
A paired sample t-test (also called a dependent t-test, matched pairs t-test or repeated measures t-test) compares two means that come from the same subjects or matched units. Instead of comparing the two column means directly, it works on one column of differences, so each subject acts as their own control. The hypotheses are H₀: μ_d = 0 (no mean change) against H₁: μ_d ≠ 0, μ_d < 0 or μ_d > 0.
Because the variation between subjects cancels out in each difference, the paired difference t test is usually far more sensitive than a test on two separate groups. On the heart-rate data below, the paired test gives p = 0.00067, while an unpaired t-test on the same 20 numbers gives t = 1.78 and p = 0.093 and misses the effect: the Before and After columns are strongly correlated (r = 0.92), and only the paired test uses that.
How to calculate a paired t-test by hand
Calculating a paired t test takes seven steps, the same ones the calculator shows:
- State the hypotheses: H₀: μ_d = 0 and H₁: μ_d ≠ 0 (or < 0, or > 0), and choose α.
- Subtract each pair: dᵢ = Beforeᵢ − Afterᵢ. Keep the sign.
- Find the mean difference: d̄ = Σd / n, where n is the number of pairs.
- Find the standard deviation of the differences: s_d = √[Σ(d − d̄)² / (n − 1)].
- Find the standard error: SE = s_d / √n.
- Calculate the test statistic: t = d̄ / SE, with df = n − 1.
- Get the p-value from the t distribution (the P-Value from t Calculator does this) or compare t with the critical value from the t-table. Reject H₀ if p ≤ α.
Paired t-test formula
The paired t test formula turns two matched columns into one column of differences and then tests whether their mean is zero. The paired t test statistic is the mean difference divided by its standard error.
| Symbol | Meaning |
|---|---|
| d̄ | mean of the differences |
| s_d | standard deviation of the differences (n − 1 divisor) |
| n | number of pairs, not the total number of measurements |
| μ_d | population mean difference; H₀ says μ_d = 0 |
| t* | critical t value with n − 1 degrees of freedom |
Swapping the columns (After − Before) flips the sign of d̄ and t but leaves the two-tailed p-value unchanged. For a one-tailed test, make sure the direction of H₁ matches how the difference is defined.
If you only know each column’s SD and the correlation r between them, the SD of the differences is s_d = √(s₁² + s₂² − 2r·s₁·s₂).
Paired t-test example
Worked example 1: resting heart rate before and after training
Problem. Ten adults have their resting heart rate (bpm) measured before and after eight weeks of training: Before = 72, 78, 69, 81, 75, 70, 84, 77, 73, 79; After = 68, 74, 70, 75, 72, 67, 79, 75, 71, 73. Did heart rate change, at α = 0.05? These are the calculator’s default inputs.
- 01Differences (Before − After): 4, 4, −1, 6, 3, 3, 5, 2, 2, 6. Σd = 34, so d̄ = 3.4.
- 02Σ(d − d̄)² = 40.4, so s_d = √(40.4 / 9) = 2.1187.
- 03SE = 2.1187 / √10 = 0.6700; t = 3.4 / 0.6700 = 5.0747 with df = 9.
- 04Two-tailed p-value = 2 · P(T₉ ≥ 5.0747) ≈ 0.00067; critical value ±2.2622.
- 05d_z = 3.4 / 2.1187 = 1.6048; 95% CI for μ_d = (1.8844, 4.9156) bpm.
Answer. p < 0.001, so reject H₀. Resting heart rate fell by about 3.4 bpm on average, and the whole confidence interval is above zero.
How to interpret paired t-test results
- The sign of d̄ and t gives the direction. With d = Before − After, a positive d̄ means values went down and a negative d̄ means they went up.
- The p-value is the probability of a mean difference at least this far from zero if there were truly no change. p ≤ α means reject H₀; p > α means the data are consistent with no change, not that the change is exactly zero.
- The 95% confidence interval for μ_d gives the plausible size of the average change. If it excludes 0, the two-tailed test at α = 0.05 rejects H₀. For the interval on its own, with any confidence level, use the Paired t-Test Confidence Interval Calculator.
- Cohen’s d_z = d̄ / s_d measures the size of the change in units of the difference SD. Rough benchmarks: 0.2 small, 0.5 medium, 0.8 large. A tiny change can be significant with many pairs, so report the effect size and the interval, not only the p-value.
- Report it as, for example: “Resting heart rate fell from 75.8 to 72.4 bpm, t(9) = 5.07, p < 0.001, mean difference 3.4 bpm, 95% CI 1.88 to 4.92, d_z = 1.60.”
Worked example 2: a one-tailed paired t-test (exam scores)
Eight students sit a practice exam before and after a revision course. Before = 62, 70, 58, 75, 66, 71, 64, 69; After = 65, 74, 57, 80, 70, 73, 69, 70. The course was expected to raise scores, so with d = Before − After the alternative is H₁: μ_d < 0 (left-tailed), at α = 0.05. Click the Exam scores example to load the data.
- Differences: −3, −4, 1, −5, −4, −2, −5, −1. Σd = −23, so d̄ = −2.875.
- Σ(d − d̄)² = 30.875, so s_d = √(30.875 / 7) = 2.1002.
- SE = 2.1002 / √8 = 0.7425; t = −2.875 / 0.7425 = −3.8719 with df = 7.
- Left-tailed p = P(T₇ ≤ −3.8719) = 0.0031; the critical value is −1.8946, and t is beyond it.
- Reject H₀: scores rose by about 2.9 points on average. 95% CI for μ_d: (−4.6308, −1.1192); d_z = −1.37.
Worked example 3: paired t-test from the mean and SD of the differences
Papers often report only the summary of the differences. Suppose 18 patients show a mean drop of d̄ = 2.6 units with s_d = 4.1. Choose Summary of differences (or click the Summary example) and test H₀: μ_d = 0 two-tailed at α = 0.05.
- SE = 4.1 / √18 = 0.9664.
- t = 2.6 / 0.9664 = 2.6905 with df = 17.
- Two-tailed p = 0.0155; critical values ±2.1098.
- Reject H₀. 95% CI for μ_d: (0.5611, 4.6389); d_z = 0.63, a medium effect.
Paired t-test critical values (df = n − 1)
The degrees of freedom for a paired t test are the number of pairs minus one. Reject H₀ in a two-tailed test when |t| is at least the critical value; in a one-tailed test, when t is beyond the one-tailed value in the direction of H₁. Other values are in the T Critical Value Calculator.
| Pairs n | df | One-tailed α = 0.05 | Two-tailed α = 0.05 | Two-tailed α = 0.01 |
|---|---|---|---|---|
| 5 | 4 | 2.1318 | 2.7764 | 4.6041 |
| 6 | 5 | 2.0150 | 2.5706 | 4.0321 |
| 10 | 9 | 1.8331 | 2.2622 | 3.2498 |
| 15 | 14 | 1.7613 | 2.1448 | 2.9768 |
| 20 | 19 | 1.7291 | 2.0930 | 2.8609 |
| 30 | 29 | 1.6991 | 2.0452 | 2.7564 |
| 50 | 49 | 1.6766 | 2.0096 | 2.6800 |
| 100 | 99 | 1.6604 | 1.9842 | 2.6264 |
Paired t-test vs unpaired t-test
The choice depends on how the data were collected, not on the result you want. If you can draw a line from each value in one column to exactly one value in the other, the data are paired. To calculate an unpaired t-test, compare the two group means with the Independent Samples t-Test Calculator, which uses both group SDs and n₁ + n₂ − 2 degrees of freedom (or the Welch df).
| Paired t-test | Unpaired t-test | |
|---|---|---|
| Data | Same subjects measured twice, or matched pairs | Two separate groups of subjects |
| What is analysed | One column of differences d | Two group means x̄₁ and x̄₂ |
| Test statistic | t = d̄ / (s_d / √n) | t = (x̄₁ − x̄₂) / SE of the difference |
| Degrees of freedom | n − 1 (n = pairs) | n₁ + n₂ − 2, or the Welch df |
| Group sizes | Must be equal (one row per pair) | Can differ |
| Heart-rate data on this page | t = 5.07, p = 0.00067 | t = 1.78, p = 0.093 |
Paired t-test in Excel, R, Python and the TI-84
All four use the same paired t-test equation as this calculator, so t and the p-value should match to rounding. For a longer explanation with diagrams, read the paired t-test guide.
- Excel:
=T.TEST(before_range, after_range, 2, 1)returns the two-tailed p-value; the last argument 1 selects the paired test. Use 1 instead of the first 2 for a one-tailed p. - R:
t.test(before, after, paired = TRUE)prints t, df, the p-value and the 95% CI. - Python:
from scipy.stats import ttest_rel, thenttest_rel(before, after); addalternative="less"or"greater"for one-tailed tests. - TI-84: enter Before in L1 and After in L2, then on the home screen type
L1 − L2 → L3. Go to STAT → TESTS → 2:T-Test, choose Data, set μ₀ = 0, List = L3, Freq = 1, pick the alternative and Calculate.
Sources
The formulas, critical values and software notes on this page follow these references:
- Student (1908). The probable error of a mean. Biometrika, 6(1), 1–25. The original t-test paper, which analysed paired sleep data.
- Diez, D., Çetinkaya-Rundel, M. & Barr, C. OpenIntro Statistics, 4th ed., section 7.2: Paired data.
- Microsoft Support, T.TEST function: type 1 is the paired test.
- SciPy documentation, scipy.stats.ttest_rel: the t-test on two related samples.
Common use cases
- Before-and-after studies: blood pressure, weight, test scores or reaction times measured on the same subjects.
- Method comparison: two instruments, raters or methods applied to the same items.
- Crossover trials, where each participant receives both treatments.
- Matched designs such as twins, siblings or case-control pairs matched on age and sex.
Assumptions and limitations
- Pairs must be genuine: each Before value must belong to the After value in the same row. If the groups are separate people, use the Independent Samples t-Test Calculator or Welch’s t-Test Calculator.
- Normal differences: only the differences need to be roughly normal, not the raw columns. With fewer than about 15 pairs check the differences for outliers; for skewed differences use the Wilcoxon signed-rank test.
- Independent pairs: each row must be a different subject or matched unit, with no pair influencing another.
- No control group: a before-after design cannot separate the treatment effect from time trends or regression to the mean.
Frequently asked questions
How do you calculate a paired t-test?
What is a paired sample t-test?
Can I calculate a paired t-test online?
What is the difference between a paired and an unpaired t-test?
How do you calculate an unpaired t-test?
What are the degrees of freedom for a paired t-test?
How do I do a paired t-test on a TI-84?
Does it matter which column I subtract from which?
Can I run a paired t-test with only the mean and SD of each column?
What is Cohen’s d_z?
Cite this page
Statculator. (2026, November 14). Paired t-Test Calculator. Retrieved November 14, 2026, from https://statculator.com/hypothesis-tests/paired-t-test-calculator/