Skip to content

Paired T Test Calculator

Calculate paired t test with instant, accurate results and clear step-by-step output.

By CalcGenius Editorial TeamLast reviewed August 28, 20253 min read
Paired T-Test Calculator
📊
Enter your values and click Calculate

About

The paired t-test compares the means of two related samples — typically before/after measurements on the same subjects, matched pairs in a case-control study, or two methods applied to the same samples. The test computes the per-pair difference dᵢ = afterᵢ − beforeᵢ, then runs a one-sample t-test on the differences against μ₀ = 0. The statistic t = mean(d) / (s_d / √n) follows Student's t with n − 1 degrees of freedom under the null hypothesis that the average difference is zero.

The paired test is mathematically equivalent to a one-sample t-test on the differences. The mean of differences d̄ = mean(after) − mean(before) replaces the sample mean; μ₀ = 0 (the null is that the average difference is zero); the standard deviation of differences s_d replaces the sample SD. This equivalence is why the paired test is often called the "t-test on differences."

The paired test is more powerful than the independent two-sample t-test when the pairing is informative — when the within-subject correlation is high, the variance of the differences is much smaller than var(before) + var(after), giving the test more power to detect a true difference. The tradeoff is fewer degrees of freedom (n − 1 paired vs 2n − 2 unpaired), so when the correlation is near zero, the paired test loses power and the independent test is preferable.

The test rests on three assumptions: (1) the pairs are independent — different subjects, no overlap; (2) the differences are approximately normally distributed — verified via a histogram or Q-Q plot for small n, or guaranteed by the central limit theorem for n ≥ 30; and (3) the pairing is meaningful (the before/after measurements are genuinely on the same subject, not arbitrary pairing). For non-normal differences in small samples, the Wilcoxon signed-rank test is the non-parametric alternative.

A classic application is the pre/post design: measure student test scores before and after a tutoring program, measure blood pressure before and after a medication, or measure reaction time before and after a training session. The paired test controls for between-subject variability (some students start higher, some lower), isolating the effect of the intervention. Report effect size alongside the p-value: Cohen's d_z = d̄ / s_d (the standardized mean difference using the SD of differences) measures practical significance beyond statistical significance.

How to Use

  1. 1
    Enter the "before" values
    Type the first measurement for each subject, separated by commas (e.g., baseline scores, pre-treatment values). The number of values equals the number of subjects.
  2. 2
    Enter the "after" values (same length)
    Type the second measurement for each subject, in the same order. The lists must have the same length — each pair is (beforeᵢ, afterᵢ).
  3. 3
    Set the significance level α
    Default 0.05. Common values: 0.10, 0.05, 0.01. The calculator computes the critical t-value at this α.
  4. 4
    Read t, p-value, and decision
    The hero shows the t-statistic. Below: p-value, critical t, degrees of freedom, mean difference, standard deviation of differences, and the reject / fail-to-reject decision at α.
  5. 5
    Inspect per-pair differences
    The detail panel shows each pair's difference dᵢ = afterᵢ − beforeᵢ. Verify the differences look approximately normal for small n; for large n the central limit theorem makes this less critical.

Formula

Per-pair difference:

dᵢ = afterᵢ − beforeᵢ (one value per pair)

t-statistic:

t = mean(d) / (s_d / √n)
where mean(d) = (1/n) × Σ dᵢ, s_d = √(Σ(dᵢ − mean(d))² / (n − 1))

Degrees of freedom:

df = n − 1 (n is the number of pairs)

Two-tailed p-value:

p = 2 × P(T ≥ |t|) where T ~ t_(df)
= I_x(df/2, 1/2), x = df / (df + t²)

