Skip to main content
ilovecalcs logoilovecalcs.

Time · Live

Time Duration Calculator — Elapsed time and time arithmetic.

Two tools in one. Duration mode finds the exact elapsed time between any two clock times — handling midnight crossings and multi-day spans automatically. Add/Subtract mode offsets a starting time by any number of hours, minutes, and seconds. Supports both 12-hour and 24-hour (military time) formats.

How it worksReal-time

Time Calculator

Start Time

::

End Time

::

Duration

8h
0min
9:00:00 AM5:00:00 PM

Days

0

Hours

8

Minutes

0

Seconds

0

Total hours

8.00

decimal

Total minutes

480

min

Quick conversions

In decimal hours
8.00 hrs
In minutes only
480 min
In seconds only
28,800 s
Decimal → h:mm
8h 00m 00s

Time guide

How to calculate time durations and add or subtract time

Calculating elapsed time is more nuanced than subtracting two numbers — you need to handle the 60-minute hour, the 24-hour day, AM/PM conventions, and midnight crossings. This page covers the arithmetic manually and explains common real-world use cases: timesheets, shift work, and scheduling.

How to calculate the duration between two times

The simplest approach: convert both times to total minutes from midnight, then subtract.

Minutes from midnight = (hour × 60) + minute
Duration (min) = end minutes − start minutes

Example: How long from 9:15 AM to 4:45 PM?

9:15 AM = 9 × 60 + 15 = 555 minutes
4:45 PM = (12 + 4) × 60 + 45 = 16 × 60 + 45 = 1005 minutes
Duration = 1005 − 555 = 450 minutes = 7 hours 30 minutes

Handling midnight crossings

When the end time is earlier in the day than the start time (e.g., a night shift from 10:00 PM to 6:00 AM), simply add 24 hours (1440 minutes) to the end time before subtracting:

10:00 PM = 22:00 = 22 × 60 = 1320 minutes
6:00 AM = 6 × 60 = 360 minutes → add 1440 → 1800 minutes
Duration = 1800 − 1320 = 480 minutes = 8 hours

This calculator detects midnight crossings automatically when the end time is earlier than the start and shows a "crosses midnight" badge. For explicit next-day calculations (e.g., 9 AM today to 3 PM tomorrow), toggle "End time is next day."

12-hour vs 24-hour (military) time

The 24-hour clock (also called military time) runs from 00:00 (midnight) to 23:59, eliminating AM/PM ambiguity. It is the standard in healthcare, aviation, the military, and most of the world outside the US.

12-hour24-hourDescription
12:00 AM00:00Midnight
3:00 AM03:00Middle of the night
12:00 PM12:00Noon
1:00 PM13:00Early afternoon
5:30 PM17:30End of working day
10:45 PM22:45Late evening
11:59 PM23:59Last minute of the day

Quick conversion rule: For 1 PM–11 PM, add 12. For 12 AM, use 00. For 12 PM, keep 12. The calculator's format toggle converts all entered times instantly without losing the time value.

How to calculate hours worked (timesheet)

For payroll and timesheets, hours worked is the duration between clock-in and clock-out. If you take an unpaid break, subtract it separately.

Hours worked = (clock-out time − clock-in time) − unpaid breaks

Example: Clock in at 8:00 AM, clock out at 4:30 PM, 30-minute unpaid lunch:

Raw duration: 4:30 PM − 8:00 AM = 8h 30min
Less 30 min lunch: 8h 30min − 30min = 8 hours

Many payroll systems express time in decimal hours rather than hours and minutes. To convert:

Decimal hours = hours + (minutes ÷ 60)
Example: 7h 45min = 7 + 45/60 = 7.75 decimal hours

Adding and subtracting time

To add hours and minutes to a starting time, convert everything to total minutes, add, then convert back. Handle overflow (going past 23:59) by taking the total mod 1440.

Start: 10:45 PM (22:45) = 22 × 60 + 45 = 1365 min
Add: 3h 30min = 3 × 60 + 30 = 210 min
Total: 1365 + 210 = 1575 min
1575 mod 1440 = 135 min = 2h 15min = 2:15 AM (next day)

Decimal hours to hours and minutes

To convert decimal hours back to hours and minutes:

Hours = floor(decimal hours)
Minutes = round((decimal hours − floor(decimal hours)) × 60)
Example: 6.25 hrs → 6 hours, 0.25 × 60 = 15 min → 6h 15min
Decimal hoursH:MM equivalent
0.25 hrs0:15
0.50 hrs0:30
0.75 hrs0:45
1.50 hrs1:30
2.33 hrs2:20
7.75 hrs7:45
8.50 hrs8:30

Disclaimer

All calculations are based on clock-time arithmetic and assume a 24-hour day. Daylight saving time transitions, time zones, and leap seconds are not accounted for. For scheduling across time zones, use a dedicated world-clock or calendar tool.