How to Compute Variables in SPSS

  • 24/7 Support
  • 100+ Subjects
  • 500+ PhD statisticians
How to Compute Variables in SPSS


SPSS, also known as IBM SPSS Statistics is a powerful statistical software because it supports various features for data manipulation/data pre-processing. A major feature that supports data pre-processing is its computing variable feature. This feature allows the users to create/derive new variables from existing ones. This makes SPSS suitable whenever you want to perform data transformation for in-depth analysis. Therefore, this article provides a step-by-step procedure on how to compute variables in SPSS. By the end of this tutorial, you’ll learn how to use statistical expressions (sum & mean) and arithmetic functions (division) to compute new variables from existing ones.

How to Compute Variables in SPSS: A Step-by-Step Guide

Step 1. From the Main Menu, Click Transform > Compute Variable

The compute variable dialogue box will appear as shown below

Our custom responsive image

Step 2. In the Type Variable Section, type in the name of the variable you want to create

Step 3. In the Numeric Expression box, write the expression to specify how to compute the variable.


Suppose you have items/variables in your data named, Item1, Item2, Item3, Item4, and Item5, which measure a certain construct, say emotional intelligence, then you can compute the new variable using various methods, depending on your pre-defined rules.

Case 1. Suppose you wanted to create the variable (emotional_intelligence), which is the sum of scores of individual items (say, Items, 1, 2, 3, 4 and 5, you would type;

  • Sum (Item1, Item2, Item3, Item4, Item5)

Case 2. Suppose you wanted to create the variable (emotional_intelligence), which is the mean score of the five items. Then you would type:

  • Mean(Item1, Item2, Item3, Item4, Item5)

Case 3. Suppose you wanted to create the variable (emotional_intellignece), as a division of the total scores divided by 5, you would type:

  • Sum (Item1, Item2, Item3, Item4, Item5)/5

Step 4. Click on the Type & Label, which is just below the Target Variable box.

A box will pop up, which will allow you to type the label for the variable you created. A label is basically a short description of the variable you create in SPSS. Let’s say you created the variable (emotional_intelligence), you could write as label “Total Scores of the 5 items.” This ensures that anyone looking at your data understands the newly created variable.

Step 5. Click OK to compute the Variable.

A New Variable will be created. To see the newly created variable, return to the data view and you’ll see an additional variable named “emotional_intelligence” at the end of your existing file.

Final Take Away

This SPSS tutorial has provided you with some basic skills on how to get started with computing variables in SPSS. Remember practice and practice make perfect. Experiment with different expressions and functions to explore the software’s full capabilities. You may also consider checking YouTube SPSS tutorials for more details.

Need Help with Complex SPSS Analysis?

While this guide provides a solid foundation, SPSS offers a rich set of features for complex data analysis. If you encounter challenges beyond the scope of this tutorial, consider seeking professional SPSS data analysis services from experts. Online SPSS has a team of SPSS experts equipped to handle your data analysis needs. They can guide you through intricate analyses, ensure accurate results, and empower you to unlock the full potential of your research.

Still struggling with your data analysis project? Get Started Now & Unlock 15% Off Your First Project