How to Use the T-Test Calculator
This calculator takes a sample's mean, standard deviation, and size, then instantly returns the t-statistic, degrees of freedom (df), and p-value, helping you judge whether a difference is statistically significant. A one-sample t-test checks whether a sample mean differs from a known reference value, using t = (sample mean - reference value) ÷ (standard deviation ÷ √sample size).
A two-sample t-test checks whether the means of two independent groups differ. This calculator uses Welch's t-test, which does not assume the two groups have equal variance, and corrects the degrees of freedom with the Welch-Satterthwaite approximation.
The p-value is computed as the t-distribution's cumulative probability using the regularized incomplete beta function. As a general rule, a p-value below 0.05 is interpreted as a statistically significant difference. Sample size must be at least 2 and standard deviation must be greater than 0 — outside these conditions, the calculator immediately shows a guidance message.
Frequently Asked Questions
Using the common 0.05 significance threshold, a p-value below 0.05 means you'd reject the null hypothesis and conclude there is a statistically significant difference between the groups (or between the sample and the reference value). Note that the significance level can vary by field or purpose.
A one-sample t-test compares a sample mean to a known reference value, such as a population mean. A two-sample t-test compares the means of two independent groups. This calculator uses Welch's t-test for the two-sample case, which does not assume equal variances.