Start With the Pay Rule, Not the Spreadsheet
The arithmetic is simple: an employee's hours are the time between a valid check-in and a valid check-out, less unpaid breaks. Payroll becomes difficult when the business has not decided what counts as valid, which day owns a night shift, or when overtime begins. If those rules change while someone is closing the month, the spreadsheet becomes a negotiation rather than a record.
Write the policy down before calculating a single employee. Decide whether paid hours are based on scheduled hours or actual hours, whether breaks are fixed or clocked, how late arrivals affect pay, whether overtime needs manager approval, and how a shift that crosses midnight is assigned. The same rules must apply to the attendance system, the supervisor review, and the payroll export.
For hourly and shift-based teams, a payroll-ready report should preserve the source events as well as the totals. Keep the employee, work date, scheduled shift, check-in, check-out, unpaid break, regular hours, overtime hours, status, and exception reason. A total without the events behind it is hard to defend when an employee or client asks how a number was produced.
- Define paid time, unpaid breaks, rounding, overtime, and night-shift ownership first
- Use server-recorded check-in and check-out times where possible
- Keep source events and calculated totals in the same audit trail
- Separate a missing record from a zero-hours day
The Basic Employee-Hours Formula
For a normal same-day shift, calculate gross duration first and then subtract unpaid breaks. In decimal hours, the formula is: (check-out time minus check-in time) minus unpaid break minutes divided by 60. For example, a check-in at 9:10 AM and a check-out at 6:05 PM with a 45-minute unpaid break gives 8 hours and 10 minutes of paid time, or 8.17 decimal hours.
Do not round each punch before calculating. Convert the actual timestamps to minutes from midnight, subtract the break, and round only the final value according to your payroll policy. Rounding every in-time and out-time independently can create a material difference across a month, especially for teams with many short shifts.
If your team is paid by the day rather than by the hour, retain the decimal result anyway. It is useful for overtime thresholds, half-day rules, part-time payroll, client billing, and investigating disputes. A daily attendance status can be derived from the hours, but it should not replace the hours themselves.
- Example: 9:10 AM to 6:05 PM minus 45 minutes equals 8 hours 10 minutes
- 8 hours 10 minutes is 8.17 decimal hours, not 8.10
- Round the final duration, not each individual punch
- Keep minutes and decimal hours available for different payroll systems
How to Calculate Overnight and Night-Shift Hours
An overnight shift looks negative if the spreadsheet assumes the check-out must happen on the same calendar date. A 10:00 PM check-in followed by a 6:00 AM check-out is an eight-hour shift, not minus sixteen hours. Treat the check-out as occurring on the next day whenever the end time is earlier than the start time and the assigned shift is marked as overnight.
The cleanest method is to store full timestamps instead of time-only values. The start might be 2026-08-27 22:00 and the end 2026-08-28 06:00. The difference is then unambiguous, and the shift can still be reported under the business date or shift start date defined in policy. This matters for weekly offs, public holidays, night allowances, and statutory reporting.
Apply the same rule to breaks. If a break starts before midnight and ends after midnight, it still belongs to the same shift. Test at least three cases before going live: a normal overnight shift, an overnight shift with a late check-out, and a missing check-out. The last case should become an exception for review, not an automatically inflated duration.
- Store date and time together for every event
- Assign the next calendar day when an overnight check-out follows the start
- Choose and document whether payroll owns the shift by start date or work date
- Flag missing overnight check-outs instead of guessing an end time
Separate Regular Hours, Overtime, and Premium Time
Payroll usually needs more than one total. Split each approved shift into regular hours and overtime hours using the policy for that employee group. A common example is eight regular hours per workday, with time beyond eight treated as overtime. Other businesses use weekly thresholds, scheduled-hours thresholds, or different rules for holidays and weekly offs.
Suppose an employee works 9 hours 30 minutes after a 30-minute unpaid break. If the daily threshold is eight hours, the report should show 8.00 regular hours and 1.00 overtime hour after applying the business's rounding rule. If the employee worked on a weekly off, the entire approved duration may need a separate premium category instead of being mixed into ordinary overtime.
Never infer overtime only from a late check-out. Compare actual worked time with the assigned shift and approved overtime record. A late punch caused by forgetting to check out is not automatically an overtime claim. The supervisor should be able to approve, reject, or correct the exception with a reason, while the original event remains visible.
- Keep regular, overtime, weekly-off, and holiday hours in separate columns
- Use the employee or shift policy to select the applicable threshold
- Require approval for overtime that is not already scheduled
- Retain the original punches when a supervisor corrects a calculation
Handle Missing Punches Without Guessing
A missing check-in or check-out is not the same as absence. It is an incomplete record. If the system silently treats a missing check-out as the scheduled end time, it creates hours that did not happen. If it silently treats the day as absent, it can underpay someone who worked. Both shortcuts create disputes and make the report impossible to trust.
Create an exception queue for incomplete or contradictory records. The employee can submit a reason, and the supervisor can compare the request with the shift, location proof, network or device event, colleague coverage, and any available site record. Once approved, the correction should show who approved it, when, why, and which fields changed.
A reliable hours report therefore has two outputs: the calculated payroll file and an exceptions report. Finance gets clean approved hours. HR and operations get the unresolved items that need action before payroll closes. This is faster than finding exceptions after payslips are published.
- Missing punches enter review instead of receiving an automatic default
- Employees explain the exception; supervisors approve with a reason
- Keep an immutable record of the original event and the approved correction
- Block payroll close while high-risk exceptions remain unresolved
Use a Payroll-Ready Hours Checklist
Before exporting hours, confirm every active employee has an assigned schedule or an approved reason for being unscheduled. Check that each payable day has a valid status, that leave and weekly offs are not being counted as absences, and that the report distinguishes zero hours from a missing attendance record.
Then review outliers: unusually long shifts, repeated manual edits, overtime concentrated at one site, overnight shifts with same-day dates, and employees with no check-out. Outliers do not always mean fraud or error, but they are exactly where a payroll process needs a human decision.
Attend Mitra is designed to keep this workflow connected. Verified attendance and approved leave can feed the payroll run, while shift rules provide the context for regular hours and overtime. Managers can review exceptions before payroll, and employees can access the resulting payslip rather than asking HR to reconstruct the calculation from separate sheets.
- Check schedules, leave, weekly offs, and attendance status before exporting
- Review long shifts, manual edits, missing punches, and repeated exceptions
- Reconcile total regular and overtime hours to the payroll summary
- Keep an approved exception report with every payroll run
- Run the process through one complete pay cycle before scaling

