  Get instant live expert help with Excel or Google Sheets “My Excelchat expert helped me in less than 20 minutes, saving me what would have been 5 hours of work!”

#### Post your problem and you’ll get expert help in seconds.

Your message must be at least 40 characters
Our professional experts are available now. Your privacy is guaranteed.

# Calculate number of hours between two times

Most of the time we want to manage our free time. Excel allows us to calculate number of hours between two times, a concept that is needed when we want to plan our time well. This post will provide you with a guide on how to calculate number of hours between two times. Figure 1: How to find number of hours between two times

## General syntax of the formula

`=end - start`

## Understanding the formula

It is easy to get the duration between two times using excel. All we need to know is the start and end times. Once we have these two, we can proceed as follows to get the time difference between the two times;

• Specify the start and end times
• Subtract start time from end time.

When start time and end time are in same day, then it becomes easy and straightforward to calculate the time difference.

For instance, if our start time is 11:00 AM and end time is 3:00 PM, we can simply subtract start time from end time as shown below;

`=3:00 PM-11:00 AM`

`=0.166667 hours`

## But what if time crosses a day?

Note that excel treats one day as 1 representing 24 hours. This is why we have the value column in the above example, which represents the fractional values of 1.

Take an example where the start time value is larger than the end time value, o simply put, the end time is the next day after the start time. If we use our formula above, we shall get a negative value, which will be displayed as a string of harsh characters, #####

But we can modify our formula to accommodate the time difference when time crosses a day boundary. The modified formula will look as the one below;

`=1- start + end`

This can be seen in figure 2 row 8 below; Figure 2: Example of how to find number of hours between two times

## The MOD function alternative

In figure 2 above, you must have noticed the MOD column. The MOD function is fundamental in this process as well. It helps us simplify the formula as shown below;

`=MOD (end – start,1)`

The MOD function removes the negative problem by simply flipping values to the required positive values. When using this, you don’t have to put much emphasis on the conditional IF function.

## Instant Connection to an Expert through our Excelchat Service

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

### Did this post not answer your question? Get a solution from connecting with the expert. Another blog reader asked this question today on Excelchat:
Solution examples hello i need help creating a formula, if a value does not exsits put 0, if a value exist do nothing
Solved by M. F. in 9 mins Compute the weighted average of students score from a spreadsheet using different weight for each category of marks
Solved by G. E. in 20 mins hi there, im making a spread sheet to track progress in a game and would like to create a drop log sheet, i was hoping to use the if function to detect weather a item is logged on a sheet then send the sheet number to a list if so
Solved by K. F. in 60 mins I have a schedule I'm doing with formulas to add workdays (across rows) to a start date column. I would like to write the equation like this: =ifError((workday(b2,1) = cell above, [value of cell above + 1] Help me form this correctly to get the (value of target cell) = (1 more than the value from the cell above) IF the target cell value started equal to the cell above.
Solved by M. J. in 20 mins I need a formula that will subtract the sum of one cell if the sum of another cell is greater than zero, and have it applied to cells across a document that is 30,000 entries and only in certain spots
Solved by F. J. in 20 mins ## Subscribe to Excelchat.co Another blog reader asked this question today on Excelchat: