Tools / T Test Calculator

T Test Calculator

Compare the means of two groups from their summary statistics. Uses Welch's t-test, which does not assume the two groups have equal variance.

t = (x̄₁ − x̄₂) ÷ √(s₁²/n₁ + s₂²/n₂), Welch

Enter values to see the result

  1. 1

    Summarize group 1

    Mean, standard deviation, and sample size. Get the first two from the standard deviation calculator if you only have raw numbers.

  2. 2

    Summarize group 2

    Same three values. The groups do not need to be the same size.

  3. 3

    Read t, df, and p

    The p-value is two-tailed. Below 0.05 means the means differ by more than sampling noise would explain.

Why Welch and not Student

Welch's t-test handles unequal variances and unequal group sizes, and it barely loses anything when variances happen to match. It is the safer default.

Summary stats, not raw data

Useful when all you have is a published table or a dashboard export with means and standard deviations.

Fractional degrees of freedom

The Welch-Satterthwaite df is usually not a whole number, and rounding it changes the p-value. This keeps it exact.

Difference of means shown

The raw gap between the two means sits next to the p-value, so significance never gets read without the size of the effect.

When to run a t-test

Before and after measurements

Compare average handling time, rating, or score across two independent groups.

Two-group experiments

Test whether a treatment group's mean differs from a control group's.

Comparing published results

Two papers report a mean, standard deviation, and n. This tells you if they really disagree.

Welch's t-test

t = (x̄₁ − x̄₂) ÷ √(s₁²/n₁ + s₂²/n₂)

Degrees of freedom use the Welch-Satterthwaite equation, which is why they usually come out fractional. The p-value is two-tailed from the t-distribution with that df.

T-test vs ANOVA

T-test (this page)

  • Exactly two groups
  • Reports t and a difference of means
  • Welch handles unequal variance

ANOVA calculator

  • Three or more groups
  • Reports F across all groups
  • Avoids inflating false positives from repeated t-tests

Related calculators

Frequently asked questions

How do you run a two-sample t-test?

Divide the difference between the two group means by the standard error of that difference:

t = (x̄₁ − x̄₂) ÷ √(s₁²/n₁ + s₂²/n₂)

Then look up the two-tailed probability for that t with the Welch degrees of freedom. This page does both steps.

What is the difference between Welch's and Student's t-test?

Student's pools the two variances and assumes they are equal. Welch's does not, and adjusts the degrees of freedom instead.

When variances really are equal the two agree closely, and when they are not Welch's stays correct. Most statisticians now recommend Welch as the default, which is what this calculator uses.

What sample size do I need?

At least 2 per group for the maths to run, but that is nowhere near enough for a trustworthy result. Around 30 per group is a common rule of thumb for the t-distribution to behave well with non-normal data.

Smaller groups need the data to be closer to normal.

Can I use this for paired data?

No. This is the independent two-sample test. For before-and-after measurements on the same people, compute the differences per person and run a one-sample test on those.

What does a significant t-test tell me?

That the two means are unlikely to be this far apart by chance alone. It says nothing about how big or important the difference is.

Always read the difference of means, which this tool reports next to the p-value.

What if I have three or more groups?

Use the ANOVA calculator. Running a t-test on every pair inflates the chance of at least one false positive: three groups means three tests, and the risk climbs from 5% toward 14%.

Are my numbers stored?

No. Everything runs in your browser.

Collecting fresh survey responses? Try Formms for a form with a short link and QR.

Collect the responses on your phone next.

Formms builds the survey from a prompt, then you can paste counts back into these calculators anytime.

Create a free form My forms
Download on iOS
Scan to download iOS app
Download on Android
Scan to download Android app
View a demo form →