Statistics

T-test Calculator

Compare two independent samples, reporting the t statistic, degrees of freedom, and two-tailed p-value.

t-testhypothesis testp-value
Two-sample t-test (Welch)

Compare two independent samples with unequal variances.

Mean difference
5.2
t statistic
3.5546
Degrees of freedom
6.23
Two-tailed p-value
0.011267

Welch’s t statistic

t = (ȳ₁ − ȳ₂) / √(s₁²/n₁ + s₂²/n₂)
ν ≈ (s₁²/n₁ + s₂²/n₂)² / [s₁⁴/(n₁²(n₁ − 1)) + s₂⁴/(n₂²(n₂ − 1))]

Welch’s adjustment is robust when variances differ or sample sizes are unequal, making it a safe default.

How to use

  1. Enter the two samples as comma-separated lists.
  2. Ensure each sample has at least two observations.
  3. Review the mean difference, t statistic, degrees of freedom, and p-value.

Example

Input: Sample A = 23,21,25,20,27; Sample B = 18,19,17,20,16

Output: t ≈ 4.03, ν ≈ 7.8, p ≈ 0.0041

Student-friendly breakdown

This walkthrough emphasizes the most searched ideas for T-test Calculator: t test calculator, welch t test calculator, two sample t test calculator, t test p value calculator. Start with the formula above, then follow the guided steps to double-check your work. For quick revision, highlight the givens, plug into the equation, and finish by verifying your units.

Need more support? Use the links below to open the long-form guide, browse additional examples, or hop into adjacent calculators within the same topic — each one is a quick way to double-check your work or handle a related question without starting from scratch.

Deep dive & study plan

T-test Calculator: Performs Welch’s two-sample t-test with p-value. It's built around t-test, hypothesis test, p-value, so you can go from a raw question to a checked answer without switching tools.

The math behind it: Welch’s adjustment is robust when variances differ or sample sizes are unequal, making it a safe default. The core relationship is t = (ȳ₁ − ȳ₂) / √(s₁²/n₁ + s₂²/n₂) ν ≈ (s₁²/n₁ + s₂²/n₂)² / [s₁⁴/(n₁²(n₁ − 1)) + s₂⁴/(n₂²(n₂ − 1))], shown above the calculator so you can see exactly how your inputs turn into the result.

To use it well: (1) Enter the two samples as comma-separated lists. (2) Ensure each sample has at least two observations. (3) Review the mean difference, t statistic, degrees of freedom, and p-value. Keep your units consistent as you go, and re-run a case you already know the answer to — it's the fastest way to catch a typo before it throws off a result you're relying on.

Worked example: entering Sample A = 23,21,25,20,27; Sample B = 18,19,17,20,16 returns t ≈ 4.03, ν ≈ 7.8, p ≈ 0.0041. Try swapping in your own numbers next, especially a case you're unsure about, before you use this for something that matters.

Quick retention checklist

  • Speak the formula aloud (or annotate it) so the relationships stick.
  • Write each step in your own words and compare with the numbered list above.
  • Swap in new numbers for the Example to make sure the calculator (and your logic) handles edge cases.
  • Check at least one related calculator below — it's the fastest way to confirm your numbers still line up from a different angle.

FAQ & notes

Is this a paired test?

No. The calculator runs Welch’s unpaired test. Pair your data manually if observations are matched.

How accurate is the p-value?

P-values rely on the Student’s t CDF via the incomplete beta function, giving accurate probabilities for common degrees of freedom.

What formula does the T-test Calculator use?

Welch’s adjustment is robust when variances differ or sample sizes are unequal, making it a safe default.

How do I use the T-test Calculator?

Enter the two samples as comma-separated lists. Ensure each sample has at least two observations. Review the mean difference, t statistic, degrees of freedom, and p-value.