Time & attendance
Time duration calculator
Free time duration calculator and elapsed time calculator for shift workers and payroll prep. Find hours and minutes between two times or dates — with break deductions, decimal hours, and overnight shift auto-detect. Three modes: same-day times, multi-day date ranges, and add/subtract time. Export CSV or PDF — no sign-up. For weekly FLSA timesheets, use the time card calculator.
How this time duration calculator works
Quick answer: An elapsed time calculator finds how much time passed between a start and end point. Convert both times to 24-hour format, subtract start from end, then subtract unpaid break minutes. For overnight shifts, add 24 hours when the end time is earlier than the start. Example: 9:00 AM to 5:45 PM with a 45-minute break = 8.00 hours net (8:00 in hours:minutes, 8.00 decimal).
Use this tool for single shifts, meetings, or date spans — not weekly timesheet totals. Results show net duration in hours:minutes, decimal hours (for payroll imports), and total minutes.
Three modes cover the most common time duration tasks: same-day clock times, multi-day date ranges, and adding or subtracting a duration from a start time — with CSV/PDF export when you need a record.
Between times
Same-day clock-in and clock-out with optional break deduction and overnight auto-detect — the core hours between two times use case.
Date & time
Multi-day elapsed time across calendar dates. Leap years handled automatically. For business days only, use the working days calculator.
Add / subtract
Start from a date and time, add or subtract hours and minutes. Midnight crossover handled (e.g. 11:00 PM + 2 h = 1:00 AM next day).
Pick a calculator mode
Between times (same day), Date & time (multi-day), or Add / subtract time.
Enter start and end (or base time + duration)
Use 24-hour or browser time pickers. Add break minutes when you need net work time.
Read net duration and decimal hours
Copy decimal hours into timesheets or export CSV/PDF for records.
How to calculate time between two times
Subtract the start time from the end time in 24-hour format. If the end time is earlier than the start (for example 10:00 PM to 6:00 AM), treat the end as the next day by adding 24 hours before subtracting.
Worked example: Start 9:00 AM (09:00), end 5:45 PM (17:45), break 45 minutes. Gross span = 8 h 45 m. Net after break = 8 h 00 m = 8.00 decimal hours.
If end minutes are smaller than start minutes, borrow one hour (60 minutes) from the hours column before subtracting — the calculator handles this automatically.
Decimal hours conversion
Payroll and billing tools often use decimal hours instead of hours:minutes. Divide minutes by 60 and add to whole hours: 8 h 30 m = 8 + (30 ÷ 60) = 8.50. Most HRIS and payroll CSV imports accept decimal hours — use the export button above to copy values without retyping.
Excel tip: If end time is in B2 and start in A2 (as time-of-day values), gross hours = (B2-A2)*24. Subtract break minutes with -(break_minutes/1440) when breaks are entered as a fraction of a day, or subtract break÷60 after converting to decimal hours.
| Minutes | Decimal hours | Example (8h + X min) |
|---|---|---|
| 5 min | 0.08 | 8.08 h |
| 10 min | 0.17 | 8.17 h |
| 15 min | 0.25 | 8.25 h |
| 20 min | 0.33 | 8.33 h |
| 30 min | 0.50 | 8.50 h |
| 45 min | 0.75 | 8.75 h |
| 50 min | 0.83 | 8.83 h |
| 60 min | 1.00 | 9.00 h |
Overnight shifts and breaks
For shifts crossing midnight, enable overnight shift or leave auto-detect on. Example: 10:00 PM to 6:00 AM with a 30-minute unpaid break = 7.50 hours net.
Manual steps: (1) Convert both times to 24-hour format. (2) Convert each to total minutes from midnight. (3) If end < start, add 1,440 minutes (24 h). (4) Subtract start from end. (5) Subtract unpaid break minutes and divide by 60 for decimal hours.
To deduct lunch or rest breaks, enter total unpaid break minutes. Net duration = gross span minus breaks. For a full weekly grid with FLSA overtime, use the time card calculator.
Add or subtract time
Start from a date and time, then add or subtract a duration. Example: meeting at 2:30 PM plus 1 h 45 m ends at 4:15 PM. The calculator rolls past midnight when needed (11:00 PM + 2 hours = 1:00 AM next day).
Date and time across multiple days
Use Date & time mode when the span crosses calendar days. The result includes calendar day count, total hours, and decimal hours. Leap years are handled automatically (for example, Jan 1 to Mar 1 is 59 days in a standard year and 60 in a leap year).
To count business days only (excluding weekends and holidays), use the working days calculator — it answers a different question than elapsed clock time.
12-hour vs 24-hour (military) time
The 12-hour format uses AM and PM; the 24-hour format runs from 00:00 to 23:59 with no AM/PM ambiguity. To convert PM times, add 12 to the hour (3:30 PM → 15:30). Midnight is 00:00; noon is 12:00.
Duration math is easiest in 24-hour form: subtract start from end after conversion. The calculator accepts browser time inputs in either format your device uses — results are shown in hours:minutes and decimal hours regardless.
Time duration in timesheets and payroll
Timesheets record duration in hours:minutes (readable) or decimal hours (easier for rate × hours math). Spreadsheet cells formatted as time-of-day can misread 8:30 as 8:30 AM instead of 8.5 hours worked — decimal output avoids that pitfall.
For recurring weekly totals, shift patterns, and FLSA overtime splits, use the time card calculator. For automated clock-in/out, break rules, and payroll export in one system, Ordio time tracking replaces manual duration math at scale.
Reference: 168 hours per week · 720 hours in a 30-day month · 744 in a 31-day month · 8,760 hours in a standard year (8,784 in a leap year).
More free tools
Discover more calculators for time tracking, payroll, and HR.
Frequently asked questions about this time duration calculator
How do I calculate elapsed time between two times?
Elapsed time is the clock span from start to end. Subtract start from end in 24-hour format (add 24 hours if the shift crosses midnight). Example: 9:00 AM to 5:30 PM = 8 h 30 m = 8.50 decimal hours. Use Between times mode and subtract break minutes for net work time.
How do I calculate duration with a lunch break?
Calculate the gross span between clock-in and clock-out, then subtract unpaid break minutes. Example: 9:00–17:45 with a 45-minute break = 8.00 net hours.
How do overnight shifts work?
When the end time is earlier than the start (e.g. 22:00 to 06:00), add 24 hours to the end before subtracting. Enable Overnight shift or use auto-detect in the calculator.
What are decimal hours and why do payroll systems use them?
Decimal hours express time as a decimal number: 2 h 15 m = 2.25 h. Payroll imports and hourly rate math multiply cleanly against decimal hours.
How do I convert minutes to decimal hours?
Divide minutes by 60. Fifteen minutes = 0.25 h, thirty minutes = 0.50 h, forty-five minutes = 0.75 h.
How do I calculate time across multiple days?
Use Date & time mode. Enter start date/time and end date/time. The calculator shows total duration and calendar days between the dates.
How do I add or subtract time from a start time?
Use Add / subtract mode. Enter a base date and time, choose add or subtract, and enter hours and minutes. Midnight crossover is handled automatically.
What is the difference between elapsed time and net work time?
Elapsed time is the full clock span. Net work time subtracts unpaid breaks. Timesheets and payroll usually need net work time.
Can I use this for weekly timesheet totals?
This tool calculates one span at a time. For a full weekly grid with FLSA overtime and optional pay estimate, use the time card calculator.
Does this handle time zones?
No. Enter local wall-clock times only. For cross-timezone math, convert both timestamps to the same zone first, then enter the local values.
How do I calculate time duration in Excel?
With start in A2 and end in B2 as Excel time values, gross decimal hours = (B2-A2)*24. If the shift crosses midnight, add 1 to B2 first: ((B2+1)-A2)*24. Subtract breaks as -(break_minutes/60) from that result. Format the result cell as Number, not Time.
How is this different from a time card calculator?
A time duration calculator finds the span between two times or dates. A time card calculator totals a full week of shifts, deducts breaks per day, and splits FLSA weekly overtime.