Unit 7 · Prepare your data

How to handle missing values and outliers in SPSS

Define missing value codes in SPSS, find outliers with z-scores (±3.29), and choose listwise or pairwise exclusion.

Free tutorialPro practiceAbout 5 minutes7 practice questions

Quick answer: How do you handle missing values and outliers in SPSS?

  1. In Variable View, click the Missing cell and enter codes such as 99 as discrete missing values.
  2. Run Analyze › Descriptive Statistics › Descriptives with Save standardized values as variables ticked.
  3. Look for z-scores beyond ±3.29.
  4. Check each extreme value for typos before deciding what to do.

Last updated November 2026 · Not sure this is the right test? Try the Which statistical test? tool.

Missing data and outliers

Missing data are values that weren’t recorded. Outliers are values far from the rest. Both can distort results, so you need to find them, understand why they happened and decide what to do, then report your decisions.

When to use it

  • After data entry and before any analysis.
  • Whenever a summary looks odd, such as an impossible maximum.

How it works

Declare codes such as 99 as missing in Variable View so they aren’t treated as real values. Then think about why data are missing: completely at random, at random (related to other measured variables) or not at random (related to the missing value itself). For outliers, a z-score shows how many SDs a value is from the mean; |z| > 3.29 (p < .001) is a common cut-off. First check for typing errors. For genuine values, options include keeping them, removing them, or replacing them with a less extreme value (winsorising); report what you did and whether it changed the results.

Worked example

A reaction time of 828 ms has z = 3.62. It isn’t a typo, so the analysis is run with and without it, and both are reported.

Key terms

System-missing
A blank cell.
User-missing
A code (such as 99) declared as missing.
Listwise deletion
Dropping a case from the whole analysis if it’s missing any variable.
Pairwise deletion
Using every case that has data for each pair of variables.
Winsorising
Replacing extreme values with less extreme ones.

Common mistakes

  • Leaving 99 as a real value.
  • Deleting outliers just because they make results non-significant.
  • Not reporting how much data was missing or excluded.

How to do it in SPSS

Define missing values

Many surveys code “no answer” as 99 or 999. Unless you tell SPSS, it treats 99 as a real score and your averages go wrong.

Missing Values
No missing values
✓Discrete missing values1
99999   
Range plus one optional discrete missing value2
Low:     High:     Discrete value:    
OKCancelHelp3
  1. 1
    Discrete missing valuesType up to three codes that mean “no answer”, such as 99 and 999. Open it from the Missing cell in Variable View.
  2. 2
    RangeUse a range when many codes mean missing, such as 90 through 99.
  3. 3
    After OKThese codes are left out of every analysis. Blank cells are already missing (“system-missing”), so you don’t need to code them.

Spotting outliers with z-scores

Descriptives can save a z-score for every person: how many standard deviations they sit from the mean. Large values flag possible outliers.

rt_study.sav [DataSet1] – SPSS Statistics Data Editor
FileEditViewDataTransformAnalyzeGraphsUtilitiesExtensionsWindowHelp
idrtZrt1
11498−.26
22545.29
336121.08
44471−.58
558283.622
66503−.20
Data ViewVariable View
  1. 1
    The new Z columnDescriptives › Save standardized values as variables adds Z in front of the name. Mean reaction time is 520 ms, SD 85.
  2. 2
    A possible outlierParticipant 5 is 3.62 SDs above the mean. A common cut-off is beyond ±3.29 (p < .001).

First check for a typing error. If the value is real, say what you did in your method: keep it, remove it, or replace it with a less extreme value, and whether the results change.

The SPSS syntax

Prefer typing to clicking? Open File › New › Syntax, paste this in, select it and choose Run › Selection. Every dialog's Paste button writes the same kind of code.

* Treat 99 and 999 as missing.
MISSING VALUES age (99, 999).

* Save z-scores (adds Zrt to the data).
DESCRIPTIVES VARIABLES=rt
  /SAVE.

Practice data

Download the file used in this lesson and run it yourself in SPSS: you should get the same results as the screens above.

  • rt_study.savReaction times, with 99 and 999 codes for missing age (N = 60)

Now practise it interactively →

Reading is only half of it. Tap through the real SPSS menus, read the output and pick the right write-up in 7 quick questions, with instant feedback on every answer.

Practice for this lesson is part of Pro, with every unit, unlimited hearts and saved progress.

More in Prepare your data