T-Test Calculator
Run a one-sample, independent-samples or paired t-test.
How the t-test works
The t-test compares a sample mean against a known value (one-sample), two independent group means (independent-samples), or two related measurements (paired). The t statistic measures how far the observed difference is from what chance alone would produce, in units of the standard error.
For independent samples this calculator offers Welch's t-test as the default — it does not assume equal variances and is robust to unequal group sizes — alongside Student's t-test, which pools the variances and assumes them equal.
The result is a p-value read from Student's t distribution with the appropriate degrees of freedom. A p-value below your significance level is conventionally called statistically significant, but significance does not tell you the size or practical importance of the effect.
The formulas
One-sample: t = (x̄ − μ₀) / (s/√n) · Welch: t = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂)
For one sample, t compares the sample mean to the hypothesized value using the sample standard deviation. For independent samples, Welch's t divides the mean difference by the unequal-variances standard error, with degrees of freedom from the Welch–Satterthwaite formula. The paired t-test applies the one-sample formula to the within-pair differences.
Worked example
Two groups of three values
Group A = 1, 2, 3 and Group B = 4, 5, 6 give a mean difference of −3. Welch's t is −3.674 with 4 degrees of freedom and a two-tailed p-value of about 0.021 — significant at the 5% level.
Frequently asked questions
Which t-test should I use?
For two independent groups use Welch's t-test by default — it does not assume equal variances. Use Student's t-test only when equal variances are justified. For related measurements use the paired t-test.
What assumptions does the t-test make?
The data (or the differences, for a paired test) should be approximately normally distributed, or the sample large enough for the central limit theorem to apply. Observations should be independent. Entering data here does not prove normality — check it separately.
What is the difference between one-tailed and two-tailed?
A two-tailed test checks for a difference in either direction; a one-tailed test checks only for an increase or only for a decrease. Two-tailed is the common default.
Related research methods
- Hypothesis Testing
- ANOVA
When to use this tool
Use a t-test when you compare exactly two means: one sample against a known value, two independent groups, or two related measurements (paired).
Assumptions
- Approximate normality of the data or differences (or a large enough sample for the central limit theorem).
- Independent observations (except within pairs for a paired test).
- For Student's t-test, approximately equal variances — otherwise use Welch's t-test (the default here).
Limitations
- A significant result does not tell you the size or practical importance of the difference.
- With many group comparisons the chance of a false positive rises; consider a correction.
How to interpret the result
The p-value is the probability of observing a difference at least this extreme if the null hypothesis were true. p < α is conventionally called statistically significant.
How to report the result
Report the test type (one-sample / independent / paired), the t statistic, degrees of freedom, p-value, and ideally the group means and an effect size — for example, 't(28) = 2.31, p = 0.028, d = 0.84'.
Next steps in your analysis
Related tools
Related guides
- How to Choose the Right Statistical TestA practical framework for picking the right statistical test: start from your research question, data type and study design, then check the assumptions.
- Understanding P-Values and Statistical SignificanceWhat a p-value actually means, what it does not mean, the role of the significance level, and why the field is moving away from the 0.05 bright line.
- T-Test vs Z-Test vs ANOVAWhen to use a z-test, a t-test or an ANOVA, the assumptions behind each, and how the tests relate — including why F equals t² for two groups.
- Effect Size and Statistical Power: Designing Studies That Can Detect EffectsWhy statistical significance is not enough — how to measure effect size with Cohen's d and design studies with adequate statistical power before you collect data.
Built by PanelRoster
PanelRoster is an enterprise operations management platform for organizations coordinating distributed teams, assignments, workflows, quality assurance and operational execution.
Explore PanelRoster