Student's t-Test in SPSS: Step-by-Step Tutorial (2026)

The t-test is probably the statistical procedure you'll use most during a psychology thesis. The idea is straightforward: you have two groups and you want to know if their means are genuinely different or if the gap is just noise. A treatment group versus a waitlist control, for instance -- is the anxiety difference real?

We're going to run a t-test in SPSS from start to finish. No filler, with a concrete example, and with special attention to the part that trips most people up: reading the output table and knowing which row to look at.

When to use a t-test

The t-test is the right tool when three conditions hold:

  • You are comparing exactly two groups (for three or more, you need ANOVA)
  • Your dependent variable is continuous (BDI-II scores, reaction times, GPA)
  • You want to compare means (not medians or proportions)

There are two main variants:

Independent-samples t-test: the two groups contain different participants. Classic case: experimental vs. control.

Paired-samples t-test (dependent): the same participants measured at two time points. Classic case: pre-test vs. post-test after an intervention.

Not sure which test you need? Start with our guide to choosing the right statistical test.

Assumptions of the t-test

Before you click OK in SPSS, check that your data meet the assumptions. Skipping this step is one of the most common mistakes in psychology dissertations, and also one of the easiest to avoid.

1. Continuous dependent variable

Your outcome must be measured on an interval or ratio scale. Scores from standardized questionnaires (STAI, BDI-II, PANAS) are treated as continuous in practice, even though they are technically ordinal. If your variable is clearly categorical (yes/no, diagnosis type), the t-test is not the way to go.

2. Normality

The t-test assumes the dependent variable is normally distributed within each group. To check:

  • Shapiro-Wilk test: the go-to test for samples under 50. If p > .05, you do not reject normality.
  • Visual inspection: look at histograms and Q-Q plots. With larger samples (n > 30 per group), the t-test is robust to moderate departures from normality thanks to the central limit theorem.

If normality is seriously violated (extreme skewness, severe outliers), consider Mann-Whitney U for independent samples or Wilcoxon for paired samples.

3. Homogeneity of variances (independent samples only)

Levene's test checks whether the two groups have similar variances. SPSS gives you this automatically when you run the t-test. If Levene's test is significant (p < .05), variances are unequal and you should use the Welch correction. Good news: SPSS already computes it for you in the second row of the output table. In fact, many statisticians recommend always using Welch by default, since it performs just as well when variances are equal and better when they're not (Delacre et al., 2017).

For more detail, see our guide on verifying statistical assumptions.

Worked example

Throughout this tutorial we use the following scenario: a researcher wants to test whether a mindfulness-based intervention reduces anxiety. Sixty psychology undergraduates are randomly assigned to an experimental group (n = 30, 8 weeks of mindfulness training) or a waitlist control group (n = 30). The dependent variable is the STAI-State total score (range 20-80; higher = more anxiety) measured at the end of the intervention.

For the paired-samples version, we use pre- and post-intervention scores within the experimental group.

Running the t-test in SPSS: independent samples

Preparing your data

First things first: make sure your dataset is structured correctly. You need two columns:

  • Dependent variable (e.g., anxiety_post): the anxiety scores for all participants, one per row.
  • Grouping variable (e.g., group): numerically coded (1 = experimental, 2 = control).

A classic mistake is having data in "wide" format (one column per group). SPSS needs "long" format: each row is a participant, and group membership is indicated by a numeric code in a separate column.

Running the analysis

  1. Go to Analyze > Compare Means > Independent-Samples T Test
  2. Move anxiety_post into the Test Variable(s) box
  3. Move group into the Grouping Variable box
  4. Click Define Groups and enter the codes (Group 1: 1, Group 2: 2)
  5. Click OK

[Screenshot: SPSS independent-samples t-test dialog with dependent variable and grouping factor]

Reading the output table

SPSS produces two tables. The first gives you descriptive statistics for each group: mean, standard deviation, standard error of the mean. Always look at this table first -- it tells you the direction of the effect (which group scored higher).

The second table is where the action is. It has two rows, and this is the part that confuses a lot of people:

Row 1 -- "Equal variances assumed": the classic Student's t-test. Use this if Levene's test (the first two columns in that same table) is NOT significant (p > .05).

Row 2 -- "Equal variances not assumed": Welch's t-test. Use this if Levene's test IS significant (p < .05). The degrees of freedom will be decimal, and that's perfectly fine.

The practical rule: look at the Levene columns (F and Sig.) first. If Levene's Sig. is above .05, read Row 1. If it's below .05, read Row 2. Or, if you want to keep things simple, always read Row 2 (Welch). You lose nothing when variances are equal and gain accuracy when they're not.

From that row, the key numbers are:

  • t: the test statistic. The further from zero, the stronger the evidence against the null.
  • df: degrees of freedom.
  • Sig. (2-tailed): the p-value. Below .05 means statistically significant.
  • Mean Difference: how much the means differ in the units of your scale.
  • 95% CI of the Difference: the confidence interval. If it doesn't include zero, the difference is significant.

