Independent Samples t-test Calculator

🔒 Local only Education & Statistics Tools

Enter n, mean and SD for two independent groups to get t, degrees of freedom, p, a 95% CI and an effect size, with a choice of Welch or Student (pooled variance).

The defaults are the first worked example: class A n = 30, M = 78.4, SD = 8.2 against class B n = 32, M = 73.1, SD = 9.5. Calculate gives Welch t(59.61) = 2.36, p = .022 and a ready-to-paste APA statistics line.

Tool area

Group 1
Group 2

What an independent-samples t test does

It compares the means of two independent groups, for example the final scores of two classes taught differently. H0: μ1 = μ2; the two-tailed alternative is that they differ. Paired data (the same people measured twice) need a paired t test; R’s documentation notes that its sleep data set is actually paired.

  • Quick decision rule (Welch vs. Student): Use Welch’s t-test by default (no equal-variance assumption, Excel T.TEST type = 3; Delacre et al., 2017). Switch to Student’s pooled-variance t-test (df = n1 + n2 − 2, Excel T.TEST type = 2) only when required by a textbook or journal.
  • Significance & APA 7 rule: A two-tailed p < .05 (equivalently, a 95% CI for M1 − M2 that excludes 0) indicates a statistically significant difference at α = .05. Report both group means, SDs, sample sizes, and the exact test: e.g., Welch t(59.61) = 2.36, p = .022, 95% CI [0.80, 9.80], g = 0.59.

Worked examples

The class numbers are made up for illustration; type them into the tool to reproduce them.

To get each group’s mean and sample SD first, use the standard deviation calculator.

  • Example 1 (default, Welch): n = 30, M = 78.4, SD = 8.2 versus n = 32, M = 73.1, SD = 9.5. Mean difference 5.3; SE = √(8.2² ÷ 30 + 9.5² ÷ 32) = √5.0616 = 2.2498; t = 2.356; df = 59.61; p = .0218; 95% CI [0.80, 9.80]; Hedges’ g = 0.59. With the pooled (Student) formula: SE 2.2606, t = 2.344, df = 60, p = .0224.
  • Example 2 (very different n and SD): n = 12, M = 75, SD = 15 versus n = 48, M = 68, SD = 6. Welch: t(11.89) = 1.59, p = .139. Student: t(58) = 2.56, p = .013. The same data are non-significant under one method and significant under the other.

Student versus Welch

Student pools the two variances and assumes they are equal, with df = n1 + n2 − 2. Welch keeps the variances separate and uses the Welch–Satterthwaite degrees of freedom, which are usually fractional and always between min(n1 − 1, n2 − 1) and n1 + n2 − 2. Delacre, Lakens and Leys (2017) argue that Welch’s t-test should be used as the default strategy and that choosing between the two with a test of equal variances often fails to give an appropriate answer. Use Student if your instructor or journal requires it; the menu above the tool switches the method.

APA reporting

The APA numbers and statistics guide asks for inferential statistics such as t to two decimals, exact p values to two or three decimals (p < .001 when smaller), no leading zero for p, italic statistical symbols, and no definition of t, df, p, M or SD. Example: “Class A (M = 78.4, SD = 8.2, n = 30) scored higher than class B (M = 73.1, SD = 9.5, n = 32), Welch t(59.61) = 2.36, p = .022, 95% CI [0.80, 9.80], g = 0.59.” The guide does not state how many decimals Welch df should have.

Excel: T.TEST

T.TEST(array1, array2, tails, type) returns the p value only: tails = 2 for two-tailed; type 1 paired, 2 equal variance, 3 unequal variance (Welch). With group A in A2:A9 and group B in B2:B10 (72, 75, 80, 68, 77, 83, 79, 74 and 65, 70, 72, 68, 74, 66, 71, 69, 73) LibreOffice Calc gives 0.008642 for type 3 and 0.005593 for type 2, matching SciPy. Microsoft documents that T.INV.2T truncates non-integer degrees of freedom, so do not feed Welch’s fractional df to T.DIST.2T for the p value.

Welch two-tailed p
=T.TEST(A2:A9,B2:B10,2,3)
Student two-tailed p
=T.TEST(A2:A9,B2:B10,2,2)

Checked against published results

