T-Test Calculator
Free t-test calculator with step-by-step breakdown. One-sample, two-sample, Welch, paired t-tests. R
Why This Statistical Analysis Matters
Why: Statistical calculator for analysis.
How: Enter inputs and compute results.
T-Test — The Most Used Hypothesis Test
One-sample, two-sample (pooled/Welch), paired. Raw data or summary stats. Assumptions check, effect size, power analysis.
Real-World Scenarios — Click to Load
Test Configuration
One-Sample Data
t-Distribution: Rejection Region & p-value
Power vs Sample Size
Effect Size vs Cohen's Benchmarks
Calculation Breakdown
⚠️For educational and informational purposes only. Verify with a qualified professional.
Key Takeaways
- • One-sample t: t = (x̄ − μ₀)/(s/√n). Use when σ is unknown and estimated by s
- • Pooled two-sample: Assumes equal variances. df = n₁ + n₂ − 2
- • Welch's t: Does NOT assume equal variances — the safer default for two-sample tests
- • Paired t: Tests the mean of paired differences. More powerful when pairing reduces variability
- • Cohen's d benchmarks: 0.2 = small, 0.5 = medium, 0.8 = large effect
- • The t-test is robust to moderate non-normality when n ≥ 30 (Central Limit Theorem)
Did You Know?
Expert Tips — Choosing the Right T-Test
Welch's t: The Safe Default
Unless you have strong evidence of equal variances (Levene's p > 0.10), use Welch's t. It performs well even when variances are equal, with minimal power loss.
Paired vs Independent
If the same subjects are measured twice (before/after), use paired t. Using independent t here wastes information and reduces power dramatically.
Raw Data vs Summary Stats
Raw data allows assumptions checking (skewness, variance ratio). Summary stats are faster when you only have x̄, s, n from a published paper.
Non-Normal Data?
For n < 30 with skewed data, consider the Wilcoxon test (paired) or Mann-Whitney U (independent).
Decision Tree: Which T-Test?
| Question | Answer | → Use |
|---|---|---|
| How many groups? | One group vs known value | One-sample t |
| Same subjects measured twice? | Yes (before/after) | Paired t |
| Two independent groups, equal variances? | Yes (Levene p > 0.10) | Pooled two-sample t |
| Two independent groups, unequal variances? | Yes or unsure | Welch's t (recommended) |
| More than 2 groups? | Yes | Use ANOVA instead |
| Data highly non-normal, small n? | Yes | Use non-parametric test |
Why Use This Calculator vs Other Tools?
| Feature | This Calculator | R / Python | Excel |
|---|---|---|---|
| All 4 t-test types (one-sample, pooled, Welch, paired) | ✅ | ✅ | ⚠️ T.TEST only |
| Raw data AND summary stats input | ✅ | ✅ (raw) | ⚠️ Summary only |
| Automatic assumptions check | ✅ | ⚠️ Manual | ❌ |
| Interactive t-distribution visualization | ✅ | ⚠️ Code needed | ❌ |
| Power analysis & sample size curve | ✅ | ✅ (pwr pkg) | ❌ |
| Cohen's d with benchmarks | ✅ | ⚠️ Manual | ❌ |
| Step-by-step calculation breakdown | ✅ | ❌ | ❌ |
| Copy, share, AI analysis | ✅ | ❌ | ❌ |
| No installation required | ✅ | ❌ | ✅ |
Frequently Asked Questions
When should I use Welch's t instead of pooled?
Use Welch's t as the default for two independent groups. It does not assume equal variances and performs nearly as well as pooled t when variances ARE equal. The American Statistical Association and R both default to Welch.
What is the difference between paired and independent t-tests?
Paired t uses the SAME subjects measured under two conditions (before/after, left/right). Independent t compares TWO SEPARATE groups. Using independent t for paired data wastes the within-subject correlation and loses power.
How do I check the normality assumption?
For raw data: check skewness (|sk| < 1 is OK), histogram, or Q-Q plot. For n ≥ 30, the CLT makes the t-test robust to non-normality. For small n with skewed data, use Mann-Whitney U or Wilcoxon.
What does Cohen's d mean practically?
d = 0.2 means the groups differ by 0.2 standard deviations (small, ~15% non-overlap). d = 0.8 is a large effect (~47% non-overlap). In clinical trials, even small effects can be practically significant if the outcome is important.
How do I plan my sample size?
Use the power curve chart. Specify: (1) smallest meaningful effect size d, (2) desired power (80%), (3) α (0.05). The curve shows n needed per group. Rule of thumb: n ≈ 16/d² per group for 80% power.
Can I use the t-test for proportions?
No — use the z-test for proportions instead. The t-test is for continuous data (means). See our Z-Test Calculator for proportion tests.
What if I have more than 2 groups?
Use ANOVA (Analysis of Variance) instead. Running multiple t-tests inflates Type I error. See our ANOVA Calculator.
T-Test by the Numbers
Official Data Sources
Disclaimer: This calculator is for educational and research planning purposes. It uses the Lanczos approximation for the gamma function and Abramowitz & Stegun for the normal CDF. For publishable research, verify with R, Python scipy, SAS, or SPSS. Always check assumptions: independence, normality (or n ≥ 30), and equal variances (for pooled t). Not professional statistical consulting.