Explanation

Excel times are stored as fractional parts of one day . For example, 12 hours is equal to 0.5, and 18 hours is equal to 0.75. This means if you try to multiply an Excel time by an hourly rate, you’ll get a total far less than expected.

The trick is to first convert the Excel time to a decimal time by multiplying by 24.

=(B5*24) // returns 1

Then you can multiply by the hourly rate:

=(B5*24)*C5
=1*C5
=1*10
=10

Note: technically, the parentheses in the formula above are not needed and added for clarity only.

Formatting time durations

By default, Excel may display time, even time that represents a duration, using AM/PM. For example, if you have a calculated time of 6 hours, Excel may display this as 6:00 AM. To remove the AM/PM, apply a custom number format like:

h:mm // display hours and minutes

In cases where calculated time exceeds 24 hours, you may want to use a custom format like:

 [h]:mm // display hours > 24

The square bracket syntax [h] tells Excel to display hour durations of greater than 24 hours. If you don’t use the brackets, Excel will simply “roll over” when the duration hits 24 hours (like a clock). This is the time format used in column B in the above example.

Explanation

Times in Excel are fractional values of the number 1 . So, 12 PM is 12/24 = .5, 6:00 AM is 6/24 = .25, and so on. So, to convert a time by a given number, you need to divide the number of hours by 24 to get required decimal value:

E5/24 // convert adjustment to Excel time

We add the result to the starting time:

C5+(E5/24)

To make sure we have a true time value, we need to ensure that we have only a decimal value. In other words, if we add 12 hours (.5) to 6 PM (.75) we’ll get 1.25, but we really only want .25.

To make sure we get just the decimal value, we use the MOD function with a divisor of 1, as a clever way to keep the formula simple.

MOD returns the remainder after division, so returns the decimal value in cases where the result is greater than 1 (i.e. greater than 24 hours).

Even better, if we end up with a negative fractional value, MOD returns the reciprocal. So, if we end up with -.25, MOD returns .75 (equivalent to 6 PM).

This is important, because Excel won’t display negative time values.

Datetimes

Some date values include both a date and time, and are sometimes called “datetimes”. These values include both a serial number to represent the date, plus a fractional value to represent time. The table below shows some examples:

DatetimeRaw value
3/6/18 6:00 AM43165.25
1-Jan-1999 21:0036161.875
4/1/2020 0:0043922
June 3, 1980 12:00 PM29375.5

When working with dates that include both a date and time (datetimes), you don’t need to use MOD, because there’s no need to do anything clever as times cross midnight. The operation becomes simple addition, because the date is included, and you can use a formula like this:

=datetime+(hours/24)

This will allow the date value change as needed (forwards or backwards) when time adjustments cross 12:00 AM.