How to Run a t-Test in SPSS: Steps, Output and APA Write-Up
Reviewed by Prof. Dr. Alexander Holtermann · Updated 16 October 2026 · 6 min read
In SPSS: Analyze → Compare Means → Independent-Samples T Test. Read Levene’s test, then t, df, p and the CI, and report with Cohen’s d in APA style.
Key takeaways
- SPSS offers three t-tests under Analyze → Compare Means (in recent versions “Compare Means and Proportions”): One-Sample, Independent-Samples and Paired-Samples T Test.
- For the independent-samples t-test you move the outcome into Test Variable(s), the group variable into Grouping Variable and enter the two group codes under Define Groups.
- The output has a Group Statistics table and an Independent Samples Test table with Levene’s test, two rows (equal variances assumed / not assumed), t, df, p and the 95 % confidence interval.
- Recent SPSS versions also print effect sizes (Cohen’s d, Hedges’ g). Report: t(df) = value, p = value, d = value, together with means and SDs.
- R (
t.test()) and JASP give identical results; R uses Welch’s test by default, SPSS shows both variants.
Which t-test do you need?
Before you open SPSS, decide which of the three t-tests fits your design. The theory is explained in our article on the t-test; here is the short version.
| Design | t-test | SPSS menu item | Example |
|---|---|---|---|
| One sample against a known value | One-sample t-test | One-Sample T Test | Is the mean study time different from 20 hours? |
| Two independent groups | Independent-samples t-test | Independent-Samples T Test | Exam scores of flashcard users vs non-users |
| Same people measured twice | Paired-samples t-test | Paired-Samples T Test | Anxiety before vs after a workshop |
Step by step: independent-samples t-test in SPSS
Running example: 40 students, 20 used flashcards for exam preparation and 20 did not. Your data file has one row per student, a variable score (exam score, 0–100) and a variable group (1 = flashcards, 2 = no flashcards).
- 1. Check in Variable View that
scorehas the measure “Scale” andgroupis “Nominal” with value labels. - 2. Click Analyze → Compare Means → Independent-Samples T Test (some recent versions: Analyze → Compare Means and Proportions → Independent-Samples T Test).
- 3. Move
scoreinto Test Variable(s) andgroupinto Grouping Variable. - 4. Click Define Groups and enter 1 and 2 (the codes of your two groups).
- 5. Under Options keep the 95 % confidence interval; tick Estimate effect sizes if your version shows the option.
- 6. Click Paste to save the syntax in a syntax file (good practice), then run it, or click OK.
Reading the SPSS output
The output has two (in recent versions three) tables. The values below belong to the running example; Levene’s values are illustrative.
Group Statistics: n, mean, standard deviation and standard error per group. Flashcards: n = 20, M = 72.40, SD = 8.10. No flashcards: n = 20, M = 66.00, SD = 9.00.
Independent Samples Test: first look at Levene’s Test for Equality of Variances. If its Sig. value is above .05, read the row “Equal variances assumed”; if it is .05 or below, read the row “Equal variances not assumed” (Welch’s t-test). Many statisticians recommend reporting Welch’s test in all cases, because it is robust even when variances are equal.
| Column | Value (example) | Meaning |
|---|---|---|
| Levene’s F, Sig. | F = 0.41, p = .526 | No evidence of unequal variances → upper row |
| t | 2.36 | Test statistic: difference divided by its standard error |
| df | 38 (Welch: 37.59) | Degrees of freedom: n₁ + n₂ − 2 |
| Sig. (2-tailed) / Two-Sided p | .023 | Probability of a difference this large if H₀ is true |
| Mean Difference | 6.40 | 72.40 − 66.00 |
| Std. Error Difference | 2.71 | Standard error of the difference |
| 95 % CI of the Difference | [0.92, 11.88] | Plausible range for the population difference |
| Cohen’s d (Effect Sizes table) | 0.75 | Medium to large effect |
APA write-up
APA 7 asks for the test statistic, degrees of freedom, exact p-value, an effect size and ideally the confidence interval, plus descriptive statistics for each group. Write t and p in italics in your document, round to two decimals and report p without a leading zero.
- If you report Welch’s test, use the corrected df: t(37.59) = 2.36, p = .023.
- Report p < .001 instead of “.000”, which SPSS prints when p is very small.
- State which variant you used in the methods or results section.
Paired and one-sample t-tests in SPSS
Paired-Samples T Test: your data must be in wide format, one column per measurement (for example anxiety_pre and anxiety_post). Choose Analyze → Compare Means → Paired-Samples T Test and move both variables into the same pair. The output shows Paired Samples Statistics, the correlation between the two measurements and the Paired Samples Test with mean difference, t, df = n − 1 and p.
One-Sample T Test: choose the item, move your variable into Test Variable(s) and enter the comparison value under Test Value (for example 20 for 20 hours).
For non-normal data with small samples, the Mann-Whitney U test (independent groups) or the Wilcoxon signed-rank test (paired) under Analyze → Nonparametric Tests are alternatives.
The same t-test in R and JASP
If you want to check your SPSS result or do not have SPSS, R and JASP give the same numbers.
In R: t.test(score ~ group, data = df, var.equal = TRUE) gives the Student t-test from the upper SPSS row; without var.equal = TRUE R runs Welch’s test by default (the lower row). car::leveneTest(score ~ group, data = df) gives Levene’s test, and effectsize::cohens_d(score ~ group, data = df) the effect size. For a paired test use t.test(x, y, paired = TRUE).
In JASP: open the data file (JASP reads .sav files), choose T-Tests → Independent Samples T-Test, move score to Dependent Variables and group to Grouping Variable. Tick Student and/or Welch, Effect size (Cohen’s d), Descriptives and the assumption checks (Levene’s test, Shapiro-Wilk). The table updates immediately and is formatted in APA style. jamovi works in the same way.
Common mistakes
Most problems with t-tests in SPSS are about data setup, not the test itself.
- Wrong codes under Define Groups (e.g. 0 and 1 when the data use 1 and 2): SPSS shows empty output or a warning.
- Paired data in long format: the paired t-test needs one column per time point.
- Reading the wrong row in the Independent Samples Test table.
- Reporting “p = .000”: write p < .001.
- Running many t-tests instead of one ANOVA for three or more groups, which inflates the type I error rate.
- Forgetting the effect size: a significant p-value says nothing about the size of the difference.
Frequently asked questions
Where is the t-test in SPSS?
Under Analyze → Compare Means (in some recent versions Compare Means and Proportions). There you find One-Sample, Independent-Samples and Paired-Samples T Test.
Which row do I read in the SPSS t-test output?
Check Levene’s test: if Sig. > .05, read “Equal variances assumed”; otherwise read “Equal variances not assumed”. Many researchers report the Welch row (not assumed) by default.
How do I get Cohen’s d in SPSS?
Recent SPSS versions print an Independent Samples Effect Sizes table with Cohen’s d and Hedges’ correction (tick Estimate effect sizes if the option is shown). In older versions compute d = mean difference / pooled SD, or use our free significance tool.
How do I report an SPSS t-test in APA style?
Give means and SDs per group, then t(df) = value, p = value, d = value, ideally with the 95 % CI of the difference, e.g. t(38) = 2.36, p = .023, d = 0.75, 95 % CI [0.92, 11.88].
What does Sig. (2-tailed) mean in SPSS?
It is the two-sided p-value: the probability of a difference at least this large in either direction if the null hypothesis is true. Recent versions label it Two-Sided p and add a One-Sided p.
Sources and further reading
- Howell, D. C. (2013). Statistical Methods for Psychology (8th ed.). Wadsworth Cengage Learning.
- American Psychological Association. (2020). Publication Manual of the American Psychological Association (7th ed.).
- IBM SPSS Statistics documentation on the T-TEST procedure; R documentation of t.test(); JASP documentation (consulted 2026).
Your university’s examination regulations and style guide always take precedence.
Related articles
- t-testA t-test checks whether two means differ significantly: two independent groups, two paired measurements, or one mean against a fixed value.
- Statistics software comparedSPSS and Stata are menu- or command-based commercial packages, R and Python are free code, JASP and jamovi are free point-and-click. Choose by field and task.
- Free SPSS alternativesThe best free SPSS alternatives are JASP and jamovi (menus, APA tables), PSPP (SPSS-like syntax) and R (code). All open .sav files.
- Effect sizeAn effect size tells you how large a difference or relationship is, independent of sample size. Cohen’s d of 0.2, 0.5 and 0.8 is small, medium, large.
- Reporting statistics in APAAPA style reports test statistic, degrees of freedom, exact p-value and effect size, e.g. t(13.46) = 3.42, p = .004, d = 1.71. Examples for every test.
- Mann-Whitney U testThe Mann-Whitney U test compares two independent groups using ranks. It is the non-parametric alternative to the independent-samples t-test.