T-Test Calculator

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 quickly.

T-Test Calculator

t Statistic
1.7375
t(98) — test statistic
p-Value
0.0082
Significant at α = 0.05
Decision
Reject H₀
The difference is statistically significant
Cohen\'s d
0.3475
Small effect
95% CI
[0.3928, 0.4072]
Confidence interval for the mean difference
Standard Error
0.2302
Standard error of the mean (difference)

Test Summary

ParameterValue
Test typeTwo-sample (pooled) t-test
t statistic1.737489
Degrees of freedom98
p-value (two)0.008211
Mean difference0.4000
Standard error0.2302
Critical t (α/2)±0.0313
Cohen\'s d0.3475

Visual: t on Distribution

Reject H₀t = 1.737Reject H₀
Planning notes, formulas, and examples

About the T-Test Calculator

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.

When This Page Helps

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.

How to Use the Inputs

  1. Select the t-test variant: one-sample, two-sample, Welch's, or paired.
  2. Choose tail direction: two-tailed, right-tailed, or left-tailed.
  3. Enter the summary statistics for your data (means, standard deviations, sample sizes).
  4. Set your significance level alpha (default 0.05).
  5. Review the t statistic, p-value, and reject/fail-to-reject decision.
  6. Check Cohen's d effect size to assess practical significance.
  7. Examine the confidence interval for the mean difference.
Formula used
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

Example Calculation

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].

Tips & Best Practices

  • Use Welch's t-test by default for two-sample comparisons — it's robust to unequal variances and doesn't lose much power when variances are equal.
  • The paired t-test is much more powerful than the two-sample t-test when study designs allow pairing, because it eliminates between-subject variability.
  • Cohen's d benchmarks: 0.2 = small, 0.5 = medium, 0.8 = large. Always report it alongside the p-value.
  • If the confidence interval for the mean difference includes zero, the result is non-significant (for two-tailed tests).
  • T-tests assume approximate normality. For small samples from skewed distributions, consider the Wilcoxon test.
  • With very large samples (n > 100), the t-distribution approaches the normal distribution and t-test results match z-test results.

Choosing the Right T-Test

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.

Interpreting Results Beyond the P-Value

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.

Common Pitfalls

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.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • 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.