t-Test Calculator
Run a one-sample, independent two-sample or paired t-test from summary statistics. Get the t statistic, degrees of freedom, p-value, Cohen's d and 95% CI for the mean difference.
What Is a t-Test?
A t-test compares a sample mean with a hypothesized value (one-sample), two independent group means (independent samples) or the mean of paired differences (paired). It uses the t distribution, which accounts for the extra uncertainty of small samples through the degrees of freedom.
This calculator works from summary statistics: means, standard deviations and sample sizes. Enter the values from your study, choose the tail of the test, and read the t statistic, p-value and an effect size (Cohen's d) together with a 95% confidence interval.
A small p-value indicates the data are unlikely under the null hypothesis, but it does not tell you the size of the effect. Always report the confidence interval and Cohen's d alongside the p-value.
Key Formulas
The t statistic is the mean difference divided by its standard error; degrees of freedom depend on the design:
t = (M₁ − M₂) / (s_p × √(1/n₁ + 1/n₂))
d = (M₁ − M₂) / s_p
How to Use This Calculator
Follow these steps:
- Choose the tab that matches your design: one sample, two independent samples or paired.
- Enter the summary statistics (means, standard deviations, sample sizes) from your study.
- Select two-tailed or one-tailed and read the t statistic, p-value, Cohen's d and the 95% CI for the mean difference.
Worked Example
Two independent groups (n1 = n2 = 30) report means of 105.0 and 100.0 with standard deviations of 12.0 and 10.0:
Frequently Asked Questions
Have another question? Let us know.
When should I use a one-tailed instead of a two-tailed test?
Use a two-tailed test unless you have a strong a priori prediction of the direction of the effect. Two-tailed tests are the standard default; one-tailed tests trade the ability to detect an effect in the opposite direction for slightly more power in the predicted direction.
What is the difference between pooled and unpooled (Welch) variance?
The pooled variance assumes the two groups have equal population variances and pools the data to estimate a common SD; the Welch version does not assume equal variances and adjusts the degrees of freedom. This calculator reports the pooled result, which matches the classical textbook t-test.
How do I compute the paired t-test from raw data?
For each participant, subtract the second measurement from the first to get a difference score. The paired t-test is then a one-sample t-test on these differences: enter their mean, standard deviation and the number of pairs.
How should I report the results?
Report the t statistic with degrees of freedom, the p-value, Cohen's d and the confidence interval, for example: t(58) = 1.75, p = .085, d = 0.45, 95% CI [−0.72, 10.72].
Related Resources
- P-Value Calculator — turn the t statistic into a p-value
- Confidence Interval Calculator — the 95% CI for the mean difference
- Effect Size Calculator — Cohen's d beyond the t-test
- Power & Sample Size Calculator — how many subjects you need
- Inferential Statistics — hypothesis testing guide
- Experimental Design — between-subjects vs within-subjects
