Skip to main content

Hours Calculator

Calculate elapsed hours and minutes between clock times across midnight.

How It Works

The Hours Calculator computes elapsed time between two clock times or adds/subtracts a duration from a start time.

It seamlessly handles crossing midnight, provides decimal hours for payroll and invoicing, and formats results in both 12-hour AM/PM and 24-hour military standards.

Formula & Calculation

Elapsed Time & Decimal Hours Formula

Elapsed Minutes = (EndMinutes − StartMinutes + 1440) % 1440
StartMinutes=Minutes elapsed since midnight for start time
EndMinutes=Minutes elapsed since midnight for end time
1440=Total minutes in a 24-hour day

Adding 1,440 minutes ensures overnight shifts crossing midnight calculate accurately without negative numbers.

Decimal Hours for Payroll

Decimal Hours = Hours + (Minutes / 60)
Hours=Whole hours portion
Minutes=Remaining minutes divided by 60

For example, 8 hours and 15 minutes equals 8.25 decimal hours; 8 hours and 45 minutes equals 8.75.

Step-by-Step Example

Example 1: Daytime Shift (9:00 AM to 5:30 PM)

Calculate elapsed work hours for a standard business day:

Step 1: Convert clock times to minutes from midnight: 09:00 = 540 min; 17:30 = 1,050 min→ 1,050 − 540 = 510 min
Step 2: Convert to hours and minutes: 510 / 60 = 8 with 30 remaining→ 8 hours, 30 minutes
Step 3: Convert to decimal hours: 8 + (30 / 60)→ 8.50 decimal hours

Total elapsed time is 8 hours and 30 minutes (8.50 decimal hours).

Example 2: Overnight Shift (10:15 PM to 6:45 AM)

Calculate hours for a night shift crossing midnight:

Step 1: Account for midnight transition: 22:15 = 1,335 min; 06:45 next day = 405 + 1,440 = 1,845 min→ 1,845 − 1,335 = 510 min
Step 2: Convert to hours and minutes: 510 / 60 = 8 hours, 30 minutes→ 8h 30m

Total overnight duration is 8 hours and 30 minutes (8.50 decimal hours).

Assumptions & Edge Cases

  • Midnight Crossing Assumption: When the end time is numerically earlier than the start time, the calculator assumes the event concluded on the following calendar day within a 24-hour cycle.
  • Unpaid Meal Breaks: This tool calculates gross elapsed clock time. To automatically deduct lunch breaks and sum a multi-day weekly schedule, use our dedicated Working Hours Calculator.

Frequently Asked Questions

How do I convert minutes to decimal hours for timesheets?

Divide minutes by 60. Common equivalents: 15 min = 0.25 hrs, 30 min = 0.50 hrs, 45 min = 0.75 hrs.