How can I plot histograms by group using SPSS?

To plot histograms by group using SPSS, you can follow these steps:
1. Import your data into SPSS and open the “Graphs” menu.
2. Select “Histogram” and then choose the variable you want to plot.
3. Click on the “Grouped” option and select the variable that defines your groups.
4. You can customize your histogram by changing the bin size, labels, and colors.
5. Click “OK” and SPSS will generate a histogram for each group, displaying the distribution of your variable within each group. You can also use the “Split File” function to create separate histograms for each group.


Often you may want to create histograms by group in SPSS, such as the following:

SPSS histogram by group

Fortunately this is easy to do by using the Groups/Point ID feature within the Chart Builder.

The following example shows how to use this feature in practice.

Example: How to Create Histograms by Group in SPSS

Suppose we have the following dataset in SPSS that contains information about the prep exam method used by students along with the score they received on the final exam:

Suppose that we would like to create histograms to visualize the distribution of exam scores for both groups of students.

To do so, click the Graphs tab, then click Chart Builder.

In the new window that appears, choose Histogram as the chart type, then drag it into the Chart preview area.

Then drag the Score variable to the x-axis:

Next, click the Groups/Point ID tab, then check the box next to Columns panel variable.

Then drag the Method variable to the Panel label in the Chart preview area:

Once you click OK, the following histograms will be created:

SPSS histogram by group

The histogram on the right shows the distribution of exam scores for students who used Method Two to prepare for the exam.

By viewing these histograms side by side, we’re able to see that the scores tend to be higher among students who used Method Two to prepare for the exam.

Note: In this example we created histograms for two groups, but you can use the exact same method to create histograms grouped by a variable that has more than two groups.

Additional Resources

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

x