Skip to content

Paired T-Test Calculator

Paste two matched columns, such as each person before and after…

Paste two matched columns, such as each person before and after, to test the average change with a paired t-test, every pair drawn as a line.

Enter

Read 12 values; left out the header row (“Before”).

Read 12 values; left out the header row (“After”).

More optionsTwo-sided, 95% confidence
Hypothesis
Confidence level

The significance level is 1 − the confidence level (0.05 at 95%).

ExampleP-value

5.64 × 10⁻⁶

On average After is 3 lower than Before (difference −3, 95% CI −3.813 to −2.187). Significant at the 5% level (p < 0.05).

Paste your own numbers to test them.

Before n = 12After n = 12

Each line joins one pair, from before to after; the diamonds are the means.

The distribution the statistic follows if there were no difference; the shaded area beyond it is the p-value.

t, df
−8.124, 11
Effect size dz (Hedges g)
−2.345 (−2.181)
Pairs up · down · same
0 · 12 · 0
How this works: 9 sources,

How this works

Method

A paired t-test is for two measurements of the same things: each person before and after a programme, each plot of land with two fertilisers, each machine on two settings. Instead of comparing two groups, it works out the difference within every pair and asks whether the average difference is zero. In the example, twelve runners’ resting heart rates fell by 3 beats per minute on average after eight weeks, and every one of them went down. Full method

How it’s tested

2 worked examples for this page are checked by automated tests before every release: given the inputs, the tool must show the expected answer.

Privacy

On your device. Nothing you enter or open leaves this browser. About privacy labels

Changes

  • First published: live curves with draggable cut-offs, and tests on pasted data (t-tests, ANOVA, chi-square, Fisher’s exact, correlation, regression, A/B), checked against SciPy.

Every change on What’s new

How we make toolsReport a mistake

How the paired t-test works

A paired t-test is for two measurements of the same things: each person before and after a programme, each plot of land with two fertilisers, each machine on two settings. Instead of comparing two groups, it works out the difference within every pair and asks whether the average difference is zero. In the example, twelve runners’ resting heart rates fell by 3 beats per minute on average after eight weeks, and every one of them went down.

Pairing removes the large differences between people, which would otherwise swamp the change. Their resting rates range from 60 to 92, so run the same numbers through a two-sample test and the p-value is about 0.41, nothing to see; paired, it is about 0.000006, because everyone’s own baseline cancels out. The flip side: the pairs must really belong together, in the same order in both columns.

The test is a one-sample t-test on the differences: t = mean difference ÷ (SD of differences ÷ √n), with n − 1 degrees of freedom. The effect size here is dz, the mean difference in standard deviations of the differences. It runs larger than Cohen’s d for independent groups on the same data, so don’t compare the two directly.

dᵢ = afterᵢ − beforeᵢ · t = d̄ ÷ (s_d ÷ √n), df = n − 1

The smallest average change a paired test can detect

When the differences have a standard deviation of 5: the mean change needed for a two-sided p-value under 0.05, by the number of pairs (t* × 5 ÷ √n).

When the differences have a standard deviation of 5: the mean change needed for a two-sided p-value under 0.05, by the number of pairs (t* × 5 ÷ √n).
Pairsdft* (5%)Mean change needed
324.303±12.421
433.182±7.956
542.776±6.208
652.571±5.247
872.365±4.18
1092.262±3.577
12112.201±3.177
15142.145±2.769
20192.093±2.34
30292.045±1.867
Show all 13 rows
50492.01±1.421
100991.984±0.992
2001991.972±0.697

Common questions

When is data paired?

When every value in one column has a natural partner in the other: the same person measured twice, twins, left and right eyes, matched patients, or the same product tested two ways. If the two columns are just two separate groups that happen to be the same size, use the two-sample t-test.

What if some people are missing an “after” value?

They can’t be used in a paired test. Paste the two columns together and rows with only one value are left out (the page says how many), keeping the pairs aligned.

Does the order of the columns matter?

Only for the sign. The difference is the second column minus the first, so a drop shows as a negative mean difference; the p-value is the same either way for a two-sided test.