Perform one-sample, two-sample, Welch's, and paired t-tests online. Get t statistic, p-value, degrees of freedom, Cohen's d, and confidence intervals instantly.
The t-test is a standard way to compare means when the population standard deviation is unknown. It lets you test a sample mean against a reference value, compare two independent groups, or compare paired measurements from the same subjects.
This calculator supports one-sample, pooled two-sample, Welch's, and paired t-tests. Enter summary statistics, choose the test type and tail direction, and it returns the t statistic, p-value, degrees of freedom, effect size, and a confidence interval for the mean difference.
That makes it useful whenever you want a compact hypothesis test for averages rather than a model with many predictors.
T-tests are often the quickest way to answer a mean-comparison question, but the details change depending on whether the groups are paired, whether variances are equal, and whether you need a one- or two-tailed result. Keeping those choices in one place reduces the chance of mixing formulas or reading the wrong degrees of freedom.
One-Sample t-Test: t = (x̄ − μ₀) / (s / √n), df = n − 1 Two-Sample t-Test (pooled): t = (x̄₁ − x̄₂) / √(s²p(1/n₁ + 1/n₂)) s²p = ((n₁−1)s₁² + (n₂−1)s₂²) / (n₁ + n₂ − 2) df = n₁ + n₂ − 2 Welch's t-Test: t = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂) df = (s₁²/n₁ + s₂²/n₂)² / ((s₁²/n₁)²/(n₁−1) + (s₂²/n₂)²/(n₂−1)) Paired t-Test: t = d̄ / (s_d / √n), df = n − 1
Result: t(98) = 1.7408, p = 0.0849
Comparing two groups of 50 yields t = 1.74 with 98 degrees of freedom. The two-tailed p-value of 0.085 exceeds 0.05, so we fail to reject H₀. Cohen's d = 0.35, indicating a small-to-medium effect. The 95% CI for the mean difference includes zero: [−0.056, 0.856].
One-sample t-test: comparing a single group to a known value (e.g., testing if average reaction time differs from 250ms). Two-sample t-test: comparing independent groups (e.g., treatment vs control). Paired t-test: comparing the same subjects under two conditions (e.g., before and after treatment, left vs right hand). When in doubt between pooled and Welch's two-sample tests, use Welch's — it's valid under both equal and unequal variances.
A complete t-test report includes the t statistic, degrees of freedom, p-value, mean difference, confidence interval, and effect size. The confidence interval is arguably more informative than the p-value: it shows the range of plausible values for the true difference, giving you both significance and magnitude information in one quantity.
Multiple comparisons: running many t-tests inflates the false positive rate — use ANOVA or correction methods instead. Violated assumptions: the pooled t-test with very unequal variances and unequal sample sizes gives unreliable results — switch to Welch's. Confusing statistical and practical significance: a p-value of 0.001 with d = 0.05 means a real but trivially small effect.
Last updated:
Use a t-test when the population standard deviation is unknown, which is the usual case. Use a z-test only when the population standard deviation is known or you have a special design that justifies it.
The pooled (Student's) t-test assumes equal variances in both groups. Welch's t-test does not make this assumption and uses a modified degrees of freedom formula. Welch's is recommended as the default because it's valid regardless of variance equality.
Degrees of freedom determines the shape of the t-distribution used for p-value calculation. Higher df means the distribution is closer to normal. For one-sample: df = n−1. For two-sample: df = n₁+n₂−2. Welch's df is typically fractional.
The t-test is robust to moderate non-normality, especially with larger samples (n > 30) due to the Central Limit Theorem. For small samples from heavily skewed or outlier-prone distributions, use non-parametric alternatives like the Wilcoxon test.
Independence of observations, approximate normality of the sampling distribution, and (for the pooled test) equal variances in both groups. Welch's test relaxes the equal variance assumption.
Compute the mean, standard deviation, and sample size from your raw data first, then enter those values. Alternatively, use our standard deviation calculator to get these summary statistics.