Skip to content
Statculator
Confidence Intervals

Paired t-Test Confidence Interval Calculator

Free paired t-test confidence interval calculator. Get the CI for the mean difference μ_d of before-and-after or matched-pairs data, with full steps.

Free, no sign-up Runs in your browserBy Hira Noor, BS MathematicsUpdated

Try
%

Usually 90, 95 or 99.

Data input
Paired observations
#Before (x₁)After (x₂)Remove row
1
2
3
4
5
6
7
8
9
10
Tip: paste rows straight from a spreadsheet.

One row per subject. Each difference is d = x₁ − x₂ (Before − After), so a positive d means the value went down. Paste two columns from a spreadsheet.

Results

95% confidence interval for μ_d
(3.6753, 7.7247)
d̄ ± E = 5.7 ± 2.0247
Mean difference, d̄ (x₁ − x₂)
5.7
t interval, df = 9

0 is outside the interval

The whole interval is above 0, so the After values are lower than the Before values on average (a decrease).

Lower bound
3.6753
Upper bound
7.7247
Point estimate, d̄
5.7
Margin of error, t* × SE
2.0247
Standard error, s_d / √n
0.895
Critical value, t*
2.2622
Degrees of freedom, n − 1
9
SD of differences, s_d
2.8304
Number of pairs, n
10
Mean Before / After
148.5 / 142.8

Interpretation: We are 95% confident that the population mean difference μ_d (Before − After) lies between 3.6753 and 7.7247. Because the interval is entirely above 0, the After values are lower than the Before values on average (a decrease). The confidence level is the method’s long-run hit rate: about 95% of intervals built this way from repeated samples would contain μ_d.

  • With 10 pairs, the interval assumes the differences are roughly normal. A few large differences in one direction can distort it; look at the table of differences for outliers.
normal distribution curve with the shaded probability region, markers at L = 3.675, U = 7.725L = 3.675U = 7.7253456789Possible values of the mean difference d̄
Illustrative only: a normal curve centred on d̄ = 5.7 with SD = SE = 0.895, approximating the sampling distribution of d̄. Shaded: the 95% interval.

Differences, d = x₁ − x₂

#Before (x₁)After (x₂)d = x₁ − x₂d − d̄(d − d̄)²
114213571.31.69
21501464-1.72.89
31381362-3.713.69
415514871.31.69
514714160.30.09
6160150104.318.49
71391372-3.713.69
815114471.31.69
91451423-2.77.29
1015814993.310.89
Σ1485142857072.1

Step-by-step solution

  1. 1

    Compute the difference for each pair

    Subtract After from Before for every subject. The full list is in the table of differences.

    d₁ = 142 − 135 = 7
    d₂ = 150 − 146 = 4
    d₃ = 138 − 136 = 2
    d₄ = 155 − 148 = 7
    …
  2. 2

    Find the mean and SD of the differences

    d̄ = Σd / n = 57 / 10 = 5.7
    s_d = √[Σ(d − d̄)² / (n − 1)] = √(72.1 / 9) = 2.8304
  3. 3

    Find the standard error

    SE = s_d / √n = 2.8304 / √10 = 0.895
  4. 4

    Find the critical value t*

    Use the t distribution with df = n − 1 = 9. Each tail holds (1 − 0.95) / 2 = 0.025.

    t* = t(0.975, 9) = 2.2622
  5. 5

    Calculate the margin of error and the interval

    E = t* × SE = 2.2622 × 0.895 = 2.0247
    d̄ ± E = 5.7 ± 2.0247
    95% CI for μ_d: (3.6753, 7.7247)
  6. 6

    Check whether 0 is in the interval

    0 is outside the interval, so the After values are lower than the Before values on average (a decrease).

What is a Paired t-Test Confidence Interval Calculator?

A paired t confidence interval estimates the mean of the differences μ_d between two related measurements, such as the same people before and after a treatment. Compute each difference d = x₁ − x₂, then build d̄ ± t* · s_d / √n with n − 1 degrees of freedom. If the interval excludes 0, the average change is unlikely to be zero. For example, ten patients whose blood pressure fell by 7, 4, 2, 7, 6, 10, 2, 7, 3 and 9 mmHg give d̄ = 5.7, s_d = 2.8304 and a 95% interval of (3.6753, 7.7247).

What the Paired t-Test Confidence Interval Calculator does

This calculator takes two columns of paired data, a list of differences or just the summary statistics d̄, s_d and n. From raw pairs it computes d = Before − After for each pair, then returns the interval for the population mean difference μ_d with its margin of error, standard error, t critical value and degrees of freedom. With raw data, a table lists every difference and its squared deviation so you can check the working. For the full theory, see the paired t-test guide.

