Tracking hours worked is a crucial aspect of project management, payroll, and productivity analysis. While manual tracking can be time-consuming and error-prone, Excel offers a powerful solution with its formula capabilities. Let's explore how to calculate hours worked using Excel formulas.

Before we dive into the formulas, ensure your data is structured properly. You'll typically have columns for employee names, dates, start times, and end times. Here's a simple example:

Understanding the Basics
Excel's primary functions for calculating hours worked are TIME and DURATION. The TIME function converts a start time and an end time into a decimal representing hours, while DURATION converts that decimal into a more readable format (HH:MM).

Let's assume you have the following data in cells A1 to D5:
| Name | Date | Start Time | End Time |
|---|---|---|---|
| A | 2022-01-01 | 09:00 | 17:00 |
| B | 2022-01-01 | 09:30 | 18:00 |
| A | 2022-01-02 | 09:00 | 17:00 |
| B | 2022-01-02 | 09:30 | 18:00 |
| A | 2022-01-03 | 09:00 | 17:00 |

Calculating Hours with TIME Function
The TIME function takes three arguments: hour, minute, and second. To calculate hours worked, you'll use the following formula in cell E2 and drag it down:
=TIME(D2-H2,0,0)

This formula subtracts the start time from the end time, effectively giving you the hours worked in decimal format (e.g., 8.00 for a full day).
Formatting Hours with DURATION Function
While the TIME function gives you hours in decimal format, the DURATION function formats it as hours and minutes (HH:MM). Use this formula in cell F2 and drag it down:

=DURATION(E2)
Now, cell F2 will display "08:00" for a full day worked.




















Calculating Total Hours for an Employee
To calculate the total hours worked by an employee, use the SUMIF function. Assuming your data is in columns A to D and you want the total for employee "A", use this formula in cell G2:
=SUMIF(A$2:A$6, "A", E$2:E$6)
This formula adds up all the hours worked by employee "A".
Calculating Total Hours for All Employees
To calculate the total hours worked by all employees, use the SUM function in cell H2:
=SUM(E$2:E$6)
This formula adds up all the hours worked by all employees.
With these formulas, you can efficiently track and analyze hours worked in Excel. This data can then be used for payroll, project management, or productivity analysis. Regularly updating and reviewing these calculations can help ensure accuracy and identify any potential issues.
As your needs grow, consider exploring Excel's data validation, conditional formatting, and pivot table features to further enhance your time tracking capabilities.