Effect size (Cohen's d_z):

d_z = mean(d) / s_d (0.2 small, 0.5 medium, 0.8 large)

Worked Example

Example 1 — Tutoring program (10 students):

  • Before: {85, 78, 92, 88, 76, 95, 89, 82, 91, 84}.
  • After: {88, 82, 95, 90, 80, 96, 92, 85, 93, 87}.
  • Differences: {3, 4, 3, 2, 4, 1, 3, 3, 2, 3} → mean(d) = 2.8, s_d ≈ 0.919.
  • SE = 0.919 / √10 ≈ 0.2906. t = 2.8 / 0.2906 ≈ 9.637. df = 9. t*(0.05, 9) ≈ 2.262.
  • |t| = 9.637 > 2.262 → reject. p < 0.0001 — strong evidence the tutoring improved scores.
  • Cohen's d_z = 2.8 / 0.919 ≈ 3.05 — extremely large effect.

Example 2 — Blood pressure medication (no effect):

  • Before: {140, 138, 145, 142, 139, 137, 144, 141, 143, 140}.
  • After: {139, 137, 146, 141, 138, 138, 143, 140, 142, 141}.
  • Differences: {−1, −1, +1, −1, −1, +1, −1, −1, −1, +1} → mean(d) = −0.4, s_d ≈ 0.97.
  • SE = 0.97 / √10 ≈ 0.307. t = −0.4 / 0.307 ≈ −1.303. |t| < 2.262 → fail to reject.
  • p ≈ 0.225 — blood pressure change is not statistically significant.

Example 3 — Two methods comparison:

  • Lab method A vs B on 5 paired samples.
  • Differences {0.2, −0.1, 0.3, 0.0, 0.1} → mean = 0.10, s_d ≈ 0.158.
  • SE = 0.158 / √5 = 0.0707. t = 0.10 / 0.0707 ≈ 1.414. df = 4. t*(0.05, 4) = 2.776.
  • |t| = 1.414 < 2.776 → fail to reject. p ≈ 0.230. Methods are not significantly different.

Tips

  • The paired t-test is mathematically a one-sample t-test on the per-pair differences. The mean of differences replaces the sample mean, μ₀ = 0, and the SD of differences replaces the sample SD.
  • Pairing is more powerful than the independent two-sample test when within-subject correlation is high — the variance of differences is much smaller than var(before) + var(after). If the correlation is near zero, the paired test loses power.
  • Check normality of the differences (not the raw values) for small samples (n &lt; 30). For clearly non-normal differences, the Wilcoxon signed-rank test is the non-parametric alternative.
  • The mean difference d̄ = mean(after) − mean(before). Positive d̄ means the &quot;after&quot; measurement is higher on average; negative d̄ means lower. The test asks whether d̄ is significantly different from zero.
  • Report effect size: Cohen&apos;s d_z = d̄ / s_d (the standardized mean difference using the SD of differences). Conventional benchmarks: 0.2 small, 0.5 medium, 0.8 large. Pair with the p-value for the complete picture.

Common Mistakes

Warning

The most common mistake is using the paired test on independent samples — the test loses power when the pairing is uninformative (within-subject correlation near zero). A second error is testing the differences for normality but ignoring the before/after raw values — for the paired test, only the differences need to be normal. A third error is forgetting to ensure the lists are in the same subject order; mixing up the pairing destroys the test's validity. A fourth is using the independent two-sample variance formula by mistake — the paired test uses the SD of the per-pair differences, not the pooled SD of the two groups. Finally, do not confuse the mean difference d̄ with the means of the raw values; they are related (mean(d) = mean(after) − mean(before)) but the test operates on d̄ and s_d specifically.

Frequently Asked Questions

What is a paired t-test?
A paired t-test (also called a dependent or matched-pairs t-test) compares the means of two related samples — typically before/after measurements on the same subjects. The test computes the per-pair difference dᵢ = afterᵢ − beforeᵢ, then runs a one-sample t-test on the differences against μ₀ = 0. The test statistic t = mean(d) / (s_d / √n) follows Student&apos;s t with n − 1 degrees of freedom under the null.
When should I use a paired t-test vs an independent (two-sample) t-test?
Use the paired t-test when the same subjects are measured twice (before/after, left/right, two methods on the same sample) — the pairing controls for between-subject variability. Use the independent (two-sample) t-test when the two groups are separate (e.g., treatment vs control with different subjects). Pairing is more powerful when the pairing is informative; if subjects are independent, the paired test loses power.
How does the paired test differ from a one-sample t-test?
The paired t-test is mathematically a one-sample t-test on the per-pair differences. The mean of differences replaces the sample mean, μ₀ = 0 (the null is that the average difference is zero), and the standard deviation of differences replaces the sample SD. Degrees of freedom = n − 1 where n is the number of pairs. This is why the paired test is often called the &quot;t-test on differences.&quot;
What assumptions does the paired t-test make?
The paired t-test assumes (1) the pairs are independent of each other (e.g., different subjects), (2) the differences are approximately normally distributed — verified for small n via a histogram or Q-Q plot, or guaranteed by the central limit theorem for n ≥ 30, and (3) the pairing is meaningful (e.g., the before/after measurements are on the same subject). For non-normal differences in small samples, use the Wilcoxon signed-rank test.
What is the mean difference d̄?
The mean difference d̄ = (1/n) × Σ dᵢ = mean(after) − mean(before). It measures the average per-subject change between the two measurements. A positive d̄ means the &quot;after&quot; measurement is higher on average; a negative d̄ means it is lower. The paired t-test asks whether d̄ is significantly different from zero, controlling for the variability of the differences.
How do I know if pairing was a good idea?
Compare the variance of the differences to the sum of variances of the two groups. If the pairing is informative, the variance of (after − before) should be much smaller than var(before) + var(after) — the within-subject correlation reduces the noise. If var(differences) ≈ var(before) + var(after), the pairing is uninformative and the paired test loses power; in that case the independent two-sample t-test is roughly equivalent.

Paired t-test

The paired t-test compares two related samples — typically before/after measurements on the same subjects. The test reduces to a one-sample t-test on the per-pair differences dᵢ = afterᵢ − beforeᵢ, testing the null that the mean difference is zero. The statistic t = mean(d) / (s_d / √n) follows Student's t with n − 1 degrees of freedom.

When to use (before/after)

Use the paired t-test when the same subjects are measured twice — before/after an intervention, two methods on the same sample, matched pairs in a case-control study. The pairing controls for between-subject variability, making the test more powerful than the independent two-sample t-test when the pairing is informative. If subjects are independent, use the two-sample t-test instead.

Difference vs raw values

The paired test operates on per-pair differences, not on the raw before/after values. This is mathematically equivalent to a one-sample t-test on the differences with μ₀ = 0. The variance of the differences (s_d²) is typically much smaller than var(before) + var(after) when pairing is informative — the within-subject correlation cancels out subject-specific effects.

Paired vs unpaired

The paired test is more powerful when the pairing captures meaningful within-subject correlation. If the pairing is uninformative (correlation near zero), the paired test loses power and the independent two-sample test is preferable. The tradeoff: paired tests have n − 1 df (fewer), but smaller variance; unpaired tests have 2n − 2 df (more), but larger variance. Choose based on the study design.

Selected paired t-statistics and their two-tailed p-values at various degrees of freedom (n − 1 = number of pairs − 1).
t-statisticdf = 4 p-valuedf = 9 p-valuedf = 30 p-valueDecision at α = 0.05
1.00.37390.34210.3253Fail to reject (all df)
2.00.11750.07340.0546df ≤ 9: fail; df = 30: marginal
2.7760.05000.02150.0091Reject (boundary at df = 4)
2.7760.05000.02150.0091df = 4: reject (boundary)
3.00.04000.01310.0056Reject (all df)
4.00.01610.00300.0004Reject (all df)
Info

The paired t-test reduces to a one-sample t-test on the per-pair differences. This is mathematically why the test has n − 1 degrees of freedom (where n is the number of pairs, not the total number of measurements). The reduction in df compared to the independent two-sample test (which has 2n − 2 df) is the cost of pairing; the benefit is a smaller variance when the within-subject correlation is high. The tradeoff is always favorable when the correlation exceeds 0.5.

Pro tip

For non-normal differences in small samples, use the Wilcoxon signed-rank test — a non-parametric alternative that ranks the absolute differences and tests whether positive and negative ranks balance. It does not assume normality but assumes the differences are symmetric around the median. For paired categorical data (e.g., before/after yes/no), use McNemar's test instead — a chi-square test on paired proportions.

Authoritative References

  • Wikipedia — Paired difference test— wikipedia.org
    Comprehensive treatment of the paired difference test, including the paired t-test, Wilcoxon signed-rank test, and the analysis of paired data from crossover designs.
  • Khan Academy — Two-sample and paired t-tests— khanacademy.org
    Khan Academy unit on two-sample and paired t-tests, with videos and exercises on computing the test statistic and interpreting the p-value.
  • Stat Trek — Paired t-test— stattrek.com
    Stat Trek reference on the paired t-test, including assumptions, the formula, and worked examples for before/after designs.

Try our other free calculators

CalcGenius has 1,200+ free, ad-free, browser-based calculators for finance, health, math, science, and everyday life. No sign-up required.

Paired T Test Calculator — Distribution Tails & P-Value Test