It is also a confidence interval for paired differences calculator, a matched pairs confidence interval calculator and a dependent samples (paired samples) interval: all three names describe the same method, a one-sample t interval on the differences. The quantity it estimates is the mean of the differences μ_d, not the difference of two separate means, which is why the data must be entered pair by pair.

Use it whenever each value in one set is naturally matched to one value in the other: pre-test and post-test scores of the same students, a patient’s blood pressure before and after medication, two measuring instruments applied to the same samples. Pairing removes the variation between subjects, so the interval is usually much narrower than the independent-samples interval would be on the same numbers.

How to use the Paired t-Test Confidence Interval Calculator

  1. Set the Confidence level.
  2. Choose Two columns and enter each subject’s Before (x₁) and After (x₂) values on one row, choose Differences only and paste the differences, or choose Summary and enter d̄, s_d and the number of pairs n.
  3. Remember the direction: the calculator uses d = x₁ − x₂, so a positive mean difference means the After values are lower.
  4. Read the interval and whether 0 is inside it, then check the table of differences for any unusual pair.

How to calculate a paired t-test confidence interval by hand

The calculation takes six steps. The worked example further down applies them to the blood pressure data.

  1. Find each difference: dᵢ = x₁ᵢ − x₂ᵢ for every pair, always subtracting in the same direction and keeping the sign.
  2. Average the differences: d̄ = Σd / n. This is the point estimate and the centre of the interval.
  3. Find the SD of the differences: s_d = √[Σ(dᵢ − d̄)² / (n − 1)].
  4. Find the standard error: SE = s_d / √n, where n is the number of pairs.
  5. Find the critical value: t* for your confidence level on df = n − 1 (2.2622 for 95% with 10 pairs).
  6. Build the interval: E = t* × SE, then the lower and upper limits are d̄ − E and d̄ + E.

Paired t-test confidence interval formula

Differences
dᵢ = x₁ᵢ − x₂ᵢ
Confidence interval for μ_d
d̄ ± t*₍α/2, n−1₎ · s_d / √n
SD of the differences
s_d = √[ Σ(dᵢ − d̄)² / (n − 1) ]
Formula symbols
SymbolMeaning
x₁ᵢ, x₂ᵢthe two measurements for pair i (Before, After)
d̄mean of the n differences
s_dstandard deviation of the differences
nnumber of pairs; df = n − 1
μ_dpopulation mean of the differences, the quantity being estimated

The paired interval is a one-sample t interval applied to the differences. That is why only the differences matter: the spread of the Before and After columns themselves does not enter the formula.

Look up t* in the t-table or with the T Critical Value Calculator. The t distribution behind the interval was introduced by Student (1908, Biometrika), whose worked examples included paired data: the extra hours of sleep the same patients gained on two different drugs.

Sources: Student (1908), The probable error of a mean, Biometrika 6(1), 1–25; Diez, Çetinkaya-Rundel and Barr, OpenIntro Statistics, 4th ed., section 7.2 on paired data. The worked example and the interval table were checked against this site’s t-distribution routines to four decimals.

Worked example

Worked example: blood pressure medication

Problem. Ten patients have their systolic blood pressure measured before and after four weeks on a new medication (the default data above). Find a 95% confidence interval for the mean reduction.

  1. 01Differences (Before − After): 7, 4, 2, 7, 6, 10, 2, 7, 3, 9.
  2. 02d̄ = 57 / 10 = 5.7 mmHg; Σ(d − d̄)² = 72.1, so s_d = √(72.1 / 9) = 2.8304.
  3. 03SE = 2.8304 / √10 = 0.8950; df = 9, so t* = 2.2622.
  4. 04E = 2.2622 × 0.8950 = 2.0247.
  5. 05Interval: 5.7 ± 2.0247 = (3.6753, 7.7247).

Answer. We are 95% confident that the medication lowers mean systolic blood pressure by between about 3.7 and 7.7 mmHg. The interval lies entirely above 0, so the reduction is unlikely to be chance alone; the matching paired t-test gives t = 6.3684, df = 9, p = 0.0001. In APA style: mean reduction = 5.70 mmHg, 95% CI [3.68, 7.72].

How to interpret a paired confidence interval

Read the interval in three parts. The sign gives the direction of the change: with d = Before − After, an interval above 0 means the values went down and one below 0 means they went up. The width shows how precisely the data pin down the average change. And whether 0 is inside links the interval to the two-sided paired t-test at α = 1 − C: if 0 is excluded, the test rejects H₀: μ_d = 0.

The table runs the blood pressure data at three confidence levels. The standard error stays at 0.8950; only t* changes, so a higher confidence level gives a wider interval from the same ten patients. All three exclude 0, matching the paired t-test’s p = 0.0001.

