13.6 C
London
Friday, June 6, 2025
HomeExcelDescriptive Statistics in ExcelHow to Calculate a Cumulative Sum by Date in Excel

How to Calculate a Cumulative Sum by Date in Excel

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

This tutorial explains how to calculate a cumulative sum grouped by date in Excel.

Step 1: Create the Data

First, let’s create a dataset that shows the total sales of some store by date:

Step 2: Calculate Overall Cumulative Sum

Next, we can create a column that displays the overall cumulative sum of sales.

First, type =B2 in cell C2.

Then, type the following formula in cell C3: 

=SUM($B$2:B3)

Then drag this formula down to every remaining cell in column C:

Step 3: Calculate Cumulative Sum by Date

Next, we can create a column that displays the cumulative sum of sales by date.

First, type =B2 in cell D2.

Then, type the following formula in cell D3: 

=IF(A3=A2, B3+D2, B3)

Then drag this formula down to every remaining cell in column D:

The result is a column that displays the cumulative sales grouped by each date.

For example:

  • The cumulative sales for 1/1/2022 is: 5, 8, 15, 27
  • The cumulative sales for 1/2/2022 is: 7, 12, 2
  • The cumulative sales for 1/3/2022 is: 15
  • The cumulative sales for 1/4/2022 is: 3, 10, 19, 29

Notice that the values in the cumulative sum column restart for each new date.

Additional Resources

The following tutorials explain how to perform other common operations in Excel:

How to Calculate the Sum by Group in Excel
How to Calculate Relative Frequency in Excel
How to Calculate Cumulative Frequency in Excel

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories