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.
Free tools / T-Test Calculator
Free tool
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.
Group A
Group B
Result
Significant
p = 0.0330Group B averages 0.30 more than Group A, and at 95% confidence the difference is real (p = 0.0330).
How to use it
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.
The same people measured twice, such as before and after a change. Paste the values in the same order.
One group against a fixed value, such as a target score of 4 out of 5.
What the result means
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.
At 95%, the true gap is likely inside this range. If the range includes 0, the groups could be the same.
The gap measured in standard deviations, so you can compare gaps across different scales.
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
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.
The t value you need to pass in a two-tailed test, by degrees of freedom.
| Degrees of freedom | 90% | 95% | 99% |
|---|---|---|---|
| 5 | 2.015 | 2.571 | 4.032 |
| 10 | 1.812 | 2.228 | 3.169 |
| 20 | 1.725 | 2.086 | 2.845 |
| 30 | 1.697 | 2.042 | 2.750 |
| 60 | 1.671 | 2.000 | 2.660 |
| 120 | 1.658 | 1.980 | 2.617 |
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
SegmentOS writes the survey from one sentence. Send it to your own list or to a verified audience.
Free to start. No card needed.
Free calculators
Templates
Learn