📊 T-Test Calculator
A t-test answers a simple question with statistics: is the difference you see real, or could it just be luck? Paste your raw data and this calculator works out the t statistic, degrees of freedom and p-value for the three classic t-tests.
Choose the test type, paste your numbers, and read the verdict at the standard 5% significance level. The same subjects measured twice (before/after) call for the paired test; two separate groups call for the two-sample test; one group against a target value is the one-sample test.
How to use this calculator
Paste raw data — no need to work out means or standard deviations by hand first.
- Pick the test type: one-sample, two-sample (unpaired) or paired.
- Paste Sample 1 values into the first box, separated by commas, spaces or line breaks. For the two-sample and paired tests, paste Sample 2 as well.
- For a one-sample test, set the hypothesized mean μ₀ — the target value you are testing against (for a paired test this is the hypothesized mean difference, usually 0).
- Choose two-tailed unless you predicted one specific direction before collecting data, and leave 'equal variances' unticked for the safer Welch test.
- Press Calculate and read the t statistic, p-value and the plain-language verdict.
T-Test Worked Example
A teacher believes her class scores above the school target of 80. Her ten students score 85, 88, 90, 92, 95, 87, 91, 89, 93, 90. Choose the one-sample test, paste those scores as Sample 1 and set μ₀ = 80. The sample mean is 90 with a standard deviation of 2.94, giving t = 10.74 with 9 degrees of freedom and p < 0.0001 — far below 0.05, so the null hypothesis is rejected: this class really does score above the target, and a gap this large would almost never happen by chance alone.
Frequently asked questions
Which t-test should I choose?
Use a one-sample t-test to compare one group's average against a known target value (μ₀). Use a two-sample t-test to compare two independent groups, such as a class taught two different ways. Use a paired t-test when the same subjects are measured twice — before and after — because each person forms a natural pair.
What does the p-value mean?
The p-value is the probability of seeing a difference at least this large if the null hypothesis (no real difference) were true. A small p-value, conventionally below 0.05, is evidence against the null hypothesis. It is not the probability that the null hypothesis is true, and it says nothing about whether the difference is large enough to matter in practice.
What is the difference between Welch and pooled (equal variances)?
The pooled test assumes both groups share the same variance and combines them into one estimate. Welch's test does not assume equal variances and adjusts the degrees of freedom — it is the safer default when group spreads look different, which is why this calculator leaves it off (Welch) unless you tick the box.
One-tailed or two-tailed — which should I pick?
Two-tailed is the honest default: it detects a difference in either direction. Choose a one-tailed test only when a difference in one specific direction was predicted before seeing the data — for example, testing whether a new drug is better, where 'worse' would be treated exactly like 'no effect'.
How many values do I need?
Each sample needs at least two values, and a paired test needs the same number of values in both samples (one row per pair). In practice, 10 or more values per group gives a far more trustworthy result, and very skewed data or extreme outliers can mislead any t-test.