Confidence levelt* (df = 9)Margin of errorInterval for μ_dContains 0?
90%1.83311.6407(4.0593, 7.3407)No
95%2.26222.0247(3.6753, 7.7247)No
99%3.24982.9088(2.7912, 8.6088)No

Paired vs independent confidence interval on the same data

Pairing matters. The table puts the blood pressure columns through both methods. Each patient’s Before and After readings are strongly correlated (r ≈ 0.96), so the paired interval removes the large differences between patients and is about one third as wide. Treating the same numbers as two independent groups gives an interval that includes 0 and misses a clear effect.

Choose the method by how the data were collected, never by which interval looks better. For two unrelated groups, use the Mean Difference Confidence Interval Calculator.

Paired t interval (this page)Welch two-sample interval
Treats the data as10 pairs, one difference eachTwo independent groups of 10
Point estimated̄ = 5.7x̄₁ − x̄₂ = 148.5 − 142.8 = 5.7
Standard errors_d / √n = 0.8950√(s₁²/n₁ + s₂²/n₂) = 2.9891
Degrees of freedomn − 1 = 916.33 (Welch–Satterthwaite)
95% interval(3.6753, 7.7247)(−0.6260, 12.0260)
Contains 0?NoYes

Common use cases

  • Before-and-after studies: training, diet, medication or process changes measured on the same units.
  • Crossover experiments where each subject receives both conditions.
  • Method comparison: two instruments, raters or labs measuring the same specimens.
  • Matched-pair designs, such as twins or patients matched on age and sex.

Assumptions and limitations

  • Pairs must be genuine: the pairing has to be set by the design (same subject, matched partner), not created by sorting the two columns.
  • Independent pairs: one pair should not influence another.
  • Normal differences: for small n the differences, not the raw values, should be roughly normal. If they are strongly skewed, consider a Wilcoxon signed-rank approach.
  • Rows with a missing Before or After value cannot be used; this calculator rejects incomplete rows rather than dropping them silently.
  • For a test of H₀: μ_d = 0 with a p-value, use the Paired t-Test Calculator.

Frequently asked questions

What is the difference between a paired and an independent confidence interval?

A paired interval works on the within-pair differences, so each subject acts as its own control and between-subject variation drops out. An independent interval compares two unrelated groups and must include both groups’ variability, so it is wider. Using the wrong one gives a misleading width.

Which direction should I subtract, before minus after or after minus before?

Either works if you are consistent and report it. This calculator uses d = x₁ − x₂ (Before − After), so a positive interval means the values went down. Swapping the columns flips the signs of both bounds without changing the width.

What does it mean if the paired confidence interval contains 0?

It means an average change of zero is consistent with the data, so you cannot conclude that the two measurements differ on average. A two-sided paired t-test at α = 1 − confidence level would not reject H₀: μ_d = 0.

How many degrees of freedom does a paired t interval use?

It uses n − 1, where n is the number of pairs, not the total number of measurements. Ten patients measured twice give 10 differences and 9 degrees of freedom.

What is the formula for a paired t-test confidence interval?

The interval is d̄ ± t* × s_d / √n, where d̄ is the mean of the paired differences, s_d is their standard deviation, n is the number of pairs and t* is the critical value from the t distribution with n − 1 degrees of freedom. For 10 pairs at 95% confidence, t* = 2.2622.

How do I get a paired confidence interval in R, Python or Excel?

In R, t.test(before, after, paired = TRUE, conf.level = 0.95)$conf.int returns it. In recent SciPy versions, scipy.stats.ttest_rel(before, after).confidence_interval(0.95) does the same. In Excel, put the differences in one column; =CONFIDENCE.T(0.05, STDEV.S(range), COUNT(range)) gives the margin of error, which you add to and subtract from =AVERAGE(range). All three match this calculator.

How do I report a paired confidence interval?

State the mean difference, its direction, the confidence level and the bounds in brackets. For the worked example: blood pressure fell by a mean of 5.70 mmHg, 95% CI [3.68, 7.72], t(9) = 6.37, p < .001. Reporting the interval alongside the paired t-test shows how large the change is, not only whether it is zero.

Can I use this if I only know the mean and SD of the differences?

Yes. Choose Summary (d̄, s_d, n) in the Data input switch above; the interval only needs those three numbers. Make sure s_d is the SD of the differences, not of either column. The Mean Confidence Interval Calculator gives the same result with d̄, s_d and n entered as x̄, s and n, because the paired interval is a one-sample t interval on the differences.

Cite this page

Statculator. (2026, November 14). Paired t-Test Confidence Interval Calculator. Retrieved November 14, 2026, from https://statculator.com/confidence-intervals/paired-t-test-confidence-interval-calculator/