T-Test Calculator
One-sample, independent two-sample (Welch or pooled) and paired t-tests from raw data or summary statistics, with t, df, p, the 95 % CI of the difference and Cohen's d.
The T-Test Calculator runs a one-sample t-test (mean vs a hypothesised value), an independent two-sample t-test with Welch's unequal-variance correction or pooled variance, or a paired t-test, and reports t, degrees of freedom, one- and two-tailed p-values, the confidence interval of the difference and Cohen's d effect size.
Free, runs in your browser. Nothing you enter is uploaded.
How to use it
- Choose the test type.
- Paste data or enter summary statistics.
- Choose Welch or pooled and the tail.
- Read t, p and the effect size.
What you enter
- Two groups of data (or one group and μ₀)
What you get
- t statistic and df
- p-values
- CI of the difference
- Cohen's d
Formula
Welch: t = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂), df = (s₁²/n₁ + s₂²/n₂)² / [ (s₁²/n₁)²/(n₁−1) + (s₂²/n₂)²/(n₂−1) ]
t measures the difference between means in units of its standard error. Welch's version does not assume equal variances and is the recommended default; the paired test analyses the within-pair differences as a one-sample test against zero.
Worked example
Input: A: 5.1 4.8 6.2 5.5 5.9 4.7 5.3 6.0 · B: 4.2 4.9 3.8 4.5 5.0 4.1 3.9 4.6
Result: Welch t = 4.29, df ≈ 13.4, p = 0.0009, difference 1.06 (95 % CI 0.53 to 1.60), d = 2.1
Group A is significantly higher; the effect is large.
Questions
Paired or independent?
Paired when each value in group A is naturally matched to one in group B (same subject before/after, littermates); independent when the groups are separate subjects.
Welch or Student (pooled)?
Welch. It is as powerful when variances are equal and much safer when they are not, so most statisticians recommend it as the default.
Limitations
- Assumes approximately normal data or n ≳ 30 per group; use Mann–Whitney U for ordinal or heavily skewed data.
- Independent groups must be truly independent; use the paired test for before/after designs.
References
Related reading
- Understanding the t-Test: Meaning, Assumptions, and Applications
- Paired vs. Independent t-Tests
- Welch's t-Test: When and How to Use It
- One-Sample t-Test: Formula, Calculation, and Interpretation
- T-Test vs ANOVA: A Decision Framework
More Statistics
- Standard Deviation Calculator
- Mean, Median & Mode Calculator
- Variance Calculator
- Z-Score Calculator
- P-Value Calculator
- Confidence Interval Calculator
- Chi-Square Test Calculator
- Correlation Coefficient Calculator
- Linear Regression Calculator
- Normal Distribution Calculator
- Probability Calculator
- Binomial Distribution Calculator
All free tools · By Dr. Zubair Khalid, DVM, MS, PhD.