standarddeviationcalculator.net

T-test calculator

Paste your groups to get the t statistic, the p value and — just as importantly — a confidence interval and an effect size. Choose the design that matches how the data was collected; that choice matters more than any other setting on this page.

Which test

Separate values with commas, spaces, tabs or new lines — paste a column straight from a spreadsheet. A paired test needs the two lists in the same order and the same length.

Assume equal variances

The shape of every t-test

All three variants are the same calculation with a different difference in the numerator:

t = (difference being tested) ÷ (standard error of that difference)

The standard error is where the designs part company. A one-sample test divides the sample standard deviation by √n. A paired test does the same thing to the list of within-pair differences. A two-sample test has to combine two separate sources of variability, which is where the Welch-versus-pooled question arises.

Choosing the right design

SituationTestdf
One group vs a target valueOne-samplen − 1
Two independent groupsTwo-sample (Welch)Fractional
Two independent groups, equal variancesTwo-sample (pooled)n₁ + n₂ − 2
Same subjects measured twicePairedn − 1

Why pairing is worth so much

Suppose you measure ten people before and after a treatment. People differ enormously from one another, and a two-sample test would have to fight through all of that between-person variation to see the effect.

Subtracting within each pair removes it entirely. Whether someone started at 200 or at 120 no longer matters — only their own change does. The result is a much smaller standard error and a test that can detect a far smaller effect with the same number of measurements. Discarding the pairing is throwing away the best feature of your own design.

Reading the result properly

The p value answers one narrow question. Three numbers together answer the useful one:

A result can be highly significant and trivially small, if the sample is large enough. It can also be non-significant and quite possibly important, if the sample is small — "not significant" means "not established", never "no effect".

What the test assumes

Why "t" rather than "z"

If you knew the population standard deviation, you could use a normal distribution and compute a z-score. You almost never do — you estimate it from the same small sample you are testing, and that estimate carries its own error.

The t distribution accounts for that extra uncertainty with heavier tails, which is what makes the critical values larger than z's at small sample sizes. As the sample grows the estimate firms up, the tails thin, and t converges on z — by df = 30 the difference is already small, and by df = 100 it is negligible.

Common questions

What does a t-test do?

It asks whether a difference between means is larger than the noise in the data can comfortably explain. The t statistic is that difference divided by its standard error — the number of standard errors of separation — and the p value converts it into a probability.

A large t means the gap is big relative to the uncertainty. A t near zero means the groups are as close as you would expect from random sampling alone.

Which t-test should I use?

One-sample: one group against a known or target value. Two-sample: two separate groups of different subjects. Paired: the same subjects measured twice — before and after, left and right, two methods on the same specimens.

The distinction between two-sample and paired matters enormously. Using a two-sample test on paired data throws away the pairing and usually hides a real effect.

What is Welch's t-test and why is it the default here?

Student's original test assumes the two groups share one variance and pools them into a single estimate. Welch's version does not assume that, and adjusts the degrees of freedom downwards to compensate.

Welch is the default because unequal variances are the common case, not the exotic one, and when they are unequal the pooled test reports p values that are too small. Welch costs almost nothing in power when the variances do happen to match, so it is the safer starting point. The toggle is there if you need to match a textbook worked example.

What does a p value of 0.03 actually mean?

That if the two population means were truly identical, you would see a difference at least this large about 3% of the time by chance alone. It is not the probability that the null hypothesis is true, and not the probability the result is a fluke.

It also says nothing about how big the difference is. That is why this calculator reports a confidence interval and Cohen's d beside the p value.

What is Cohen's d?

The difference between the means expressed in standard deviations, so it does not change with sample size the way a p value does. The conventional bands are 0.2 small, 0.5 medium, 0.8 large.

It answers the question a p value cannot: not "is there a difference" but "is it big enough to care about". With a large enough sample almost any difference becomes statistically significant, and d is what keeps that in perspective.

Why do the degrees of freedom come out as a decimal?

Because Welch's correction produces a fractional value. The Welch–Satterthwaite approximation blends the two groups' variances and sample sizes into an effective degrees of freedom, which lands between whole numbers. That is expected, not an error — the pooled test is the one that gives a whole number.

Related calculators

Written and reviewed by our editorial team. Last updated . Method and sources: how these numbers are computed.