Clock in and clock out to find the hours and minutes between two times, or between two dates and times. Overnight shifts that punch out earlier than they punched in wrap past midnight. This is a timesheet-style hours tool — for adding and subtracting durations, use the Time Calculator.
Formula
Convert each 12-hour clock time to minutes from midnight, then subtract. 12 AM is 0 minutes and 12 PM is 12:00 (720 minutes):
minutes from midnight = (hour mod 12) × 60 + minutes (+ 12 × 60 if PM)
same-day minutes = end − start (add 1,440 if end < start)
two-date minutes = (end date × 1,440 + end clock) − (start date × 1,440 + start clock)
hours = ⌊minutes ÷ 60⌋
leftover minutes = minutes mod 60
decimal hours = total minutes ÷ 60
Equal clock times on the same day are 0 hours, not a 24-hour shift. A night shift that starts at 10:00 PM and ends at 6:00 AM is 8 hours because the end is earlier, so 24 hours are added.
Hours in different time periods
| Description | Hours |
|---|---|
| Hours in a day | 24 |
| Hours in a week | 168 |
| Hours in a 28-day month | 672 |
| Hours in a 30-day month | 720 |
| Hours in a 31-day month | 744 |
| Hours in a 365-day year | 8,760 |
| Hours in a leap year | 8,784 |
Examples
Standard day shift
Clock in at 8:30 AM and clock out at 5:30 PM. That is 9 hours, or 540 minutes.
Overnight shift
Clock in at 10:00 PM and clock out at 6:00 AM. The end is earlier, so the calculator adds 24 hours and the shift is 8 hours, or 480 minutes.
Two calendar days
Start January 1, 2026 at 8:30 AM and end January 2, 2026 at 5:30 PM. The span is 1 day 9 hours, or 33 hours, or 1,980 minutes.