NIST handbook example AUTO83B (Student): n = 249, M = 20.14458, SD = 6.41470 versus n = 79, M = 30.48101, SD = 6.10771 gives T = −12.62059, sp = 6.34260, df = 326 in both the handbook and this tool. R’s sleep data with Welch (t = −1.8608, df = 17.776, p = 0.07939, 95% CI −3.3655 to 0.2055) is reproduced too; those data are paired, so this is only a numerical check.

Formula and calculation

Welch: t = (M1 − M2) / √(s1²/n1 + s2²/n2); Student: t = (M1 − M2) / [sp × √(1/n1 + 1/n2)]

Welch df = (s1²/n1 + s2²/n2)² / [(s1²/n1)²/(n1 − 1) + (s2²/n2)²/(n2 − 1)]; Student df = n1 + n2 − 2. s1 and s2 are sample SDs; p is two-tailed.

Educational applications

Use for means from two independent groups; check independence, outliers and distribution shape. Statistical significance is not the same as educational importance.

Method and sources

APA / research reporting tip

APA example: “Class A (M = 78.4, SD = 8.2) scored higher than class B (M = 73.1, SD = 9.5), Welch t(59.61) = 2.36, p = .022, 95% CI [0.80, 9.80], g = 0.59.” Statistical symbols are italic.

How to use

  1. Enter n, mean and sample SD for both groups.
  2. Choose Welch (default) or Student (pooled variance).
  3. Calculate to see t, df, p, CI and effect size; the last tile is a statistics line for your report.

Use cases

  • Compare final scores under two teaching methods (the default).
  • See how Welch and Student differ when sample sizes and SDs are far apart.
  • Check the output of SPSS or Excel from summary statistics.

Content and verification review:

How to verify a Independent Samples t-test Calculator result before relying on it

✓

This section covers the current fields of the Independent Samples t-test Calculator: N, mean and SD for two groups and a method menu (Welch or Student). Results are the mean difference, t, degrees of freedom, two-tailed p, standard error, 95% CI, Hedges’ g and an APA statistics line.

Check the defaults (Welch)

Group 1 N = 30, M = 78.4, SD = 8.2; group 2 N = 32, M = 73.1, SD = 9.5 give a mean difference of 5.3, SE 2.250, t = 2.356, df = 59.61, p = .022, 95% CI [0.799, 9.801] and Hedges’ g = 0.588. The APA line reads Welch t(59.61) = 2.36, p = .022, 95% CI [0.80, 9.80], g = 0.59.

Switch to Student, then to very unequal groups

With Student the defaults give SE 2.261, t = 2.344, df = 60, p = .022. For N = 12, M = 75, SD = 15 against N = 48, M = 68, SD = 6, Welch gives t(11.89) = 1.585, p = .139 while Student gives t(58) = 2.559, p = .013, opposite conclusions, which is why the method must be stated.

Edge cases

Equal means give t = 0 and p shown as > .999, which is a normal result. An SD of 0 or below, or a sample size that is not a whole number above 1, shows an error instead of a number.

Acceptance checklist

  • The two groups are independent, not the same people measured twice.
  • You entered sample SDs (n − 1 denominator), not population SDs, standard errors or variances.
  • The defaults reproduce Welch t(59.61) = 2.36, p = .022; if Student is used, the report says so.
  • After copying the APA line, symbols are italicised and the CI and effect size follow your instructor’s or journal’s rules.

FAQ

What is the difference between Welch and Student?
Student pools the variances (df = n1 + n2 − 2); Welch does not assume equal variances and has fractional df. With very unequal n and SD the p values can differ a lot.
Which Excel T.TEST type should I use?
Type 2 for equal variance (Student), type 3 for unequal variance (Welch); type 1 is paired. T.TEST returns only the p value.
How do I report it in APA style?
For example “Welch t(59.61) = 2.36, p = .022”: t to two decimals, exact p, p < .001 when smaller, italic symbols.

Privacy & local processing

🔒 This tool runs entirely in your browser. No data is uploaded to any server.

All input and calculation stays in your browser and is not uploaded to FunnyTools.

Trust & usage note

This tool runs mainly in your browser. Your input is not actively uploaded to a server. Avoid entering highly sensitive data. Results are for reference only.

Disclaimer

For teaching and preliminary estimates; it does not replace statistical software or professional judgment. Verify the data, design and assumptions before reporting.

Last updated:

Get updates

New tools and practical tips, straight to your inbox. No spam, unsubscribe anytime.