How can I calculate the mean by group in SPSS?

SPSS (Statistical Package for the Social Sciences) is a statistical software program used for data analysis and management. One of its key features is the ability to calculate the mean by group, which allows for the comparison and analysis of data from different groups or categories. To calculate the mean by group in SPSS, you can use the “Descriptives” function under the “Statistics” tab. This will provide you with the mean value for each group in your data set.

For example, if you have a data set on the average income of individuals in different countries, you can use SPSS to calculate the mean income for each country. This will allow you to compare and analyze the income levels across different countries. The output will show the mean income for each country, along with other descriptive statistics such as standard deviation and confidence intervals. This feature in SPSS is useful for identifying patterns and trends within your data set and making informed decisions based on the results.

Calculate Mean by Group in SPSS (With Example)


Often you may want to calculate the mean value of one variable in SPSS, grouped by another variable.

The easiest way to do this is by using Analyze > Compare Means and Proportions > Means.

The following example shows how to do so in practice.

Example: How to Calculate Mean by Group in SPSS

Suppose we have the following dataset in SPSS that shows the exam scores received by various students in three different classes:

Suppose that we would like to calculate the mean exam score for each class.

To do so, click the Analyze tab, then click Compare Means and Proportions, then click Means:

In the new window that appears, drag the Exam_Score variable into the Dependent List panel and drag the Class variable into the panel directly below it:

Then click OK.

The following output will be generated:

SPSS calculate mean by group

The first table titled Case Processing Summary displays the total number of cases (or “observations”) used in the analysis.

We can see that a total of N = 15 cases were used.

The next table titled Report displays the mean exam score for each class.

  • The mean exam score for students in class A was 93.60.
  • The mean exam score for students in class B was 92.60.
  • The mean exam score for students in class C was 82.80.

We can also see that the overall mean for all 15 students was 89.67.

The table also displays the total number of observations in each class along with the standard deviation of exam scores for each class.

Additional Resources

The following tutorials explain how to perform other common tasks in SPSS:

How to Calculate the Median in SPSS

x