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.
Time Calculator
Start Time
End Time
Duration
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.
Duration (min) = end minutes − start minutes
Example: How long from 9:15 AM to 4:45 PM?
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:
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-hour | 24-hour | Description |
|---|---|---|
| 12:00 AM | 00:00 | Midnight |
| 3:00 AM | 03:00 | Middle of the night |
| 12:00 PM | 12:00 | Noon |
| 1:00 PM | 13:00 | Early afternoon |
| 5:30 PM | 17:30 | End of working day |
| 10:45 PM | 22:45 | Late evening |
| 11:59 PM | 23:59 | Last 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.
Example: Clock in at 8:00 AM, clock out at 4:30 PM, 30-minute unpaid lunch:
Less 30 min lunch: 8h 30min − 30min = 8 hours
Many payroll systems express time in decimal hours rather than hours and minutes. To convert:
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.
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:
Minutes = round((decimal hours − floor(decimal hours)) × 60)
Example: 6.25 hrs → 6 hours, 0.25 × 60 = 15 min → 6h 15min
| Decimal hours | H:MM equivalent |
|---|---|
| 0.25 hrs | 0:15 |
| 0.50 hrs | 0:30 |
| 0.75 hrs | 0:45 |
| 1.50 hrs | 1:30 |
| 2.33 hrs | 2:20 |
| 7.75 hrs | 7:45 |
| 8.50 hrs | 8: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.