Time Card & Work Hours Calculator
Enter clock-in, clock-out and break times for the week and get hours worked per day, the weekly total, and an automatic regular-versus-overtime split. Add an hourly rate for regular, overtime, and gross pay. No signup, nothing uploaded — it all runs in your browser.
How it works
A time card turns two clock readings into a number you can put on a payslip. The method is the same one payroll clerks have used by hand for decades — this page just removes the arithmetic mistakes. For each day it runs four steps:
- Parse the clock-in and clock-out into minutes since midnight using 24-hour notation (ISO 8601). 08:30 becomes 510 minutes; 17:45 becomes 1,065.
- Take the span:
out − in. If the clock-out is earlier than the clock-in, the shift crossed midnight, so a full day (1,440 minutes) is added — that is how a 22:00–06:00 night shift reads as 8 hours rather than a negative number. - Subtract the unpaid break:
worked = max(0, span − break). Optionally round to the nearest 1, 5, or 15 minutes — many SL employers round to the quarter-hour. - Convert to decimal hours by dividing minutes by 60. Fifteen minutes is 0.25 hours; this is the form payroll software expects.
Once every day is computed, the week total is the sum of the worked minutes. The regular-versus-overtime split depends on the rule you pick. In daily mode each day is tested against the daily threshold: overtime = max(0, dayHours − 8), then summed. In weekly mode the whole-week total is tested against the weekly threshold (45 hours). The two methods can disagree — a single long day creates daily overtime even when the week stays under 45 hours — so the tool always prints the active rule.
The defaults — 8 hours a day, 45 hours a week, and a 1.5× overtime rate — come from Sri Lanka's Shop and Office Employees (Regulation of Employment and Remuneration) Act No. 19 of 1954, which caps normal working time and sets overtime at not less than time-and-a-half. If you add an hourly rate, pay is regularHours × rate + overtimeHours × rate × multiplier. Every threshold and the multiplier is editable, so the tool works for any country or contract — just change the numbers.
Worked examples
Frequently asked questions
Sources & references
- Department of Labour, Sri Lanka — official site (working time & overtime)
- Shop and Office Employees Act No. 19 of 1954 — ILO NATLEX record
- ISO 8601 — date and time notation (24-hour time, HH:MM)
The statutory defaults (8 hours/day, 45 hours/week, 1.5× overtime) were last cross-checked against the Department of Labour guidance on 2026-06-09. Always confirm your own contract or sector wage board, which can set more generous terms than the statutory floor.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a bug, edge case, or want to suggest an improvement?
Email me at [email protected] — most fixes ship within 24 hours.