How to Calculate Elapsed Time in Excel (5 Ways)

Get FREE Advanced Excel Exercises with Solutions!

In this article, we’ll discuss different methods to calculate elapsed time in Excel. In our daily calculations, finding out the time interval between two dates is a common scenario. To calculate the elapsed time, we can use functions, conditions, and even custom formatting in Excel. Let’s follow the complete guide to learn all of this.


How to Calculate Elapsed Time in Excel: 5 Easy Ways

1. Calculate Elapsed Time in Excel by Subtracting Two Date Values

To find the elapsed time in Excel, we just need to subtract two cells that contain the start and end date. In this example, we’re going to calculate the elapsed time of World War 2. Here, cells B3 and C3 contain the starting and ending date of the war with time. In cell C5, we subtracted cell B3 from cell C3.

Calculate Elapsed Time in Excel The subtraction returned a number that is not meaningful. Actually, it represents the difference in serial numbers of these two dates. As we know, Excel stores date as a serial number that starts from 1 at the date 1/1/1900. So, this output number means there was a total of 2077.43 days elapsed in WW2.

Now, we can calculate, Years by dividing the number of days(output) by 365,
Months by dividing the number of days (output) by 30,
Weeks by dividing the number of days (output) by 7,
Hours by multiplying the number of days (output) with 24
Minutes by multiplying the number of days (output) with 24*60,
Seconds by multiplying the number of days (output) with 24*60*60. 

Calculate Elapsed Time in Excel

Read More: How to Calculate the Duration of Time in Excel


2. Estimating Elapsed Time in Excel Using the TODAY, NOW, NETWORKDAYS Functions

Using Excel’s built-in functions like the NOW, TODAY, NETWORKDAYS, etc. we can easily compute elapsed time in Excel. To illustrate this, we’re going to calculate how many years, months, days, hours, minutes, and seconds are left to start the next Summer Olympics 2024.

2.1 Use of the TODAY Function

The TODAY function in Excel returns the current date displayed on the worksheet. Here in cell C3, we stored the starting date of the Summer Olympics 2024. In cell C4, we used the following formula to find the number of days left to start Olympic 2024 from today’s date.

=(C3-TODAY())


We calculated the number of months and weeks by dividing the days’ number by 30 and 7 respectively in cells C5 and C6. To find out the no of years left, we used the YEAR function in cell D6. The formula is:

=(YEAR(C3)-YEAR(TODAY()))

Calculate Elapsed Time in Excel

Read More: How to Calculate Slack Time in Excel


2.2 Use of the NOW Function

The NOW function returns the current date and time displayed in the Excel worksheet. In this example, we used this function to calculate hours, minutes, and seconds left to begin the Summer Olympics 2024.

Calculate Elapsed Time in Excel


2.3 Use of the NETWOKDAYS Function

The NETWORKDAYS function calculates the number of working days of a given time interval assuming 5 working days in a week starting on Monday.

Calculate Elapsed Time in Excel


3. Compute Elapsed Time Using the TEXT Function in Excel

The TEXT function in Excel converts a numeric value to text and displays it in a specific predefined format. The function takes two arguments: value and format_text.

In this example, we put the difference between the ending and starting dates of WW2 as the value argument and different formats to display the duration of the war in years, months, days, hours, minutes, and seconds. Here, cells C5 and B5 contain the ending and starting dates respectively.

Calculate Elapsed Time in Excel


4. Use of Custom Formatting to Calculate Elapsed Time in Excel

Excel also gives us the option to use different number formats to control how to display a value in a cell. Let’s follow the example to grab the idea.

In cell C7, we calculated the difference between two dates in cells C5 and B5, which are the ending and starting dates of WW2. The output is the serial number difference of the input dates.

Calculate Elapsed Time in Excel

To show the year difference of these two dates, follow the steps below:

Steps:

  • Select cell C7 and press Ctrl + 1 to open the Format Cells
  • Go to the Number
  • Select the Custom
  • Type yy in the input box.
  • Hit OK.

  • The output is the number of years elapsed in World War 2.

Calculate Elapsed Time in Excel

Similarly, we can calculate the other values using the different format codes shown in the below screenshot.

Read More: How to Calculate Cycle Time in Excel


5. Handle Negative Values in Elapsed Time

If the end time is less than the start time, we cannot subtract normally to get the time difference. To handle this negative time, we can follow two ways.

Calculate Elapsed Time in Excel

5.1 Use of Conditional IF Statement

Apply the following formula in cell D4, where C4 contains the end time and B4 contains the start time.

=IF(C4<B4,1+C4-B4,C4-B4)

Calculate Elapsed Time in Excel

In this formula, we used the conditional IF statement to set the logic of whether the end time is less than the start time. If the logic returns TRUE, then it’ll add 1 with the time difference of two times assuming the clock running for a full 24-hour period.


5.2 Use of the MOD Function

The use of the MOD function can easily handle the above situation. The function changes the negative number to a positive one as it works for both the time in the same day and the time that spans midnight. We just need to use 1 as the divisor (2nd argument).


Things to Remember

  • The NETWORKDAYS function excludes Saturday and Sunday from a week while calculating the workdays between two dates.
  • If we want to add a custom holiday list to calculate the working days between two dates, we need to use the INTL function.

Download Practice Workbook

Download this practice workbook to exercise while you are reading this article.


Conclusion

Now, we know how to calculate elapsed time in Excel using 8 easy examples. Hopefully, it would you to use these features more confidently. Any questions or suggestions don’t forget to put them in the comment box below.


Related Articles


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

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Al Arafat Siddique
Al Arafat Siddique

Al Arafat Siddique, BSc, Naval Architecture and Marine Engineering, Bangladesh University of Engineering and Technology, has worked on the ExcelDemy project for two years. He has written over 85+ articles for ExcelDemy. Currently, he is working as a software developer. He is leading a team of six members to develop Microsoft Office Add-ins, extending Office applications to interact with office documents. Other assigned projects to his team include creating AI-based products and online conversion tools using the latest... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo