Paired t-Test Calculator

Compare two dependent samples using the paired (dependent) t-test. Compute the t-statistic, p-value, confidence interval, and Cohen's d effect size. Visualize paired differences with a before‑after plot and a difference distribution.

Enter paired observations below. Each row represents one pair.
# Group 1 (Before / Treatment) Group 2 (After / Control) Difference (d = G1 − G2)
⚖️ Weight Loss: Before/After Diet
? Exam Scores: Pre/Post Training
? Blood Pressure: Drug vs Placebo (paired)
? Sleep Hours: With/Without Melatonin
⚪ No Effect: Random paired data
Paste Your Data

Paste two columns of data into the text area below. Supports tab, space, or comma separators, one pair per line.
Example:
85.2 82.1
78.5, 75.3
92.1\t88.7

Privacy first: All calculations are performed locally in your browser. No data is sent to any server.

What Is a Paired t-Test?

The paired t-test (also known as the dependent t-test, matched-pairs t-test, or repeated-measures t-test) is a statistical procedure used to determine whether the mean difference between two sets of paired observations is significantly different from zero. It is the appropriate test when the data consist of pairs of measurements that are naturally related — for example, measurements taken from the same subject before and after a treatment, or measurements from matched pairs of subjects.

Unlike the independent-samples t-test, the paired t-test accounts for the correlation between the two measurements by analyzing the differences within each pair. This reduces variability and increases statistical power, making it the method of choice for pre-post designs, crossover trials, and matched case-control studies.

For paired observations (xi, yi), define di = xi − yi.
The test statistic is: t = d̄ / (sd / √n)
where d̄ is the mean difference, sd is the standard deviation of the differences, and n is the number of pairs.

When Should You Use a Paired t-Test?

  • Pre‑Post Studies: Measuring the same subjects before and after an intervention (e.g., blood pressure before and after medication).
  • Repeated Measures: The same subjects measured under two different conditions (e.g., reaction time with and without caffeine).
  • Matched Pairs: Subjects are matched on relevant characteristics (e.g., twins, siblings, or case-control matching).
  • Crossover Designs: Each subject receives both treatments in random order, and outcomes are compared within subjects.
  • Longitudinal Studies: Tracking changes over time at two time points.

Assumptions of the Paired t-Test

For the paired t-test to produce valid results, the following assumptions should be met:

  1. Paired observations: Each pair consists of two measurements that are naturally related or matched.
  2. Independence: The pairs are independent of each other (i.e., one pair does not influence another).
  3. Normality: The differences (di) are approximately normally distributed. For large sample sizes (n ≥ 30), the test is robust to moderate departures from normality due to the Central Limit Theorem.
  4. Scale: The outcome variable is continuous (interval or ratio scale).

If the normality assumption is severely violated, consider using the Wilcoxon signed-rank test (a non-parametric alternative). Our calculator includes a normality check on the differences via the Shapiro-Wilk test (reported in the results when applicable).

How to Interpret the Results

  • t-statistic: A measure of the magnitude of the mean difference relative to the variability in the differences. Larger absolute t-values indicate stronger evidence against the null hypothesis.
  • p-value: The probability of observing a t-statistic as extreme as the one calculated, assuming the null hypothesis (mean difference = 0) is true. If p < α, we reject the null hypothesis and conclude that the mean difference is statistically significant.
  • Confidence Interval (CI): The range of values within which the true population mean difference is likely to fall, with a given level of confidence (e.g., 95%). If the CI does not include zero, the result is statistically significant.
  • Cohen's d: A measure of effect size that quantifies the standardized mean difference. Values of 0.2, 0.5, and 0.8 are considered small, medium, and large effects, respectively.

Step‑by‑Step Calculation Process

  1. Compute the difference di = xi − yi for each pair.
  2. Calculate the mean difference: d̄ = (Σ di) / n.
  3. Calculate the standard deviation of the differences: sd = √( Σ (di − d̄)² / (n − 1) ).
  4. Compute the standard error: SE = sd / √n.
  5. Compute the t-statistic: t = d̄ / SE.
  6. Determine the degrees of freedom: df = n − 1.
  7. Find the p-value from the t-distribution with df degrees of freedom.
  8. Compute the confidence interval: d̄ ± tcritical × SE.
  9. Calculate Cohen's d: d = d̄ / sd.
Case Study: Evaluating a New Teaching Method

A high school mathematics teacher implements a new interactive teaching method and wants to evaluate its effectiveness. She administers a pre-test and a post-test to 20 students. The pre-test scores (out of 100) and post-test scores are recorded for each student. Using this paired t-test calculator, she enters the 20 pairs of scores and obtains:

  • Mean difference (post − pre): +8.4 points
  • t-statistic: 5.23
  • p-value: < 0.001
  • 95% CI: [5.1, 11.7]
  • Cohen's d: 1.17 (large effect)

Conclusion: The new teaching method is associated with a statistically significant and practically meaningful improvement in test scores. The large effect size (d = 1.17) indicates that the improvement is substantial. The teacher can confidently recommend the new method to her colleagues.

