Standard shift with lunch
- Input
- 08:00 → 12:00 / 13:00 → 18:30
- Expected output
- trabalhado 09:30, saldo +01:30
9h30 worked against an 8h workload leaves 90 minutes of positive balance, shown as 01:30; the 1h lunch break stays outside the worked time.
work hours, overtime and balance calculation
A work shift becomes a number in two ways: minutes actually worked and the balance against the expected workload, and the difference between the two shows up clearly when clock-out crosses midnight and the 24-hour clock resets back to zero.
9h30 worked against an 8h workload leaves 90 minutes of positive balance, shown as 01:30; the 1h lunch break stays outside the worked time.
570 minutes ÷ 60 = 9.50 decimal hours, the format a payroll spreadsheet uses to multiply against an hourly rate, instead of the HH:MM format a person reads.
Without the +1440-minute adjustment on clock-out, 06:00 (360 min) minus 22:00 (1320 min) would give −960 minutes; with the adjustment, 06:00 becomes 1800 minutes of the following day and the difference closes at 480 minutes, a correct 08:00.
Yes. The goal is to total worked periods and subtract informed breaks, helping you see the day’s total and any balance against the expected workload.
Add up worked time (clock-out minus clock-in, lunch excluded) in minutes, subtract the expected workload also in minutes, and a positive result is overtime, a negative one is a shortfall to make up.
Treat clock-out as belonging to the next day by adding 24h (1440 minutes) to it whenever it is numerically smaller than clock-in, and only then subtract; without that adjustment, the 24-hour clock resets to zero and produces a nonsensical negative balance.
It is the same duration written as a fraction of an hour instead of HH:MM: 30 minutes becomes 0.50, not 0.30; payroll sheets and spreadsheets use this form because it multiplies directly against an hourly rate, which HH:MM cannot do without converting first.
Because it is the physical ceiling of a 24-hour calendar day; the calculation clamps the expected workload between 1 and 24 hours to prevent an impossible target, though actual worked time on a single shift can still exceed 24h if it crosses more than one day boundary.
Times stay on your screen only. Nothing is sent to any server.