[Screenshot: SPSS output table showing Levene's test and t, df, and significance values]

Getting the effect size

SPSS (version 27 and later) lets you request Cohen's d directly. In the t-test dialog, click Options and tick Effect size estimates. If your version doesn't have this, you can compute it by hand:

d = (M1 - M2) / SDpooled

Where the pooled SD is computed from both groups' standard deviations. The classic benchmarks (Cohen, 1988): 0.2 = small, 0.5 = medium, 0.8 = large. But keep in mind: these are rough guidelines, not hard rules. What matters is whether the effect size is clinically or practically meaningful in your context.

Running the t-test in SPSS: paired samples

When you measure the same participants at two time points (pre-post), the procedure changes slightly.

  1. Go to Analyze > Compare Means > Paired-Samples T Test
  2. Select the two variables that form the pair (e.g., anxiety_pre and anxiety_post) and move them into the Paired Variables box
  3. Click OK

[Screenshot: SPSS paired-samples t-test dialog with variable pair selected]

SPSS produces three tables:

  1. Paired Samples Statistics: the mean and SD for each variable in the pair.
  2. Paired Samples Correlations: the correlation between the two measurements. When this is high and positive, the paired test has more power than the independent version (which is exactly why we use it).
  3. Paired Samples Test: the actual result. It gives you the mean difference between pairs, its SD, the standard error, the 95% CI of the difference, the t value, df, and two-tailed significance.

No Levene's test here, and no two-row dilemma: there's just one row with the result. Simpler than the independent-samples case.

How to interpret the output

Whichever variant you use, the t-test produces the same key elements:

Element What it tells you
t The test statistic. The larger its absolute value, the stronger the evidence against H0.
df Degrees of freedom. Classic independent: n1 + n2 - 2. Welch: adjusted, may be decimal. Paired: n - 1.
Sig. (2-tailed) The p-value. Below .05 means the difference is statistically significant.
Mean Difference The raw difference between the means. Check the sign for direction.
95% CI Confidence interval for the difference. If it doesn't include zero, the difference is significant at alpha = .05.
Cohen's d Standardized effect size. 0.2 = small, 0.5 = medium, 0.8 = large (Cohen, 1988).

A point worth hammering home: the p-value tells you whether the difference is statistically significant, but it says nothing about whether it matters. A study with 500 participants can flag a 1-point STAI difference as significant, even though clinically it's meaningless. That's why APA 7 requires you to always report effect size and confidence intervals. For a deeper dive, see our guide to interpreting confidence intervals.

Reporting in APA 7 format

APA 7 requires the t statistic, degrees of freedom, exact p-value, confidence interval, and effect size. Here are ready-to-use templates:

Independent samples:

The experimental group (M = 37.80, SD = 7.65) reported significantly lower anxiety scores than the control group (M = 45.12, SD = 9.30), t(58) = -3.34, p = .001, Cohen's d = -0.86, 95% CI [-11.73, -2.91].

Paired samples:

Anxiety scores decreased significantly from pre-test (M = 49.50, SD = 10.20) to post-test (M = 38.10, SD = 8.45), t(29) = 5.83, p < .001, Cohen's d = 1.06, 95% CI [7.40, 15.40].

Formatting details worth keeping in mind:

  • t and p are always italicized
  • Never write p = .000; use p < .001
  • Report the exact p-value to three decimal places (p = .024), unless it falls below .001
  • Degrees of freedom go in parentheses right after t: t(58)
  • Always include an effect size (Cohen's d for the t-test)
  • If you used Welch, df will be decimal; report them as-is, don't round to whole numbers

For a more comprehensive guide, see our full APA 7 results reporting guide. And if you already have your output and want the sentence built from your numbers, paste your t-test table here and it returns the paragraph ready to go.

Common mistakes

1. Using the t-test with more than two groups. If you have three conditions (CBT, pharmacotherapy, and control), you need ANOVA. Running three separate t-tests inflates the Type I error rate: three pairwise comparisons at 5% yield a family-wise rate of about 14.3%.

2. Ignoring Levene's test. When variances are unequal and group sizes differ, the classic t-test gives unreliable results. Always check Levene's and use the Welch row when needed. Or just use it every time.

3. Over-relying on Shapiro-Wilk. With large samples, Shapiro-Wilk rejects normality for trivial deviations. Don't automatically switch to Mann-Whitney just because Shapiro-Wilk came back significant with n = 200. Look at the Q-Q plots and use your judgment.

4. Reporting only the p-value. A p-value without effect size and confidence interval is half the story. APA 7 mandates both, and reviewers will ask for them.

5. Confusing independent with paired designs. If you measure the same group at two time points, it's a paired test. Using the independent version violates the independence assumption and your results will be wrong.

6. Failing to report the direction of the effect. Saying the difference was significant without mentioning which group scored higher is a surprisingly common omission. Always include the means and SDs for each group.

Need help with your analysis?

If you're working on a dissertation or journal submission and want to make sure your t-test (or any other analysis) is properly run, interpreted, and reported, I can help. Through my statistical consulting service we go through your data together, verify assumptions, pick the right test, and get the results ready for your supervisor or peer reviewers. You can also check out my dissertation support service if you need guidance throughout your entire analysis pipeline.

Keep reading

All blog articles