Excel Formula To Calculate Hours Worked and Overtime (With Template)
Excel Formula To Calculate Hours Worked and Overtime (With Template)
It is easy to build an Excel formula to calculate hours worked and overtime of your employees. This is
why Excel is widely used in the workplaces. It makes any calculation very easy.
The Excel template I have made for this article can be directly used in your workplace.
Most companies calculate work hours and over time based on the 40-hours-work-week (8 hours per day).
By default, my Excel template also calculate work hours and overtime based on the 40-hours-work-week.
But if your company takes different hours-work-week, you can define that in the template.
In this Excel template, over time is calculated based on the whole week, not based on an individual day.
Suppose, an employee has worked 9 hours on the very first day of the week. But his total hours in the
week does not exceed 40 hours, he will not be rewarded any over time.
You can also define different hourly rates for Regular Works and Over Time Works.
Download the Excel template that I have built for this article.
Excel-formula-to-calculate-hours-worked-and-overtime.xlsx
This is the template overview. This template is printable in one page (perfect for Letter and A4 Page with
Landscape Orientation) without any modification.
Hourly Rate:
Normally Working Hour Rate is different from the Over Time Hourly Rate.
Time In: This is the time when the employee enters into the working place.
Lunch Starts: Time when the lunch starts in the working place.
Lunch Ends: Lunch end time entry.
Time Out: This is when the employee completely leaves the office place.
1) Total Hours:
This “Total Hours” is calculated for an individual day. We have used this formula in the cell G16 to get
the total hours: =((F16-C16)-(E16-D16))*24
(F16-C16) is actually (Time Out – Time In). And (E16-D16) is (Lunch Ends – Lunch Starts).
We multiplied ((Time Out – Time In) – (Lunch Ends – Lunch Starts)) by 24 to covert it into hour
value.
This is why we get the value in Number Otherwise, subtraction of two times results in Time format.
2) Over Time Hours
Though the template shows the Regular Hours before the Over Time Hours, I actually calculated the
Over Time Hours before the Regular Hours. This is the formula I have used in the cell I16 to calculate
the Over Time Hours:
=IF(SUM($G$16:G16)>work_hours_per_week,SUM($G$16:G16)-work_hours_per_week,0)
This formula has an expanding range. It is $G$16:G16. For the next cell (I17) in the column, this range
will be: $G$16:G17. You see the range has expanded. This is why it is called expanding range.
logical_test: IF function checks whether the sum of the expanding range has exceeded the value of
work_hours_per_week.
value_if_true: If the sum exceeds the value, the IF function returns this value: SUM($G$16:G16)-
work_hours_per_week.
value_if_false: Otherwise the IF function returns value 0.
3) Regular Hours
To calculate Regular Hours, I have used this formula in the cell H16: =MAX(G16-I16,0)
This formula returns the maximum one between these two values: G16-I16 and 0.
Related Readings
Conclusion
Whatever hourly rate your company provides and whatever working hours per week your company has
adopted, this template will suit your company. Even if you did understand how the formulas work, you can
modify and extend this template for fulfilling your specific criteria. So, these are the Excel formulas I use
to calculate hours worked and overtime in a week.
115
SHARES
Facebook Twitter
Kawser
Hello! Welcome to my Excel blog! It took me some time to be a fan of Excel. But now I am a die-
hard fan of MS Excel. I learn new ways of doing things with Excel and share here. Not only how to
guide on Excel, but you will get also topics on Finance, Statistics, Data Analysis, and BI. Stay
tuned!
RELATED ARTICLES
Excel Formula to Add Percentage How to nd the 5 most frequent How to nd text in an Excel range
Markup [with Calculator] numbers in Excel (3 Formulas) and return cell reference (3
ways)
How to reference cell in another How to calculate weighted Percentage Difference Between
Excel sheet based on cell value! average in Excel with Two Numbers in Excel (Using
percentages (2 ways) Formula)
5 Comments
R.K.GHOSH Reply
January 19, 2019 at 6:53 AM
Thanks, Ghosh for your feedback.
What if your company rounds the time? For example: When I clock in at 06:07 it calculates my time starting at
06:00 but if I were to clock in at 06:08, my start time is calculated at 06:15. By the way, Your emails are great. I
highly enjoy them.
KAWSER Reply
January 22, 2019 at 3:58 PM
I will check this issue and let you know. Glad to know that we can add some value via our emails.
Best regards
Kawser
JIM Reply
April 11, 2019 at 10:23 PM
These formulas work pretty good if you work the 1st or 2nd shift. I work from 11:00pm – 7:30am with a 1/2 lunch
period. When I enter these times, the formulas do not work. Any way to update this to work with these start and
stop times?
LEAVE A REPLY
Latest Posts
ExcelDemy is a place where you can learn Excel, Data Categories Select Category
Analysis, and other Office related programs. We provide tips,
how to guide and also provide Excel solutions to your business
problems. Search in ExcelDemy.com
Search