Alfredo Montoya works the evening shift at Electronic Inference Corporation, which adds $1 of shift differential per hour to his base wage of $15 per hour. =ROUND((E7-D7)*96,0)/4 It totals adds up the time and converts it into a decimal of hours worked. Then from 5PM to quiting time, for another rate. A dynamic Excel template for calculating employee working hours and overtime. Calculate hours between two times after midnight with formula. Unfortunately, Excel does not like negative times, so you’ll need to introduce an error-trapping formula. However, if that's not the case, than simply do B1 - A1 When you are done, multiply my total by 24. You are telling excel to: … That’s the ‘shift differential’, the extra percentage added to the normal rate. Method 1: Enter a date and time The first method is to not only enter a start/finish time but a start/finish date and time. I need to be able to end up with two different calcutations for number of hours worked. First recorded activity by ExcelBanter: Jul 2008, First recorded activity by ExcelBanter: Nov 2014, This formula =IF(A1=0/24,IF(B1<=4/24,B1-A1,4/24-A1),IF(B1<=4/24,B1-0/24,4/24-0/24)). It the most part it work! In this wage system employees are given incentive for increased productivity. Let say the employee hourly rate is Php 57.00/hour and working from 10pm to 6am; To determine the employee Night Differential pay: Special Holiday Night Differential = (Hourly rate × 130% × 10% × 8 hours) Php 59.28 = (Php 57.00 × 1.3 × 0.10 × 8 hours) Special Holiday and at the same time Rest day Night Shift How can write a code to calculate amount of hours worked in each shift? Try this in C2: = (MAX (0, (TIME (8,0,0)-A2)*24))+ (MIN (4, (1-A2)*24))+ (MIN (0,- (TIME (8,0,0)-B2)*24))+ (IF (B2