A t test compares means. In SPSS you use it to ask whether two groups differ, whether the same people changed between two time points, or whether a sample mean differs from a known value. This guide covers all three versions, the assumptions, the output and how to report it.
Which t test do you need?
There are three t tests. The right one depends on your design, not on your data.
| Test | Use it when | Example |
|---|---|---|
| Independent-samples t test | Two separate groups, each person measured once | Exam scores of an intervention group vs a control group |
| Paired-samples t test | The same people measured twice, or matched pairs | Anxiety before and after a training programme |
| One-sample t test | One group compared with a fixed value | Mean satisfaction compared with the scale midpoint of 3 |
If you have three or more groups, use ANOVA instead. Running several t tests inflates your Type I error rate. Our ANOVA in SPSS guide covers that case, and the which statistical test guide helps if you are unsure.
Assumptions of the t test
Check these before you interpret the result.
Continuous outcome
The dependent variable should be measured on an interval or ratio scale. Long Likert-type scale scores (averages of several items) are usually treated as continuous. A single 5-point item is a weaker case.
Independence of observations
Each participant contributes one score per condition, and participants do not influence each other. This comes from your design. No test in SPSS can fix a violation of independence.
Approximate normality
For the independent test, the outcome should be roughly normal within each group. For the paired test, it is the difference scores that matter. With larger samples (roughly 30 or more per group) the t test is fairly robust to moderate non-normality. Check histograms, Q-Q plots and skewness via Analyze > Descriptive Statistics > Explore.
Homogeneity of variance
The independent test assumes both groups have similar variances. SPSS tests this with Levene's test, which appears automatically in the output. This assumption does not apply to paired or one-sample tests.
How to run a t test in SPSS
In recent versions of SPSS the menu may be labelled Compare Means and Proportions. The dialog boxes are the same.
Independent-samples t test
- Go to Analyze > Compare Means > Independent-Samples T Test.
- Move your outcome into Test Variable(s).
- Move your group variable into Grouping Variable, then click Define Groups and enter the two codes (for example 1 and 2).
- In SPSS 27 and later, tick Estimate effect sizes.
- Click OK.
Paired-samples t test
- Go to Analyze > Compare Means > Paired-Samples T Test.
- Select the two variables (for example pre and post) and move them into the Paired Variables box as one pair.
- Tick Estimate effect sizes if your version offers it, then click OK.
Your data must be in wide format: one row per person, with each time point in its own column.
One-sample t test
Go to Analyze > Compare Means > One-Sample T Test. Move your variable into Test Variable(s), type the comparison value into Test Value, and click OK.
How to read the SPSS output
For an independent-samples t test, SPSS gives a Group Statistics table, an Independent Samples Test table and, in SPSS 27 and later, an effect sizes table.
Choose the right row using Levene's test
The Independent Samples Test table has two rows. Look at the Sig. value for Levene's test first.
- If Levene's Sig. is above .05, read the Equal variances assumed row.
- If Levene's Sig. is .05 or below, read the Equal variances not assumed row. This is Welch's t test.
Many statisticians now recommend reporting Welch's t test by default, because it performs well whether or not variances are equal (Delacre, Lakens and Leys, 2017). If you do this, say so in your methods.
The key columns
| Column | What it tells you |
|---|---|
| t | The test statistic: the mean difference divided by its standard error |
| df | Degrees of freedom (n1 + n2 − 2 for the pooled test; a decimal value for Welch) |
| Sig. (2-tailed) or Two-Sided p | The p value you normally report |
| Mean Difference | Group 1 mean minus group 2 mean |
| 95% Confidence Interval of the Difference | The plausible range for the true mean difference |
SPSS 27 and later show both One-Sided p and Two-Sided p. Report the two-sided value unless you pre-registered a directional hypothesis.
Effect size
Cohen's d = (M1 − M2) / SDpooled. SPSS 27 and later report it in the Independent Samples Effect Sizes table, along with Hedges' correction, which adjusts for small samples. In older versions, calculate d by hand from the group statistics. Cohen (1988) suggested 0.2, 0.5 and 0.8 as small, medium and large, but interpret d in the context of your field. See our effect size guide for more detail.
Worked example
Example (invented data). A researcher compares exam scores between students who used a revision app (n = 30) and students who did not (n = 30).
| Group | n | Mean | SD |
|---|---|---|---|
| App | 30 | 72.4 | 8.1 |
| No app | 30 | 66.9 | 9.0 |
Levene's test gives Sig. = .41, so the Equal variances assumed row applies. The output shows:
- Mean difference = 72.4 − 66.9 = 5.5
- Pooled SD = √((8.1² + 9.0²) / 2) = √73.31 = 8.56
- Standard error of the difference = 8.56 × √(2/30) = 2.21
- t(58) = 5.5 / 2.21 = 2.49, two-sided p = .016
- 95% CI of the difference = [1.07, 9.93]
- Cohen's d = 5.5 / 8.56 = 0.64
Welch's test gives almost the same result here, t(57.4) = 2.49, p = .016, because the group sizes and variances are similar. The app group scored higher, with a medium effect by Cohen's benchmarks.
How to report a t test in APA 7 style
Report the means and standard deviations, the t value with degrees of freedom, the exact p value, the confidence interval and the effect size. Italicise the statistical symbols (t, p, M, SD, d) in your final document.
Students who used the revision app scored higher (M = 72.4, SD = 8.1) than students who did not (M = 66.9, SD = 9.0), t(58) = 2.49, p = .016, 95% CI [1.07, 9.93], d = 0.64.
For a paired test, use the same pattern and name the conditions, for example "anxiety decreased from pre-test (M = …) to post-test (M = …), t(41) = …". Our APA results section guide shows how to combine several tests in one chapter.
What to do if assumptions fail
- Unequal variances. Use Welch's t test (the Equal variances not assumed row). You do not need a different procedure.
- Non-normal data with small groups. Use the Mann–Whitney U test for independent groups, or the Wilcoxon signed-rank test for paired data. In SPSS, both are under Analyze > Nonparametric Tests, either through Independent Samples or Related Samples, or through Legacy Dialogs.
- Outliers. Check whether they are data entry errors first. If they are genuine, run the analysis with and without them and report both. Do not delete values just to get significance.
- Large samples with mild skew. The t test is usually robust here. Report that you checked, and why you kept the parametric test.
Common mistakes
- Reading the wrong row of the Independent Samples Test table.
- Using an independent test for pre-post data from the same people.
- Running several t tests instead of one ANOVA for three or more groups.
- Reporting "p = .000". SPSS rounds; write p < .001 instead.
- Reporting p without an effect size or confidence interval.
- Treating a non-significant result as proof that the groups are the same.
Getting help with your t test
If your output does not match what you expected, or your supervisor has asked questions you cannot answer, our SPSS help service can run and check the analysis with you and explain each table in plain English. You keep ownership of the interpretation and write-up. Not sure the t test is even the right choice? Start with a free methods check.
FAQ
Which p value should I report from the SPSS t test output?
Report the two-sided p value from the row chosen by Levene's test, or from the Equal variances not assumed row if you use Welch's test by default. In SPSS 27 and later this column is labelled Two-Sided p. Older versions call it Sig. (2-tailed).
Does SPSS calculate Cohen's d for a t test?
Yes, SPSS 27 and later can. Tick Estimate effect sizes in the dialog and SPSS adds an effect sizes table with Cohen's d and Hedges' correction. In earlier versions you calculate d by hand from the means and standard deviations.
What sample size do I need for a t test?
It depends on the effect size you expect, your alpha and the power you want. To detect a medium effect (d = 0.5) with 80% power at alpha = .05, you need about 64 participants per group for an independent test. Our G*Power sample size guide shows how to calculate this.
Can I use a t test on Likert scale data?
You can usually use it on scale scores that average several Likert items. For a single item with five response options, many researchers prefer the Mann–Whitney U or Wilcoxon test. Whichever you choose, justify it briefly in your methods.
What if Levene's test is significant?
Read the Equal variances not assumed row, which gives Welch's t test. Report the adjusted degrees of freedom, which will usually be a decimal. You do not need to transform your data or switch to a non-parametric test for this reason alone.
Need help with this analysis?
A statistician can run, check and explain it with you. Fixed quote before we start.