Paired t-Test Calculator: Before and After Data, Mean Difference, p-Value and Confidence Interval

Test whether the average change between paired measurements is real.

Calculated from standard textbook formulas, with every step shown. The formulas are fixed, so the working does not need checking: what matters is the numbers you type in. Use these calculators only if you are competent to choose the inputs (loads, material strength, dimensions, supports) and check your units and assumptions. For learning and checking your own working: design and sign-off are for a qualified engineer. Drafting Central does not store the numbers you type.

How this calculator works

Set how many pairs you have and enter the before and after values.

Enter the significance level.

The calculator finds the differences, then gives the t statistic, the p-values, the confidence interval and the effect size.

Formulas used

  • d_i = a_i - b_i
  • t = \frac{\bar{d}}{s_d/\sqrt{n}}
  • df = n - 1
  • d_z = \frac{\bar{d}}{s_d}

Worked example

With the default numbers in the calculator above:

  1. The differences (after minus before): 2, 3, 1, 3, 1, 3, 1, 3 (n = 8 pairs)
  2. Mean difference: 2.125
  3. Standard deviation of the differences: 0.991031
  4. Standard error of the mean difference: 0.350382
  5. Test statistic t: 6.0648 with 7 degrees of freedom
  6. Two-tailed p-value: 0.00050845
  7. One-tailed p-value (in the direction of the difference you found): 0.00025423
  8. Confidence interval for the mean difference: 1.2965 to 2.9535 (the critical t is 2.3646)
  9. Effect size (Cohen's d for paired data): 2.144 (about 0.2 small, 0.5 medium, 0.8 large)

Change the numbers in the calculator to see the full working, every step, for your own case.

Common questions

When do I use a paired t-test?

When the same subjects are measured twice, such as before and after a treatment, or when the values are naturally matched in pairs.

What is the difference between a paired and an independent t-test?

A paired test uses the difference within each pair, which removes the variation between subjects. An independent test compares two separate groups.

What does the p-value mean?

The chance of an average change at least this large if the true average change were zero.

Related calculators

Got a question about this? Ask an engineering question and get a plain-language answer with references.

Further reading: Any statistics text (the paired t-test).

Need a calculator we do not have?

Tell us what you would like to calculate. We read every request and build the most asked-for ones.

We store your request (and your email if you give it) to decide what to build. We do not store the numbers you type into calculators.

Embed this calculator on your own page

Copy this code into your page. The calculator runs inside the frame and links back to Drafting Central.

Need this drawn, designed or checked?

Drafting Central is a mechanical engineering and drafting business working with customers across Australia and around the world. A calculator gives you the numbers; we can turn them into drawings and designs.

Need help with a real project?

Talk to Drafting Central →

← All engineering calculators