Skip to main content

How to Subtract an Unpaid Break from Hours Worked in Excel

· 5 min read
Jagdish Kumawat
Founder @ Dewiride

A shift's paid time is the time between start and finish minus any unpaid break. With the break recorded in minutes, the formula is: MOD(Finish-Start,1) minus Break/1440. The MOD handles shifts past midnight and the /1440 turns minutes into a time.

This is the Time worked formula of the old overtime timesheet from Part 1 of the Overtime Timesheet series, where each row has a Start, a Finish and a Break (mins).

Prerequisites​

Step 1: Type the Formula​

In the first row of the Time worked column, type:

A code window titled OvertimeLog → Time worked showing =MOD([@Finish]-[@Start],1)-[@[Break (mins)]]/1440, the formula that takes the time between start and finish, past midnight if needed, and subtracts the break converted from minutes

OvertimeLog → Time worked
=MOD([@Finish]-[@Start],1)-[@[Break (mins)]]/1440

Piece by piece:

PartDoes
[@Finish]-[@Start]This row's finish minus start, as a fraction of a day
MOD(…,1)Counts forward past midnight, so night shifts aren't negative: How to Calculate Hours for an Overnight Shift in Excel with MOD
[@[Break (mins)]]/1440The break in minutes as a time: How to Convert Minutes to a Time in Excel by Dividing by 1440
- between themTakes the break off

Cell I2 being edited with the formula, and the Start, Finish and Break (mins) cells of row 2 outlined in the reference colours

Outside a table, with start in D2, finish in E2 and the break in F2: =MOD(E2-D2,1)-F2/1440.

Step 2: Check the Results​

Press Enter. Every row now shows paid time:

  • 19:00 to 23:00 with a 30-minute break: 03:30
  • 07:00 to 11:30 with a 30-minute break: 04:00
  • 22:00 to 06:00 with a 60-minute break: 07:00
  • 15:00 to 19:00 with no break: 04:00

The Time worked column after subtracting breaks, I2 selected showing 03:30 with the formula in the formula bar, and the other rows showing 04:00, 04:00, 05:00, 04:00, 04:00, 04:00, 07:00, 03:45, 04:00, 04:00, 03:30, 05:30 and 04:00

For decimal hours, multiply this column by 24 in another: How to Convert Time to Decimal Hours in Excel.

Common Mistakes​

MistakeWhat happensDo this instead
Subtracting the break inside the MODIt still works for most rows, but a break longer than a short shift wraps round to nearly 24 hoursSubtract the break after MOD
Subtracting the minutes without /144030 is taken as 30 daysDivide the minutes by 1440
Recording some breaks as times and some as minutesOne kind is wrongUse minutes for every row

Troubleshooting​

SymptomLikely causeFix
######## in a few rowsThe break is longer than the shift, giving a negative timeCheck the row's data
######## in every rowThe break was subtracted without /1440Add /1440
A night shift across a clock change is an hour outExcel ignores daylight saving timeHow to Calculate Hours Worked Across a Daylight Saving Time Change in Excel

FAQ​

What if breaks are recorded as times like 0:30?​

Then subtract the cell directly, without /1440.

Is a break of 0 a problem?​

No. 0/1440 is 0, so the shift's time doesn't change.

Conclusion​

=MOD(Finish-Start,1)-Break/1440 gives paid time for every shift, day or night, with the break taken off.

Additional Resources​