Time Duration Calculator
Compute duration between two times, or add/subtract HH:MM:SS values. Outputs HH:MM:SS, decimal hours, total minutes, total seconds. For shifts, billing, project hours.
Time Duration Calculator
How to use the Time Duration Calculator
Pick the mode
Duration between two times: enter start + end clock times. Best for: shift duration, meeting length, billable session math. Add or subtract HH:MM:SS: do arithmetic on duration values. Best for: summing multiple sessions, subtracting break time, combining race splits.
For "between two times" mode
Enter start + end as 24-hour times. The tool computes elapsed time. For overnight shifts (e.g., 22:00 to 06:00): check the "Crosses midnight" box. Without it, the tool flags an error since end time appears before start time.
For "HH:MM:SS arithmetic" mode
Enter two durations as hours / minutes / seconds. Pick add or subtract. Outputs the result + all standard units. Useful for: adding multiple billing sessions, subtracting unpaid breaks from gross shift, combining race splits across legs.
Read all output formats
HH:MM:SS for human-readable display. Decimal hours for timesheets + payroll (e.g., 8.5 hours instead of 8:30). Total minutes + seconds for technical contexts. Copy whichever format matches your destination system\'s expectations.
Time duration math — the everyday calculations that mess up payroll + billing
Time duration math sounds trivial, but inconsistencies in how clock times are subtracted, how lunch breaks are deducted, and how overnight shifts roll over cause real payroll + billing errors. Common pitfalls: subtracting "5:00 PM minus 9:00 AM" with the wrong formula returns "negative 4 hours"; computing overtime without accounting for the unpaid lunch break overstates hours; summing dozens of billable sessions in HH:MM:SS without a calculator is error-prone. This tool handles all the common cases — clock-time differences, overnight shifts, and explicit HH:MM:SS arithmetic — with output in multiple formats (HH:MM:SS, decimal hours, total minutes, total seconds) for different downstream use cases.
Why "decimal hours" matters for timesheets
Most payroll + accounting systems store hours as DECIMAL numbers (8.5 hours, not 8h 30m). This is because the underlying multiplication ("hours × hourly rate") requires decimal math, not sexagesimal (60-based) time. The conversion: 30 minutes = 0.5 hour; 15 minutes = 0.25 hour; 45 minutes = 0.75 hour; 1 minute = 0.0167 hour. Common timesheet rounding: most US firms round to nearest 1/4 hour (15 min); UK + EU often round to nearest 1/10 hour (6 min); some legal + consulting use exact decimal hours (0.01 hour = 36 seconds, useful for billable-minute precision). Common errors: entering "8:30" in a decimal-hours field — payroll software may interpret as 8.30 hours (incorrect) or 8 hours 30 minutes (correct), depending on the parser. Always convert HH:MM:SS to decimal hours manually before entering into payroll.
Payroll math is decimal: 30 minutes = 0.5 hour, not 8:30. Entering HH:MM:SS into a decimal-hours field causes consistent overpayment or underpayment errors.
Overnight shifts + the midnight crossing problem
Shifts that cross midnight (10pm-6am, 11pm-7am, etc.) require explicit handling because the end clock time numerically appears before the start. Simple subtraction: "6:00 - 22:00 = -16 hours" — wrong. Correct logic: add 24 hours to the end time when end is numerically before start: "30:00 - 22:00 = 8 hours" (= 6am next day). This tool\'s "Crosses midnight" checkbox handles this. For shifts that span multiple days, use start date + end date instead of clock times alone — but for single overnight shifts, the checkbox is sufficient.
The ASEAN labour law context
Working hour limits across ASEAN markets vary by country and industry. Singapore (Employment Act): max 44 hours/week regular, 12 hours OT/week max. Lunch break of 30-60 min after 6 continuous hours of work. Malaysia: max 45 hours/week; 30-min break after 5 hours of work. Thailand: max 48 hours/week (8 hours/day, 6 days); 1-hour break after 5 hours. Philippines: max 48 hours/week (8 hours/day, 6 days); 1-hour meal break unpaid. Indonesia: max 40 hours/week (8 hours/day, 5 days OR 7 hours/day, 6 days). Vietnam: max 48 hours/week (8 hours/day, 6 days). Practical implication: when calculating shift duration, subtract unpaid meal breaks per local law to get actual paid working hours. A "9-to-6 shift" is 9 hours gross; with 1-hour unpaid lunch, it\'s 8 paid working hours. Use this tool\'s arithmetic mode to subtract breaks from gross shift time.
10 Things to Know About Time Duration
30 minutes = 0.5 hour. Decimal hours used by payroll + billing systems; HH:MM:SS used by clocks + humans.
Overnight shifts require special handling — end time appears numerically before start. Add 24 hours to compute correctly.
US timesheets typically round to nearest 1/4 hour (15 min); UK/EU often to 1/10 hour (6 min); legal + consulting use exact decimal precision.
ASEAN labour law: SG 44h, MY 45h, TH/PH/VN 48h, ID 40h weekly max. Subtract unpaid breaks for paid hours.
"9-to-6 shift" = 9 hours gross; with 1-hour unpaid lunch = 8 paid working hours.
Sexagesimal (60-based) time multiplication is error-prone manually. Decimal-hour math + then convert back avoids errors.
Common billing units: 1/4 hour (US, simple), 1/10 hour (UK, EU), 1/60 hour or per-minute (premium legal/consulting).
HH:MM:SS in spreadsheets: Excel + Google Sheets handle it natively but require correct cell formatting to display + sum properly.
For race splits + project tracking, sum durations not clock times. Multiple 1h30m sessions = 7h30m total (use arithmetic mode).
Time tracking apps (Toggl, Harvest, Clockify) automate this math — but understanding it manually prevents billing errors.
Frequently Asked Questions
-
Check the "Crosses midnight" box. Without it, the tool will flag an error since end time appears numerically before start. The math: end time gets +24 hours added before subtraction. Example: 22:00 to 06:00 with the checkbox = 8 hours; without it = error.
-
HH:MM is sexagesimal (60-based) — used by clocks + humans. Decimal hours is base-10 — used by payroll + billing systems. Conversion: 30 minutes = 0.5 hour (not 8.30). For payroll: hours × hourly rate requires decimal math. Common error: entering "8:30" into a payroll field expecting decimal — software may interpret as 8.30 or 8.50 depending on parser, causing payment errors. Always convert HH:MM to decimal hours before entering into payroll software.
-
Two steps. Step 1: in "Duration between two times" mode, compute gross shift (e.g., 09:00 to 18:00 = 9h00m). Step 2: switch to "HH:MM:SS arithmetic" mode; subtract lunch (1h00m) from gross (9h00m). Result: 8h00m paid working time. Or one step: compute (end − start) − lunch in your head: 9h − 1h = 8h paid.
-
One pair at a time in arithmetic mode. For 5+ sessions, sum them iteratively: A+B → A+B+C → A+B+C+D, etc. For larger batches: use Excel/Google Sheets with TIME() + SUM() functions. Or use time tracking apps (Toggl, Harvest, Clockify) that handle aggregation automatically. This tool is best for spot-checking 1-3 calculations.
-
1/4 hour (15 min, 0.25 hour): most US consulting + many SaaS apps; rounds 8 min to 0.25 hour. 1/10 hour (6 min, 0.1 hour): UK + EU professional services; rounds 4 min to 0.1 hour. 1/6 hour (10 min, 0.167 hour): some legal firms. 1/60 hour (1 min, 0.0167 hour): premium legal + technical consulting; exact per-minute billing. By second: phone-call billing in telco contexts. Pick the unit that matches your billing software\'s rounding rule.
-
Common causes: (1) Cell formatting wrong — time values display as decimal numbers (0.375 = 9:00 AM); apply [h]:mm format to display time correctly. (2) End time before start time — Excel returns negative number unless you handle overnight. Formula:
=IF(B1<A1, B1+1-A1, B1-A1)for overnight shifts. (3) SUM over time values — apply [h]:mm format to result cell or sum shows as 0.00 (sums roll over at 24 hours otherwise). (4) Mixing decimal hours with HH:MM in same calculation without converting. -
Both, ideally. Clock-in/out times establish when work happened (important for OT eligibility + labour-law compliance). Total duration is what matters for pay. Modern time tracking apps (Toggl, Harvest, Clockify, ASEAN payroll systems like Talenox, Justlogin, Quickbooks) track both. Best practice: log clock-in + clock-out times; compute duration; subtract unpaid breaks; that\'s paid time. For legal compliance, retain clock records for 6+ months (most ASEAN jurisdictions require 1-2 year retention).
-
Each ASEAN country sets max regular working hours + OT triggers + OT rates. Singapore: max 44h regular/week, OT after 8h/day or 44h/week paid 1.5× regular rate. Malaysia: 45h regular, OT 1.5× for first 8 OT hours/week. Thailand: 48h regular, OT 1.5× (2× on holidays). Philippines: 48h regular, OT 25-30% premium. Indonesia: 40h regular, OT 1.5-2× rates. Vietnam: 48h regular, OT 1.5× weekday / 2× weekend. Computation: sum weekly hours (using this tool to add daily shifts); subtract any week\'s hours above regular threshold; apply OT premium. Most ASEAN payroll systems automate this.
-
No. All calculations run in your browser via JavaScript. Open DevTools → Network and confirm zero outbound requests. Time data stays on your device. Safe for confidential payroll + billing calculations.
-
Pair with: Date Difference Calculator (RT-CNV-085) for calendar-day math; Working Days Calculator (RT-CNV-086) for business-day arithmetic; Date Add/Subtract Calculator (RT-CNV-087) for date arithmetic; Week Number Calculator (RT-CNV-088) for ISO week numbers; Time Card Calculator (RT-FIN-130) for full payroll timesheet math; Timezone Converter (RT-CNV-002) for cross-region scheduling. External: Toggl, Harvest, Clockify for automated time tracking; ASEAN payroll systems (Talenox, Justlogin, Quickbooks) for compliant payroll math.
Related News
You may be interested in these recent stories from our newsroom.
No related news yet for this tool. Our editorial team publishes new pieces every week.
Browse all news →75 more free tools
Calculators, converters, security tools — no signup.