Calculate Time In and Time Out in Excel
\n\nThis calculator helps you determine total hours worked by subtracting the 'Time In' from 'Time Out'. It also provides the exact Excel formulas to use in your spreadsheets.
\n\nHow to Calculate Time In and Time Out in Excel
\nCalculating hours worked in Excel is straightforward, but you need to handle time formatting correctly, especially for overnight shifts. Here is a step-by-step guide.
\n\nStep 1: Enter Your Time Data
\nEnter your 'Time In' and 'Time Out' values in two separate cells. For example:
\n- \n
- Cell A1: 9:00 AM \n
- Cell B1: 5:30 PM \n
Make sure to include AM/PM if you are using 12-hour format, or use 24-hour format (e.g., 17:30).
\n\nStep 2: Format Your Cells Correctly
\nThis is the most crucial step. If you just subtract the times, Excel might give you a negative value or an incorrect time.
\n- \n
- Select the cells where you will display your results (e.g., C1). \n
- Right-click and select Format Cells. \n
- Go to the Number tab. \n
- Select Custom from the Category list. \n
- In the 'Type' field, enter: [h]:mm \n
The square brackets around 'h' tell Excel to display the total hours, even if it exceeds 24. Without the brackets, it will reset to 0 after 24 hours.
\n\nStep 3: Use the Correct Formula
\nUse the following formula in your result cell:
\n\nFor Same-Day Shifts:
\nIf the employee starts and finishes on the same day:
\n[code] =B1-A1 [/code]\n\n
For Overnight Shifts:
\nIf the employee starts one day and finishes the next (e.g., 10 PM to 6 AM):
\n[code] =(B1-A1+(B1\n Explanation:
\n\n
\n\n- \n
B1-A1calculates the basic difference.- \n
(B1checks if the time went past midnight. - If it did, it adds 1 (representing 24 hours) to the result.
\nExample Calculation
\nLet's say an employee works from 10:00 PM (22:00) to 6:00 AM (06:00).
\n\n