How to Insert Subtotals in Excel

In this lesson, you will learn how to use Subtotals in Excel. It will help you dealing with data in Excel and creating reports.

What are subtotals?

Subtotals are summary statistics that are calculated for each group of data. For example, you could create subtotals for each product category in a sales report. The subtotals would show the total sales for each product category.

Example report

Subtotals allow you to create summaries of the groups list. You can do many various calculations based on subtotals. See at the table below. That’s an example report.

Subtotals Table

How to insert Subtotals?

Make sure your data is sorted in the way you want the subtotals to be calculated. If necessary, sort the data by one or more columns to group the data that you want to subtotal.

Subtotals Sorting

Next go to the Ribbon to the Data tab. Click Subtotals button.

Subtotals Ribbon

Dialog box appears.

Subtotals Dialog Box

You can choose here:

  • For what you want to subtotal
  • Which function (eg. Sum, Max, Min, Average, …)
  • What you want to subtotal as a result

Excel creates an outline that you can expand with the buttons or plus and minus buttons on the left side of the page.

Subtotals Example

Level 1

Grand count for data across the table

Subtotals Level one

Level 2

Count of rows for each category

Subtotals Level two

Level 3

Displays the entire table with subtotals below each category

Subtotals Level three

To restore the appearance of the table, click Remove All.

Subtotals Remove

If you need to revert to the original table appearance, Excel offers the “Remove All” option to eliminate the outlined subtotals and restore the original presentation.