Time edge cases
Overnight shifts and durations are tested so an end time earlier than the start time crosses midnight instead of becoming a negative duration.
The formulas, edge cases, and assumptions used by the current calculators, written so you can check the math yourself.
The core calculators use shared browser-side functions for time parsing, overnight shifts, rounding, overtime splits, decimal conversion, date arithmetic, salary conversion, and business-day rules. Results are deterministic: the same inputs and settings produce the same calculation.
Start and end times are converted to seconds or minutes from midnight. If the end is earlier than the start, one day is added to the end, treating the interval as an overnight span. A same-time start and end is zero elapsed time, not an assumed 24-hour span.
Break time is subtracted after elapsed time is calculated. A break cannot be negative or longer than the elapsed shift/duration.
When rounding is enabled, each paid shift is rounded to the nearest selected increment before it is added to the weekly total. No rounding is applied when the setting is off.
Minutes are fractions of 60 and seconds are fractions of 3,600. Decimal hours are not written like clock minutes: 7:30 is 7.50 hours, not 7.30 hours.
The calculator uses the threshold and multiplier entered by the user. It does not decide which threshold or multiplier legally applies.
If a double-time threshold is supplied, hours above that threshold are separated from ordinary overtime and multiplied by the separate double-time multiplier.
Date-only values are compared at UTC midnight so daylight-saving transitions do not create fractional calendar days. Inclusive counting adds one endpoint day to the absolute date gap.
Calendar month/year arithmetic preserves the day of month when possible. If the target month is shorter, the result clamps to that month’s last valid day.
Gross annual pay is divided by configured annual work hours for salary-to-hourly conversion. The reverse direction multiplies hourly pay by weekly hours and paid weeks per year.
Dates are evaluated one calendar day at a time. User-selected non-working weekdays are excluded first, then custom excluded dates. Start and end boundaries can be included or excluded independently.
The calculator moves one calendar day at a time in the requested direction and decreases the remaining business-day count only on dates that are neither selected non-working weekdays nor custom exclusions.
Each calculator goes through repeatable checks for its core formulas and important edge cases before updates are published. The checks cover time parsing, same-day and overnight shifts, break subtraction, rounding, payroll formatting, overtime and double-time splits, decimal conversion, date differences, month-end date arithmetic, salary/hourly conversion, business-day boundaries, custom weekends, excluded dates, and adding business days.
Overnight shifts and durations are tested so an end time earlier than the start time crosses midnight instead of becoming a negative duration.
Checks cover standard and custom weekends, boundary inclusion, custom excluded dates, and moving across non-working days.
No. Thresholds and multipliers are user inputs. The result is arithmetic based on those settings, not a legal determination.
No. The current build intentionally uses user-entered excluded dates instead of pretending a single holiday calendar applies to every country, employer, court, bank, carrier, or contract.
The core calculation logic runs in the browser. The Time Card Calculator can save its fields in browser local storage. Privacy-minimized diagnostics do not include form values or calculated results.
For the practical explanation attached to a particular calculator, use the worked examples on each tool page. For site background and operating principles, see About Work Hours Hub.