Change language

Statistics

Student t test calculator

Compare two group means, paired samples, or one sample against a value.

Reviewed by SolucionesAhora.com How we verify

Calculator inputs

Results

Enter your values and press “Calculate” to see the result.

In short

What it calculates
Compare two group means, paired samples, or one sample against a value.
Formula used
Independent: t = (x̄₁ − x̄₂) / √(s²p · (1/n₁ + 1/n₂))
Example
Group 1: 12, 15, 14, 16, 13, 15 (mean 14.17)

Student t test calculator

The t test answers one precise question: is the difference between these means real, or could sampling chance explain it?

All three variants are included, covering almost every case in a research project.

How it works

For independent samples the difference in means is compared against pooled variability. For paired samples the mean of the individual differences is analysed, which is usually less noisy.

The p value is computed from the exact t distribution, not from approximate tables.

Formula

Independent: t = (x̄₁ − x̄₂) / √(s²p · (1/n₁ + 1/n₂))

Paired: t = d̄ / (s_d / √n)

One sample: t = (x̄ − μ₀) / (s / √n)

Worked example

Group 1: 12, 15, 14, 16, 13, 15 (mean 14.17)
Group 2: 18, 17, 19, 16, 20, 18 (mean 18.00)

t = −5.42 with 10 df
p = 0.0003 → significant difference

Explanation

Paired or independent

If you measure the same people before and after, the samples are related and you need the paired test, which compares individual differences. If you compare two distinct groups, they are independent. Applying the wrong test changes the result entirely, and it is the commonest design error.

The p-value does not mean what people think

It is not the probability that the hypothesis is false, nor the probability that the result is chance. It is the probability of observing a difference at least as large as yours if no real difference existed. It is a subtle distinction but it changes completely what can be concluded.

Significant is not important

With large samples, minuscule differences come out significant. That is why a test should always be accompanied by effect size and a confidence interval, which do convey magnitude. Publishing only the p-value hides what actually matters.

If the data are not normal

With reasonably large samples the test is fairly robust thanks to the central limit theorem. With small samples and highly skewed distributions, use non-parametric alternatives such as the Mann-Whitney U or the Wilcoxon test.

Frequently asked questions

When do I use paired samples?

When the same subjects are measured twice, for example before and after an intervention. Both lists must have the same number of values.

Which p value indicates significance?

By convention, below 0.05. It is an arbitrary threshold: always report the exact p value and the effect size.

What if my data are not normal?

With large samples the test is robust. With small samples and clearly non-normal data, use non-parametric alternatives.

What exactly does the p-value mean?

The probability of observing a difference at least as large as yours if there were in fact no difference. It is not the probability that the hypothesis is false.

What if my data are not normally distributed?

With large samples the test holds up well. With small samples and skewed data, use the Mann-Whitney U or the Wilcoxon test.

Need to calculate something else?

These tools are often used alongside this calculator.

Pearson

The r coefficient, R², p value and an interpretation of the strength.

Sample size

How many responses you need for your survey to be representative.

Margin of error

How precise your survey is, given the sample you actually collected.

Z score

How many standard deviations a value sits from the mean and which percentile it occupies.