Free tools / T-Test Calculator

Free tool

T-Test Calculator

Compare two averages, such as ratings, spend or time, and see whether the gap is real. Type the summary numbers or paste raw data.

Your data

Change any number. The result updates as you type.

Enter

Group A

Group B

Variances
Confidence level

Result

Significant

p = 0.0330

Group B averages 0.30 more than Group A, and at 95% confidence the difference is real (p = 0.0330).

Difference (B − A)
+0.30
Range of the difference (95%)
+0.02 to +0.58
t
2.149
Degrees of freedom
180.1
p-value (two-tailed)
0.0330
p-value (one-tailed)
0.0165
Cohen's d
0.30 (small)

You have the number. Now ask the question.

Say it in a sentence. SegmentOS writes the survey, and real people answer it.

Free to start. No card needed.

How to use it

Pick the test, add your numbers.

Two groups
Group A4.1 average, 120
Group B4.4 average, 95
p-value0.033
01

Two groups

Two separate groups of people, such as customers and non-customers. Welch's test is the default because it doesn't assume both groups vary the same.

Paired
Before4, 5, 3, 4 …
After5, 5, 4, 4 …
Pairs12
02

Paired

The same people measured twice, such as before and after a change. Paste the values in the same order.

One group
Average4.1
Compare with4.0
p-value0.23
03

One group

One group against a fixed value, such as a target score of 4 out of 5.

What the result means

A gap, its range and its size.

The p-value tells you whether the gap is real. The range tells you how big it could be. Cohen’s d tells you whether it matters.

Group B minus group A
Difference+0.30
Range (95%)+0.02 to +0.58
Includes 0no

The range of the difference

At 95%, the true gap is likely inside this range. If the range includes 0, the groups could be the same.

Reading d
Small0.2
Medium0.5
Large0.8

Cohen's d

The gap measured in standard deviations, so you can compare gaps across different scales.

Same data
Welchp = 0.033
Studentp = 0.029

Welch or Student

Student's test assumes both groups vary the same. Welch's doesn't, and gives almost the same answer when they do. Keep Welch unless you have a reason.

The t-test works best with roughly normal data or about 30 or more answers per group. Ratings on a 1 to 5 scale are fine with groups of that size.

The math

How the t-test is calculated

Welch’s t-test

t = (mean₂ − mean₁) ÷ √(s₁² ÷ n₁ + s₂² ÷ n₂)


s is each group’s standard deviation and n its number of answers. The degrees of freedom come from the Welch-Satterthwaite formula. Worked example: averages of 4.1 and 4.4, standard deviations of 0.9 and 1.1, and 120 and 95 answers give t = 0.30 ÷ 0.140 = 2.15 with 180 degrees of freedom, so p = 0.033.

Critical t values

The t value you need to pass in a two-tailed test, by degrees of freedom.

Degrees of freedom90%95%99%
52.0152.5714.032
101.8122.2283.169
201.7252.0862.845
301.6972.0422.750
601.6712.0002.660
1201.6581.9802.617

Questions

About the t-test

Comparing percentages instead? Use the significance calculator

What does a t-test tell you?

Whether the difference between two averages is bigger than chance would explain. A p-value below 0.05 means a gap this big would turn up less than 5 times in 100 if the groups were really the same.

Which t-test should I use?

Two groups for separate people, paired for the same people measured twice, and one group to compare an average with a fixed value.

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

Student's assumes both groups have the same spread. Welch's doesn't. Welch's is the safer default and gives nearly the same result when the spreads match.

One-tailed or two-tailed?

Two-tailed, unless you decided the direction before collecting the data. The calculator shows both: the one-tailed p-value is half the two-tailed one, in the direction you saw.

Can I use a t-test on rating scales?

Yes, for average ratings on 1 to 5 or 0 to 10 scales with about 30 or more answers per group. With very small groups or very lopsided answers, a test such as Mann-Whitney is safer.

How many answers do I need?

It depends on the gap you want to detect. As a guide, at 95% confidence and 80% power, a medium gap (d = 0.5) needs about 64 answers per group and a small one (d = 0.2) about 394.

Keep going

Related studies and tools

Get averages worth comparing.

SegmentOS writes the survey from one sentence. Send it to your own list or to a verified audience.

Free to start. No card needed.