Intermediate

Two-Sample t-Test Calculator

Test whether the means of two independent samples differ significantly using a two-sample t-test.
Sample mean x̄₁
Sample standard deviation s₁
Sample size n₁
Sample mean x̄₂
Sample standard deviation s₂
Sample size n₂

Variance assumption

Alternative hypothesis

t statistic
1.4026

Fail to reject the null hypothesis at α = 0.05.

tt = (x̄₁ − x̄₂) / SE placed on the t-distribution (approximated as N(0,1))
Degrees of freedom
56.1733
p-value
0.1662
Mean difference
4
Standard error
2.8519
Decision
Not significant
Step by step
  1. 1

    Standard error (Welch)

    √(100÷30 + 144÷30) = 2.8519
    SE = √(s₁²/n₁ + s₂²/n₂) — no pooling under the Welch assumption.
  2. 2

    Mean difference

    52 − 48 = 4
  3. 3

    t statistic

    4 ÷ 2.8519 = 1.4026
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

Enter each group's mean, standard deviation, and size to run an independent two-sample t-test. Choose Welch (unequal variances) or pooled (equal variances) and a one- or two-tailed alternative. The tool returns the t statistic, degrees of freedom, p-value, and a reject/fail-to-reject decision at α = 0.05.

Formula
Welch: t = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂); Pooled: t = (x̄₁ − x̄₂) / √(sp²(1/n₁ + 1/n₂))
How this is calculated

Enter the sample mean, standard deviation, and size for each of two independent groups, then choose whether to assume equal variances and pick a one- or two-tailed alternative. The test compares the difference in means against the variability expected by chance to produce a t statistic.

For the Welch (unequal-variance) test the standard error is √(s₁²/n₁ + s₂²/n₂) and the degrees of freedom use the Welch–Satterthwaite approximation df = (s₁²/n₁ + s₂²/n₂)² / [(s₁²/n₁)²/(n₁−1) + (s₂²/n₂)²/(n₂−1)]. For the pooled test a single pooled variance sp² = ((n₁−1)s₁² + (n₂−1)s₂²)/(n₁+n₂−2) is used, the standard error becomes √(sp²(1/n₁ + 1/n₂)), and df = n₁ + n₂ − 2.

The p-value is obtained from the Student's t cumulative distribution evaluated via the regularized incomplete beta function. A two-tailed p-value is 2·P(T > |t|); one-tailed p-values use a single tail. Each group needs at least two observations and non-negative standard deviations. Welch's test is the safer default because it does not assume the two populations share a variance.

Frequently asked questions

Use Welch's test whenever the two groups may have different variances or unequal sample sizes — it is robust and is the recommended default. Use the pooled test only when you are confident the population variances are equal.

It is the probability of observing a mean difference at least as extreme as yours if the two population means were truly equal. A p-value below your significance level (commonly 0.05) leads you to reject the null hypothesis of equal means.

No. This is for two independent (unpaired) groups. A paired t-test is used when the same subjects are measured twice or observations are naturally matched.

Also known as

two sample t test
independent t test
welch t test
compare two means
unpaired t test
2 sample t test
difference of means test

APA

TG we-Calculate Editorial Team. (2026). Two-Sample t-Test Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/two-sample-t-test-calculator

Chicago

TG we-Calculate Editorial Team. "Two-Sample t-Test Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/two-sample-t-test-calculator.

IEEE

TG we-Calculate Editorial Team, "Two-Sample t-Test Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/two-sample-t-test-calculator

BibTeX

@misc{wecalculate_two_sample_t_test_calculator, title = {Two-Sample t-Test Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/two-sample-t-test-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?