How to calculate elapsed time/days/months/years between two datetimes in Excel?
Here you have two time lists, one list is the start time, the other is the end time, can you calculate the elapsed time between two times in the same row quickly as below screenshot shown? Here, this tutorial introduces the tricks on calculating elapsed time, days, months, or years between two datetimes in Excel.
|Here you have a list of birthday for instance, and have you ever tried to calculate the age today based on thses birthday? Kutools for Excel's Calculate age based on birthday can do you a nice favor. Note: The date of "Today" in below example is 1/10/2016|
Excel Productivity Tools
Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial
Kutools for Excel: Save 70% of your time and solve 80% Excel problems for you. 300+ advanced features designed for 1500+ work scenario, make Excel much easy and increase productivity immediately. 60-day Unlimited Free Trial
Calculate elapsed time
1. Select a blank cell, enter this formula =IF(B2< A2, 1 + B2 - A2, B2- A2), A2 is start time, B2 is End time, and press Enter key then drag auto fill handle to fill formulas to the cells you want.
2. Keep formula cells selected, right click to open context menu, and choose Format Cells, and in the Format Cells dialog, under Number tab, select Time from left pane, then to choose the time type you want to display in right section. See screenshot:
3. Click OK. The elapsed times have been displayed.
Calculate elapsed days/month/years
To calculate elapsed days is so easy, you just need to apply this formula = B2-A2, A2 is the start date, B2 is the end date.
Tip: To calculate elapsed month, you can use this formula =DATEDIF(A2,B2,"m"), A2 is the start date, B2 is the end date. For elapsed years, apply =DATEDIF(A2,B2,"m")/12, and then format the cells as number.
Calculate elapsed year, month and days
|Kutools for Excel, with more than 120 handy Excel functions, enhance your working efficiency and save your working time.|
For example, you have two dates, and you want to know the exact difference between these two dates, and display the elapsed period as x Years, x Month, x Days (such as 2 Years, 6 Months, 19 Days), you can apply below formula.
Select a blank cell which will place the calculated result, enter this formula =DATEDIF(A2,B2,"Y") & " Years, " & DATEDIF(A2,B2,"YM") & " Months, " & DATEDIF(A2,B2,"MD") & " Days", press Enter key to get the result.
|To quickly add a specific number of days to a given date, Kutools for Excel's Add Years/Months/Days to Date utilities can give you a favor.|