t-test Calculator
Settings
Data
Results
Action
Use this t-Test Calculator to perform one-sample, independent two-sample, Welch, pooled, or paired t-tests. It calculates the t statistic, degrees of freedom, p-value, confidence interval, and mean difference.
Calculation Method
For a one-sample t-test:
t = (x̄ − μ₀) ÷ (s ÷ √n)
For independent groups, the calculator can use Welch’s method:
t = (x̄₁ − x̄₂) ÷ √(s₁²/n₁ + s₂²/n₂)
Paired tests first calculate the difference between each matched pair and test the mean of those differences.
The p-value is obtained from the t distribution using the calculated t statistic, degrees of freedom, and selected one- or two-tailed test.
Example
Suppose a one-sample test has:
Sample mean = 12
Hypothesized mean = 10
Standard deviation = 4
Sample size = 16
t = (12 − 10) ÷ (4 ÷ √16) = 2.00
df = 15
For a two-tailed test, the p-value is approximately 0.064, so the result would not meet a 0.05 significance threshold.
Important Note
Select the test according to the study design. Independent groups and paired observations require different calculations. Statistical significance also does not automatically mean that an effect is practically important.
Strong outliers, non-independent observations, inappropriate pairing, or unsuitable distributional assumptions can make a t-test misleading.