Working with time in Excel can be a problem. Have you ever calculated how long a person was at work and then wanted to multiply that time by an hourly wage? It isn't difficult to fail miserably! But if you know the trick, excel time formulas are easy.
Before diving into formulas, it helps to understand how Excel thinks about time. Excel represents every date as a whole number called a serial number and every time as a decimal fraction of a 24-hour day. One hour equals one/24, or approximately 0.041667.
For example, 6:00 AM is stored as 0.25 because it falls one quarter of the way through a day. Noon is 0.5, and 6:00 PM is 0.75. When you enter a time like 9:00 AM into a cell, Excel displays it in a familiar format but stores it internally as 0.375.
This is why raw math on time values can produce confusing decimals. If you subtract 8:00 AM from 5:00 PM, Excel returns 0.375, not 9. Understanding this excel time format behavior is the foundation for every time formula in Excel you'll use below.
The following excel time functions are the most useful tools for working with time values. You don't need all of them for every task, but knowing what's available helps you pick the right approach.
| Function | Syntax | Description |
|---|---|---|
| TIME() | =TIME(hour, minute, second) | Creates a time value from separate hour, minute and second arguments |
| TIMEVALUE() | =TIMEVALUE("time_text") | Converts a text string representing a time into a numeric time value |
| HOUR() | =HOUR(serial_number) | Returns the hour component (0-23) from a time value |
| MINUTE() | =MINUTE(serial_number) | Returns the minute component (0-59) from a time value |
| SECOND() | =SECOND(serial_number) | Returns the second component (0-59) from a time value |
| TEXT() | =TEXT(value, "format_code") | Formats a numeric value as text using a specified time format code |
| NOW() | =NOW() | Returns the current date and time as a serial number |
With this toolkit in mind, let's walk through a practical payroll scenario step by step.
First, start with formatting.
Columns E and F should be formatted to Currency or Accounting, your choice.
Now that your formatting is set, let's get into Excel time formula logic.
In Column C, enter the formula =B2-A2 to calculate the number of hours worked, as shown below.
Column D, as mentioned, is formatted to a number with two decimals. It contains the formula =C2*24. This formula is essential because of how Excel stores time internally. Excel stores time values as decimal fractions of a 24-hour day. One hour equals one/24th of a day. Thus, to get a whole number you can use in calculation, you must multiply the value in column C by 24. Think of it like this. With a time like 7:30, C2 would equal 7.50, which is the number equivalent to seven hours and thirty minutes. See Illustration 2.
What if your employees have a lunch hour? You can set up your time formula to subtract one hour. See Illustration 3.
Now that your formatting and time formulas are properly considered and applied, you can multiply Column D by Column E to reach the final paycheck total. If your workbook also requires budgeting or forecasting calculations, Excel finance formulas can extend these same skills.
Even with the right formulas in place, a few common issues can trip you up. Here are the errors you're most likely to encounter and how to fix them:
If you're summing hours across a full work week, you'll likely exceed 24 hours. By default, Excel's time format resets at 24, so a total of 41 hours and 30 minutes would display as 17:30 instead of 41:30.
To display cumulative hours correctly, apply a custom number format:
The square brackets around the h tell Excel to display the total accumulated hours without resetting at 24. Your 41:30 total will now display correctly. This same technique works with [m]:ss if you need to display total minutes or [s] for total seconds.
Mastering excel time formulas saves hours of frustration when you're handling payroll, scheduling or any task that involves tracking durations. You now know how to set up proper formatting, calculate hours worked, convert time to decimal values, deduct breaks and multiply hours by an hourly rate. You also have the tools to troubleshoot the most common errors, handle totals that exceed 24 hours and create a date or time chart to visualize your scheduling data.
These techniques are just the beginning of what Excel can do for your productivity. Pryor Learning offers hands-on Excel training courses that cover formulas, data analysis, pivot tables and more. With PryorPlus, you get unlimited access to Excel courses at every level so you can keep building your skills at your own pace.