t-Test Calculator
One-sample, two-sample (Welch or pooled) and paired t-tests from summary statistics: the t statistic, degrees of freedom, p-value and a confidence interval for the difference.
Result
t statistic: 1.7817
Exact arithmetic on the summaries entered. The p-value is only as good as the test’s assumptions about the data.
- Degrees of freedom
- 9
- P-value
- 0.108484
- Compared with α
- p = 0.1085 is above α = 5%, so the result is not statistically significant at that level.
- Difference tested
- 3.7
- Standard error
- 2.076668
- Confidence interval for the difference, lower
- -0.997749
- Confidence interval for the difference, upper
- 8.397749
- Test used
- One-sample t-test
https://calcgallery.com/statistics/t-test-calculator/
Results follow the mathematical operation and values shown. Check that you selected the intended operation, convention and dataset type before relying on the result. Read the full disclaimer
How to use the t-Test Calculator
- Choose the test. One sample compares a mean with a fixed value, two samples compare two separate groups, and paired compares the same people or items measured twice.
- Enter the summary statistics, the hypothesised value and the tail that matches your alternative hypothesis.
- Read t, the degrees of freedom and the p-value, and the confidence interval for the difference beside them.
The formulas
one sample t = (x̄ − μ₀) ÷ (s ÷ √n) df = n − 1Welch t = (x̄₁ − x̄₂) ÷ √(s₁²/n₁ + s₂²/n₂) df = (s₁²/n₁ + s₂²/n₂)² ÷ [(s₁²/n₁)²/(n₁ − 1) + (s₂²/n₂)²/(n₂ − 1)]pooled sₚ² = ((n₁ − 1)s₁² + (n₂ − 1)s₂²) ÷ (n₁ + n₂ − 2) t = (x̄₁ − x̄₂) ÷ (sₚ √(1/n₁ + 1/n₂)) df = n₁ + n₂ − 2paired t = (d̄ − Δ₀) ÷ (s_d ÷ √n) df = pairs − 1interval difference ± t* × standard error
Assumptions
The observations are independent within each group, and each sample mean is close to normally distributed: true when the data are roughly normal, and increasingly true as samples grow. The page takes summaries, so it cannot check for outliers or skew in the raw data; look at the data before trusting a small-sample result. If a standard deviation is zero there is no standard error and no t, and the page says so.
What the diagram shows
The t distribution for your degrees of freedom with your t marked. The shaded tail, or both tails for a two-tailed test, is the p-value.
With your numbers
- Standard error = 2.076668; degrees of freedom = 9
- t = 3.7 ÷ 2.076668 = 1.7817
Quick reference
Exact arithmetic on the summaries entered. The p-value is only as good as the test’s assumptions about the data.
| Example | t statistic |
|---|---|
| 53.7 (6.567, 10) against 50 | 1.7817 |
| Welch, 20 (4, 12) against 23 (6, 30) | -1.8848 |
| Pooled, 20 (4, 12) against 23 (6, 30) | -1.5904 |
| NIST cars, 249 against 79, pooled | -12.6206 |
| Paired, mean difference 1.5 (2, 12 pairs) | 2.5981 |
| One-sided, 53.7 above 50 | 1.7817 |
Common questions about the t-Test Calculator
- Welch or pooled?
- Welch’s test does not assume the two groups have the same variance and is the safer default; many statisticians recommend it for every two-sample comparison. The pooled test assumes equal variances and has slightly more power when that is true. With equal group sizes the two t values are identical and only the degrees of freedom differ.
- When should I use a paired test?
- When each value in one group belongs with one value in the other: the same patients before and after, left and right hands, two instruments measuring the same samples. Work out the difference within each pair, then enter the mean and standard deviation of those differences. Treating paired data as two independent samples throws away the pairing and usually hides a real difference.
- Why are the Welch degrees of freedom not a whole number?
- They come from the Welch–Satterthwaite approximation, which weighs each group’s variance by its size. The t distribution is defined for any positive degrees of freedom, so the fraction is used as it is rather than rounded down, as printed tables force you to.
- How does the confidence interval relate to the test?
- For a two-tailed test, the interval at 95% excludes the hypothesised difference exactly when p is below 5%. The interval also shows how large the difference plausibly is, which the p-value alone does not.