How to Calculate Lag Time in Excel (2 Methods)

What Is Lag Time?

Lag Time or Time Lag is a delay between two successive tasks, whereas the later task should start as soon as the earlier task ends. Suppose a project consists of 5 successive tasks. Each task should start as soon as the previous task ends. But each new task started after a delay due to mechanical failures and other difficulties. This delay itself is the time lag. You can sum up all the delays to get the total time lag. It will be equal to the difference between the projected deadline and the actual deadline of the project.


Method 1 – Calculate the Lag Time Between Consecutive Tasks

Scenario: Suppose you have a dataset with the start and end times of tasks within a project. There’s a delay between the start of each task and the end of the previous task.

Objective: Calculate the lag time between consecutive tasks.

dataset 1

Formula:

  • In cell E6, enter the following formula:
=C6-D5

formula for lag time between consecutive tasks

Here,

    • C6 represents the start time of task 2.
    • D5 represents the end time of task 1.
  • Drag the Fill Handle icon down to apply the formula to the entire range (E6:E13).

Formatting:

  • Select the range E6:E13.
  • Go to Home, select Format and click on Format Cells (or use the CTRL+1 shortcut).
  • Choose the 37:30:55 format in the Time category from the Number tab and click OK.

format cells

  • You’ll now have the lag time between tasks.

formatted lag time

Read More: How to Calculate Lead Time in Excel


Method 2 – Calculate the Lag Time Between Shipment and End-Customer Sale

Scenario: Suppose you want to calculate the time lag between shipment and end-customer sales for your company’s products.

dataset 2

Formula:

  • In cell E5, enter the DATEDIF function:
=DATEDIF(C5,D5,"D")
    • This will give you the lag time in days.
  • Drag the Fill Handle icon down.

 

calculate lag time using DATEDIF function


Things to Remember

  • Always subtract the earlier date from the later date to avoid negative results.
  • The DATEDIF function isn’t explicitly listed in Excel, but you can still use it (with some limitations).

Download Practice Workbook

You can download the practice workbook from here:


Related Articles


<< Go Back to Calculate Time | Date-Time in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Md. Shamim Reza
Md. Shamim Reza

Md. Shamim Reza, a marine engineer with expertise in Excel and a fervent interest in VBA programming, sees programming as a time-saving tool for data manipulation, file handling, and internet interaction. His diverse skill set encompasses Rhino3D, Maxsurf C++, AutoCAD, Deep Neural Networks, and Machine Learning. He holds a B.Sc in Naval Architecture & Marine Engineering from BUET and has transitioned into a content developer role, generating technical content focused on Excel and VBA. Beyond his professional pursuits,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo