Excel timesheet formula with lunch break and overtime

This is not legal, tax, or wage advice. The clocks and the $20 rate are a sample for the week of Monday, November 16, 2026. They are not a pay quote.

This is the 46-hour week from How to calculate overtime pay in Excel, split into days. There the week is one number, 46, at $20, and the pay is $980. Here each day has a clock-in, a lunch, and a clock-out. The lunch is 30 minutes, from 12:00 to 12:30, and it is not paid.

Monday through Thursday: in at 8:00 AM, out at 5:30 PM. The morning is 4 hours and the afternoon is 5, so the paid day is 9 hours. Friday is the same lunch and a 6:30 PM clock-out, so the afternoon is 6 hours and the paid day is 10. Four days of 9 and one day of 10 are 46. Saturday and Sunday have no shift.

The workbook that keeps these rows is the timesheet calculator.

One day, minus lunch

TIME builds a clock time from an hour, a minute, and a second. 8:00 AM is TIME(8,0,0). 12:30 PM is TIME(12,30,0). 5:30 PM is TIME(17,30,0).

MOD of the later time minus the earlier time, divided by 1, is the fraction of a day between them. Multiply by 24 and the fraction is hours. The lunch splits the day into two spans:

=(MOD(TIME(12,0,0)-TIME(8,0,0),1)+MOD(TIME(17,30,0)-TIME(12,30,0),1))*24

That is 4 + 5 = 9. The same formula on Friday, with a 6:30 PM clock-out, is 4 + 6 = 10. None of these shifts crosses midnight. MOD still returns the span, and it keeps a clock-out after midnight inside the same 24 hours.

MOD
=(MOD(B3-B2,1)+MOD(B5-B4,1))*24
=(MOD(B3-B2,1)+MOD(B5-B4,1))*24B6
Monday
AB
1Value
2In8:00 AM
3Lunch out12:00 PM
4Lunch in12:30 PM
5Out5:30 PM
6Hours9
A picture of Monday, November 16, 2026. In at 8:00, lunch 12:00 to 12:30, out at 5:30. The morning is 4 hours and the afternoon is 5. Paid hours are 9.

Friday’s clock-out is 6:30 PM. HOUR reads the hour on a 24-hour clock, so 6:30 PM is 18, not 6:

=HOUR(TIME(18,30,0))

The Monday of that week

November 18, 2026 is the Wednesday in the sample. xl.week.start returns the Monday of that date:

=DATE(2026,11,18)-WEEKDAY(DATE(2026,11,18),2)+1

WEEKDAY with return type 2 numbers Monday as 1 and Wednesday as 3. November 18 minus 3 plus 1 is Monday, November 16. The name needs Microsoft 365, Excel 2024, or Excel for the web. Excel 2021 returns #NAME?. The WEEKDAY formula works without it. Saving the name is the same Name Manager step as the LAMBDA how-to.

Forty hours, then time and a half

SUM of the five paid days is 46. The federal weekly rule copied on the overtime page pays the first 40 hours at the straight rate and later hours at 1.5 times. The Department of Labor’s overtime page is that rule: covered nonexempt employees get overtime for hours worked over 40 in a workweek. Daily overtime, a seventh-day rule, and exempt salaried work are different tests.

=MIN(46,40)*20+MAX(0,46-40)*20*1.5

Straight time is 40 × 20 = 800. Overtime is 6 × 30 = 180. Pay is $980. xl.overtime.pay is that split as a name, =xl.overtime.pay(46,20), and it returns 980. The name does not round. This sample has no fraction of a cent.

SUM
=SUM(B2:B6)
=SUM(B2:B6)B7
The week
AB
1DayHours
2Mon 11/169
3Tue 11/179
4Wed 11/189
5Thu 11/199
6Fri 11/2010
7Week46
8Pay$980
A picture of the five paid days. Monday through Thursday are 9 hours. Friday is 10. The sum is 46. Straight time is 40 times $20. The 6 overtime hours are at $30. Pay is $980.

Template for this article

Timesheet Calculator with Overtime

More from the blog