Professional Documents
Culture Documents
org/wp/elapsed-time-excel/
Share
" ! Facebook " Twitter # LinkedIn
Chandoo
1 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
formula =(NOW()-A1)/7
To calculate elapsed time in days, the formula is simple =TODAY()-A1. [Help on TODAY formula]
The result includes fractions as well. You can use number formatting to remove the values after
decimal point.
2 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
But if your working week is not from Monday to Friday, you can try the NETWORKINGDAYS() UDF
Excel School made me great at ⋆!
! ⋆!⋆!
⋆
in the same way.
work. ⋆
!
– Brenda
To calculate elapsed time in hours, we can use the formula =(NOW()-A1)*24
formula =(NOW()-A1)*24*3600
Click here to download the elapsed time worksheet and play with the examples.
More:
Tips on using date & time in excel, List of excel date & time formulas, More excel quick
tips
3 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
Power BI
! 41 Comments
# Ask a question or say something...
! Tagged under date and time, downloads, Excel Howtos, Learn Excel, Microsoft Excel Formulas,
networkdays(), networkingdays(), now(), quick tip, spreadsheets, today(), tutorials
4 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
5 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
6 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
Advanced Data Viz with Excel – Live What is XLOOKUP? 13 formula examples
Event on 26 March to really understand it
7 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
8 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
2.
5 Simple & Useful Conditional Image Lookup – How-to show dynamic
Formatting Tricks picture in a cell [Excel Trick]
Reply
3. L. Quezada says:
September 22, 2009 at 5:31 pm
Oliver:
Reply
4. Andy says:
September 22, 2009 at 7:31 pm
Great post! This a fantastic tutorial on calculating elapsed time in Excel that could be helpful even
to a novice user. Keep up the useful tips!
Also, the Office community on Facebook could really benefit from you knowledge! Check it out at
http://www.facebook.com/office
Cheers,
Andy
MSFT Office Outreach Team
9 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
We can also use mean duration for years (orbital period of the Earth around the Sun : i-e tropical
year) which is : 365.25 days
and mean duration for month : 365.25/12 days
be Excelent !!!!
Reply
6. Chandoo says:
September 23, 2009 at 8:57 am
@Oliver... Thanks for the pointer to datediff(). I will update the post with information about this
as well.
@Andy... Welcome. Thanks for telling us about the office community on FB.
@Modeste ... that is very cool. I will remember these formatting codes for an upcoming article on
number formatting codes
Reply
7. Tony says:
September 23, 2009 at 12:35 pm
Great tip Chandoo! I use the formula to calculate years elapsed all the time. It can seriously help
save a ton of time with calculations. Also, NETWORKDAYS is one that helps and can seriously
impress a boss. Keep up the great work here!
Reply
8. Andy says:
September 24, 2009 at 10:01 pm
10 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
Hi,
always great posts and a good way to start my day
but regarding the elapsed time calculations: have you never noticed that there is a result
difference between using =TODAY()-A1 and using =NETWORKDAYS(A1,TODAY())?
try it for A1= a Monday such as 21sep09 and "today" is e.g. a Thursday; you get 3 or 4
respectively as a result, depending on the formula used; this is because formula =networkdays()
always includes both the startdate and the end date and not only the time between these 2.
This is easily corrected/compensated bij always adding a -1 to the =networkdays() formula
because the majority of us will count startday as day 0 and then the result will be consistent
across the different formulas.
However, you then get into trouble if you calculate the networkdays for a date further in the past
and where either the start or end date falls in a weekend.
just thought to point this out as to me these formula's are not interchangeable just like that!
Reply
=DATEDIF([DOJ],TODAY(),"Y") & " Y, " & DATEDIF([DOJ],TODAY(),"YM") & " M, " &
DATEDIF([DOJ],TODAY(),"MD") & " D"
Reply
I calculated the time diff between two date+ times by subtracting 2 cells & custom formatted it
to "d hh:mm" format.
11 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
Hui... says:
January 18, 2012 at 3:45 am
@Amol
Try the Custom Format code:
[<1] hh:mm ; [>=1] d “d” hh:mm
Reply
Hi Chandoo,
Reply
To calculate the elapsed time in months, we can use the formula =(NOW()-A1)/30. This returns
the value in 30 day months.
Regards,
12 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
Reply
Hui says:
April 15, 2012 at 1:24 am
@Pete
I use Excel 2010 and it still works
The times must be entered as times in the format hh:mm:ss or hh:mm without seconds
Adding up times is as simple as =Sum(Range) or =Sum(A2:A10)
then using a Custom Number format as you have mentioned [h]:mm
Reply
My hospital tracks times from patient arrival to various procedures or treatments. When those
times cross over midnight, the regular formulas (2nd time minus first time) don’t work because
the result is negative and Excel (2007) won’t show a negative number in time format.
I couldn’t find a solution here (chandoo.org) but found one elsewhere that worked and it’s very
simple. I would like to share it.
Assuming 1st time in A1 (column for patient arrival time) (11:00 PM), and 2nd time in B1
(column for x-ray given) (12:30 AM)). Should be 1:30 elapsed time.
=B1-A1+(B1<A1) [This comparison is the key to the solution.]
=12:30 AM – 11:00 PM + (12:30 AM < 11:00 PM)
=0.0208 – 0.9583 + (True)
=-0.9375 + (1) [This is the key! If it is false, Excel adds 0. If it’s true, Excel adds 1 and that is
what corrects the negative number. Now Excel can interpret the number as a time.]
=0.0625
Converted to hh:mm = 1:30
I wrapped this formula inside an IFERROR one to alert my data entry person if she messed up
13 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
Reply
HI,
I am working on a Xl application..
I want to capture time between two clicks.
Ex, in my application during run somewhere I press OK button and then I click Cancel.. I want to
measure time between these two clicks... Is it possible??
Pls help on this...
Reply
Hui says:
December 10, 2012 at 1:31 am
@shashidhar
The answer is Yes
You will have to add an appropriate VBA event to start and stop a timer.
There are techniques which can time to the millisecond so maybe look those up on the net
Reply
WOW!!!!!! I truly love your excel time format program! WHOOOO! I am very interested in how
the time formats "update" (manually on a physical keyboard) that "updates" the time into its
respective decimal time formats, such as:
YYYY.yyyy, HH.hhh, etc...
How do those formulas or equations work if not in Excel mode? Example: TI calculators, Word, or
14 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
Reply
I need the ability to calculate how much progress we have made between two dates and I want
to represent that as a percentage.
I am thinking this would be a combination of today, networkdays & dividing the days elapsed vs
the total days. Then it should be as easy as formatting my cell. Any help would be greatly
appreciated.
Reply
Hui... says:
January 25, 2015 at 8:12 am
@Christian
Your correct
dates are just numbers and so you can use simple math to derive the percentage
=(Date Now-Start Date)/(End date-Start date)
that will give you a number between 0 and 1
which you can format as a %'age
15 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
I want to calculate the timelapse taking into consideration the day begin and dayend time.
If the work begins and ends the same day, a simple formula b1-a1 would compute the
productivity.
But if the process remains incomplete and is carried over to the next day, then timelines to be
computed accordingly
to clarify,
if start time of an activity is 03/15/2015 18:00 hrs and end time is 03/16/2015 11:00 hrs, then
the resultant formula should be 5 hrs (ie 18:00 to 20:00 hrs on day1 + 08:00 to 11:00 hrs on
day2) ie 2+3
please guide.
Reply
This will subtract the fixed amount of time between shifts, 12 hours. If the time between
shifts varies, then you could reference other cells that contain the variables.
Reply
Please help. when I use the networking days formula I get a date (2-may-00) I want actual
number of days. I managing projects and I need to know how many days have passed since we
received a project to the current date. Please help Thanks
Reply
Chandoo says:
16 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
Reply
Hi folks ...
calculating age in years , months and days
=text(now()-a1,"yy")&" y " &text(now()-a1,"mm")-1 &" m "&text(now()-a1,"dd") & " d"
Reply
Hi, the Elapsed time in days [ =TODAY()-A1 ] works great however, if I do not have a date in A1,
it shows 42157. Anyway to get it to display 0 or a Null value?
Reply
Hui... says:
June 3, 2015 at 1:11 am
@Dan
=If(A1="",0,TODAY()-A1)
Reply
Dan S says:
June 8, 2015 at 5:45 pm
Reply
17 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
Thanks!
Reply
Hi, i have a certain name (wilium) in column A and against this name i have 2 option, 1 Done
and 2 Inprogress. i want that i count done again wilium and count inprogress against wilium
separately. which formula will work for it??
Reply
Hi, i have a certain name (wilium) in column A and against this name i have 2 option, 1 Done
and 2 Inprogress in column C. i want that i count done again wilium and count inprogress against
wilium separately. which formula will work for it??
Reply
18 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
Reply
Hi Chandoo,
I am looking for help with the elapse time formula. I have a recruitment tracking sheet where we
track the number of days the positions are opened, and when they are finally closed.
The opened positions will have a running turnaround time (TAT) formula and I am using this
formula:
=NETWORKDAYS (start_date, TODAY (), Holidays2018)
Now, without disrupting the running TAT formula, how do I then get the TAT to stop when we
have a final end date? All the information below is row:
- start_date --> Cell A
- TODAY () --> cell B
- end_date --> Cell C
Reply
Chandoo says:
July 29, 2018 at 10:08 pm
Reply
19 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
20 of 21 23/3/21, 12:40 am
How to Calculate Elapsed Time using Excel Formulas? https://chandoo.org/wp/elapsed-time-excel/
Yes, sign me up $
Free Crash Course 50 ways to analyze data Forum & Community Ebooks & More
Pivot Tables
Power BI
" $ % &
© All rights reserved.
21 of 21 23/3/21, 12:40 am