Skip to main content

How to calculate hours worked and minus lunch time in Excel?

Author: Xiaoyang Last Modified: 2020-11-05

As a company employee, we need punch in and punch out every work day, counting the total worked time and minus the lunch time of a day can help to calculate salary according to the time. For example, I have the following daily attendance record which contains log in, log out and lunch start, lunch end times in a worksheet, now, I want to calculate the total hours worked but minus lunch time each day. To finish this job, I can introduce some formulas for you.

doc calculate worked hours 1

Calculate hours worked and minus lunch time with formulas


arrow blue right bubble Calculate hours worked and minus lunch time with formulas

The following formulas can help you to calculate worked time a day based on the time records.

1. Enter this formula: =SUM((C2-B2)+(E2-D2))*24 into a blank cell beside your time record cells, F2, for instance, see screenshot:

Note: In the above formula: C2 is the lunch start time, B2 is the log in time, E2 indicates the log out time and D2 is the lunch end time. You can change the references based on your need.

doc calculate worked hours 2

2. Then drag the fill handle down to the cells that you want to apply this formula, and all the total hours worked excluding the lunch time are calculated at once. See screenshot:

doc calculate worked hours 3

Tips: If there are log in, log out time record and fixed lunch time, (such as one hour and thirty minutes), you can apply this simple formula: =D2-B2-C2 to calculate the worked hours a day. See screenshot:

doc calculate worked hours 4

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions…
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (39)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I need to count the working time in excel when the finish time is on the next day. Starting time 21:00, finish time at 06:35 next morning.
Which formula can I use for this?
Thanks
This comment was minimized by the moderator on the site
hi, dont know if you'll be able to help me but for my payroll i pay employees by the hours of actual service not by the time they arrive/ leave. i have three categories 1 hr service, 1.5 hr service and 2 hr service. for each category i pay a different amount. i managed to put this data on excell but its counts how many times they completed each service. like 3x the 1 hr and 1x the 1.5 hr on one day or so on. but i also need it to calculate the total hrs they worked. currently it doesnt count the 0.5. any ideas? thanksss!!!
This comment was minimized by the moderator on the site
Hi,

How to Count (D71) CONDITIONALLY FORMATTED RED COLOR CELL only (D40:D70)?

Pls guide...

Thanks
This comment was minimized by the moderator on the site
A2 is my start time at 6pm and B2 is my endtime at 4:00 AM it gives me ###### and format gives me a negative number when its a 10 hour shift. How do I resolve this?
This comment was minimized by the moderator on the site
Hello, Wally,
To solve your problem, please apply the following formula:
=(B2-A2+(B2<A2))*24


Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
Hi there,
I have Cell G9 as Start Time (09:00:00) then F9 as Finish Time (18:00:00) and have a formula for working out the time worked (=IF(F9<E9,F9+1,F9)-E9) but would like to add a formula to calculate If time worked is more that 6 hours, to deduct 00:30:00 minutes for a break and calculate the new time.
Please advise what best formula to use for this?
This comment was minimized by the moderator on the site
Hello,
To solve your problem, please apply the below formula:

=B2-A2-TIME(0,INT((B2-A2)/TIME(6,0,0))*30,0)

B2 is the End time, and A2 is the Start time.
Please try, hope it can help you!
There are no comments posted here yet
Load More
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations