Time Duration Calculator: Measure Any Time Span
Hours and minutes between two times
Try the calculator
Math runs in your browser. No sign-up.
From 9:15 to 17:45 is 8.5 hours.
Convert both times to minutes past midnight, subtract, and add 1,440 if the answer is negative. From 09:15 to 17:45 is 1,065 β 555 = 510 minutes, which is 8.5 decimal hours or 8 hours 30 minutes.
Finding the gap between two clock times is one of those calculations that is easy in principle and error-prone in practice, because clock arithmetic is base-60 and wraps at midnight. This calculator converts both times to minutes past midnight, subtracts, and adds a full day when the result is negative β which is what makes overnight shifts work correctly. It returns the duration in minutes, in decimal hours, and in hours and minutes. Decimal hours is the figure payroll and invoicing systems expect: 8 hours 30 minutes is 8.5 hours, not 8.30, and that distinction is the single most common source of error in manual timesheets.
What is a time duration?
Calculate the elapsed time between two clock times, including shifts that run past midnight. Enter start and end on a 24-hour clock to get the duration in minutes, decimal hours, and hours and minutes. Decimal hours is the figure payroll and invoicing systems expect β 8 hours 30 minutes is 8.5, not 8.30 β and confusing the two is the most common error in manual timesheets.
The formula
Source: Minutes-past-midnight differencing with day wrap.
Worked examples
1A standard office day
09:15 is 555 minutes past midnight and 17:45 is 1,065, a difference of 510 minutes. That is 8.5 decimal hours, or 8 hours 30 minutes. If an unpaid 30-minute lunch was taken, the payable figure is 8.0 hours β the calculator gives the span, and the break comes off separately.
2A night shift crossing midnight
22:30 is 1,350 minutes and 06:15 is 375, giving β975. Adding a full day of 1,440 minutes yields 465 minutes: 7 hours 45 minutes, or 7.75 decimal hours. Handling this by hand is where overnight timesheets usually go wrong, often recorded as 16 hours by subtracting in the wrong direction.
How to use this calculator
- Start hour β 24-hour clock: 0β23. 9am is 9, 9pm is 21.
- Start minute (default: 15)
- End hour (default: 17)
- End minute (default: 45)
- Read the result. Use the worked examples below to sanity-check against a known scenario.
Common mistakes and edge cases
Writing 8 hours 30 minutes as 8.30
This is the dominant timesheet error. Thirty minutes is half an hour, so the decimal form is 8.5. Minutes convert by dividing by 60, not by moving a decimal point: 15 minutes is 0.25, 20 minutes is 0.33, 45 minutes is 0.75.
Mixing 12-hour and 24-hour notation
Entering 5 for a 5pm finish gives a negative span that the calculator then treats as an overnight shift, producing roughly 20 hours. Use 17 for 5pm.
Forgetting unpaid breaks
The gap between clock-in and clock-out includes any break taken. Subtract unpaid break time separately β a 30-minute lunch turns an 8.5-hour span into 8 paid hours.
Assuming every day is 24 hours
On daylight-saving transition days a local day is 23 or 25 hours long. A shift spanning the change will be off by an hour under pure clock arithmetic, which is why payroll systems work in UTC.
Frequently asked questions
how do I calculate hours between two times
how do I work out an overnight shift
how do I convert minutes to decimal hours
does this subtract my lunch break
why does my answer look about 12 hours wrong
Time Duration glossary
How we built this calculator
Methodology
Clock time is awkward to subtract directly because it carries in base 60 for minutes and base 24 for hours. The reliable method is to flatten both times into a single unit. Multiplying hours by 60 and adding minutes gives minutes past midnight: 09:15 becomes 555 and 17:45 becomes 1,065. The difference, 510 minutes, needs no borrowing.
Sources & references
Every numeric assumption traces to a primary source.
- U.S. Department of Labor β Fair Labor Standards Act Hours Worked AdvisorUSA
- NIST β Time and Frequency Division, Time RealizationUSA
- ISO 8601 β Date and time representationsINT
- Numora Editorial Policy. numora.net/editorial-policy