T-Test Calculator
Compute one-sample, independent two-sample (Welch & pooled), and paired Student's t-tests with exact p-values, degrees of freedom, and Cohen's d.
Compare means of two independent groups. Welch's unequal variances test is used by default.
Interactive, data-driven visualization computed from your current input values.
Student's t-Distribution (df = 62.9)
H₀: μ₁ = μ₂ vs H₁ (two-tailed). Observed t = 2.34
Step-by-Step Mathematical Derivation
Detailed derivation with exact formulas, user input substitutions, and statistical interpretations.
Compute Mean Difference
Observed difference in average sample measurements.
Compute Welch's Standard Error & df
Welch-Satterthwaite adjustment provides robust error estimation without assuming equal variances (df = 62.91).
Calculate t-Statistic
The mean difference is 2.34 standard errors from the null difference of 0.
Calculate P-Value from Student's t Distribution
Exact probability under H₀ with 62.91 degrees of freedom is 0.02246. Statistically significant (p < α).
Effect Size (Cohen's d) & Confidence Interval
Cohen's d of 0.578 indicates a medium standardized effect size.
Evaluation & Analysis Guidelines
- Independent continuous samples
- Unequal population variances permitted (Welch robust method)
- Approximate normality or adequate sample size in both groups
Student's & Welch's T-Test Formulas
Mathematical definitions for Welch's unequal variances test, Welch-Satterthwaite degrees of freedom, and Cohen's d effect size.
Welch's Unequal Variances T-Test Formula
Welch's t-test does not assume equal population variances and provides superior Type I error control compared to Student's pooled t-test across unequal sample sizes.
One-Sample T-Test Formula
Tests if the sample mean differs from a known constant when population variance is unknown and estimated by the sample standard deviation s.
Paired Samples T-Test Formula
Tests whether the average pairwise difference d̄ in matched or repeated-measures designs differs from the null hypothesis difference (typically 0).
How to Choose & Run Welch's, Student's, Paired & One-Sample T-Tests
Evaluates whether sample mean differences exceed random sampling noise when true population standard deviations are unknown and estimated from sample variance.
- 1
Match Mode to Your Study Design
Select Independent Samples for two unrelated groups, One-Sample to compare one cohort mean against a fixed reference μ₀, or Paired Samples for before/after measurements on the same subjects.
- 2
Keep Welch's Unadjusted Default for Two Independent Groups
Unless historical equality of variances is guaranteed, leave Welch's unequal-variance mode active; it uses the Welch-Satterthwaite df approximation to preserve true α control.
- 3
Pair P-Value With Cohen's d Effect Size
Check both statistical significance (p < α) and practical magnitude (Cohen's d), since large samples can yield small p-values for negligible differences.
T-Test Selection Matrix & Cohen's d Magnitude Benchmarks
Selecting the right T-test variant and interpreting practical difference strength via Cohen's d.
| Test Variant | Sample Structure | Degrees of Freedom | Cohen's d Benchmarks |
|---|---|---|---|
| Welch's Independent T-Test | 2 unrelated groups, unequal σ | Welch-Satterthwaite fractional df | |d| ≈ 0.20 (Small Effect) |
| Student's Pooled T-Test | 2 unrelated groups, equal σ₁=σ₂ | df = n₁ + n₂ − 2 | |d| ≈ 0.50 (Medium Effect) |
| One-Sample T-Test | 1 cohort vs known constant μ₀ | df = n − 1 | |d| ≥ 0.80 (Large Effect) |
| Paired Samples T-Test | Pre/Post or matched subject pairs | df = n_pairs − 1 | Uses difference SD (s_d) |
Normality, Outliers & Multiple Comparisons
Comparing 3+ Groups With Sequential T-Tests
Never compare 3 or more groups using pairwise T-tests alone — false positives multiply rapidly. Run One-Way ANOVA first to verify overall group differences.
Heavy Skewness in Tiny Samples (n < 15)
While T-tests resist moderate non-normality as n approaches 30, severe outliers in very small cohorts distort s and t; consider non-parametric rank tests in extreme cases.
T-Test Calculator — Worked Examples
Real-world scenarios and verified benchmark inputs for the T-Test Calculator.
Clinical Drug Trial Comparison (Welch)
Comparing recovery time between treatment (n=30, x̄=24.5, s=4.2) and control (n=35, x̄=21.8, s=5.1).
One-Sample Classroom Benchmark
Checking whether a class sample (n=25, x̄=52.4, s=6.8) differs significantly from a national benchmark of 50.
Pre vs Post Training Intervention (Paired)
Evaluating employee productivity score gains (d̄=3.2, s_d=4.5) across 20 matched participants.
T-Test Calculator — Frequently Asked Questions
Expert answers on t-tests, Welch vs pooled variances, sample size balance, and effect size interpretations.
Why does YourCalculate use Welch's t-test by default instead of Student's pooled t-test?
Decades of statistical literature (Ruxton 2006, Delacre et al. 2017) demonstrate that Welch's t-test maintains accurate Type I error rates when group variances and sample sizes differ, with virtually no power loss when variances are equal. It is the standard default in R, SciPy, and biostatistics.
Why are degrees of freedom fractional in Welch's t-test?
Welch's t-test uses the Welch-Satterthwaite approximation equation to compute effective degrees of freedom from the two groups' sample variances and sample sizes. Unlike pooled Student's df (n₁ + n₂ − 2), this weighted formula produces non-integer values that calibrate the t-distribution tails accurately.
How do I choose between an Independent Samples and Paired Samples T-test?
Use an Independent Samples T-test when comparing two completely separate groups of subjects (e.g., Group A vs Group B). Use a Paired Samples T-test when measurements come from the same subjects before and after an intervention, or matched pairs where each subject pairs directly with one partner.
How do I interpret Cohen's d effect size alongside p-values?
P-values indicate whether an effect is unlikely due to random sampling variation, whereas Cohen's d quantifies practical magnitude in standard deviation units: d ≈ 0.2 is small, d ≈ 0.5 is medium, and d ≥ 0.8 is large.
When should I run One-Way ANOVA instead of multiple T-tests?
If you need to compare 3 or more group means simultaneously, running separate pairwise T-tests inflates your family-wise false positive (Type I error) rate. Use One-Way ANOVA first to run an omnibus F-test across all groups before conducting post-hoc comparisons.
What assumptions does a T-test require when sample sizes are small?
For small samples (n < 30), the underlying population or paired differences should be approximately normal without extreme outliers. For larger samples, the Central Limit Theorem ensures sample means remain approximately normal even under moderate skewness.
Related Calculators
Explore connected statistics & probability and related computation tools.