Common Mistakes and Misconceptions

  • Using an independent t-test instead of a paired t-test: This is a common error that leads to loss of statistical power and can produce misleading results. Always use the paired t-test when observations are paired.
  • Interpreting a non-significant result as "no effect": A non-significant p-value does not prove that there is no effect; it only indicates that the evidence is insufficient to reject the null hypothesis. Consider the sample size and the confidence interval.
  • Ignoring the normality assumption: For small samples, severe departures from normality can invalidate the test. Check the distribution of the differences using a histogram or a Q-Q plot.
  • Over-reliance on p-values: Statistical significance does not necessarily imply practical significance. Always report and interpret the effect size (Cohen's d) alongside the p-value.
  • Paired t-test on aggregated data: The test should be performed on the individual paired differences, not on group means.

Applications Across Disciplines

  • Medicine & Healthcare: Pre-post drug efficacy, blood pressure changes, cholesterol reduction, patient-reported outcomes.
  • Psychology & Behavioral Sciences: Therapy effectiveness, cognitive training, sleep studies, mood interventions.
  • Business & Economics: Employee training evaluation, customer satisfaction before/after, pricing experiments (within-subject).
  • Education: Teaching method effectiveness, test score improvements, curriculum evaluation.
  • Sports Science: Performance enhancement, injury rehabilitation, training program evaluation.
  • Environmental Science: Pollution levels before and after regulation, water quality measurements over time.

Paired t-Test vs. Independent t-Test

Feature Paired t-Test Independent t-Test
Data structure Paired observations (two measurements per subject) Two independent groups (different subjects)
Variance accounted for Within-subject variability (reduced) Between-subject variability (larger)
Statistical power Higher (when pairing is effective) Lower (more noise)
Design examples Pre-post, crossover, matched pairs Treatment vs. control groups
Degrees of freedom n − 1 n1 + n2 − 2
Normality assumption On the differences (di) On each group separately

Derivation of the Paired t-Test Statistic

Let (X1, Y1), ..., (Xn, Yn) be n paired observations. Define the differences Di = Xi − Yi. Under the null hypothesis H0: μD = 0, the test statistic:

t = (D̄ − 0) / (sD / √n) ~ t(n−1)

where D̄ = (1/n) Σ Di is the sample mean difference, and sD = √( Σ (Di − D̄)² / (n−1) ) is the sample standard deviation of the differences. Under H0, this statistic follows a t-distribution with n−1 degrees of freedom. The p-value is computed as the probability of observing a t-statistic at least as extreme as the observed value, under the null distribution.

The (1 − α) × 100% confidence interval for the population mean difference μD is:

D̄ ± t(n−1, α/2) × (sD / √n)

where t(n−1, α/2) is the critical value from the t-distribution with n−1 degrees of freedom.

Frequently Asked Questions

The paired t-test is used when the two samples are dependent (e.g., same subjects measured twice), while the independent t-test is used when the two samples are independent (e.g., two separate groups). The paired t-test accounts for the correlation between the two measurements, which reduces variability and increases power.

The required sample size depends on the expected effect size, desired power, and significance level. Generally, for a small effect (d = 0.2), you may need 100+ pairs; for a medium effect (d = 0.5), about 30–40 pairs; and for a large effect (d = 0.8), 15–20 pairs are often sufficient. Use power analysis tools to determine the exact sample size for your study.

If the normality assumption is violated and the sample size is small (n < 30), consider using the Wilcoxon signed-rank test, which is a non-parametric alternative that does not require normality. For larger samples (n ≥ 30), the paired t-test is robust to moderate violations of normality due to the Central Limit Theorem.

Cohen's d is a standardized effect size that measures the magnitude of the mean difference relative to the standard deviation of the differences. Conventional benchmarks: d = 0.2 (small effect), d = 0.5 (medium effect), d = 0.8 (large effect). However, these benchmarks are context-dependent and should be interpreted in the context of your field of study.

No, the paired t-test is designed for two paired measurements. For more than two time points, you should use repeated-measures ANOVA or a mixed-effects model. However, you can perform multiple paired t-tests with appropriate correction for multiple comparisons (e.g., Bonferroni correction).

A one-tailed test evaluates whether the mean difference is greater than (or less than) zero in a specific direction. A two-tailed test evaluates whether the mean difference is different from zero in either direction. The two-tailed test is more conservative and is the standard choice unless you have a strong directional hypothesis. Our calculator reports the two-tailed p-value by default.

Explore authoritative resources such as Khan Academy Statistics, Statistics How To, and the classic textbooks "Introduction to the Practice of Statistics" by Moore & McCabe, or "Discovering Statistics Using R" by Field, Miles, and Field.
References: NIST/SEMATECH e-Handbook of Statistical Methods – Paired t-Test; Cohen, J. (1988). "Statistical Power Analysis for the Behavioral Sciences" (2nd ed.); Wikipedia: Paired Difference Test.
This tool implements the standard paired t-test as described in the above references. The p-value is computed via numerical integration of the t-distribution.