Categories
Duration Calculator
Calculate the duration between two dates/times in days, hours, minutes, and seconds.
Overview
- Enter two date/times (start and end), and calculates the difference both as a breakdown in days/hours/minutes/seconds and as totals in each unit.
- Calculates based on the elapsed milliseconds between the two date/times without considering the calendar, so leap years and differing month lengths are reflected as-is in the elapsed time.
- Works even if the end date/time is before the start; in that case the absolute value (magnitude of elapsed time) is shown.
Usage
- Enter a date/time into both "Start date/time" and "End date/time" (ISO 8601 format is recommended).
- Click "Calculate".
- The breakdown in days, hours, minutes, and seconds, along with totals in each unit, is displayed.
Example
Input
Start: 2026-01-01T00:00:00Z / End: 2026-01-03T05:30:15Z
Output
2d 5h 30m 15s
Use Cases
- Calculating elapsed or remaining days from a project's start and end dates
- Precisely determining an event's duration down to the minute and second, from its start and end times
- Checking the difference between two timestamps, such as a processing time recorded in a system log
FAQ
Can I calculate even if the end date/time is before the start?
Yes. In that case the absolute value (magnitude of elapsed time) is shown, with a note indicating this.
Does it account for varying month lengths across month/year boundaries?
This tool does not consider the calendar; it simply calculates based on the elapsed milliseconds between the two date/times. Leap years and differing month lengths are reflected as-is in the elapsed time.
How is a date/time without a timezone interpreted?
It follows JavaScript's date parsing rules. An ISO 8601 string without a timezone (e.g. 2026-01-01T00:00:00) is interpreted in the browser's local timezone, so append "Z" if you want it treated as UTC.
Notes
- An ISO 8601 string without an explicit timezone (e.g. 2026-01-01T00:00:00) is interpreted in the browser's local timezone. Append "Z" if you want it treated as UTC.
- The calendar is not considered. This is a simple difference based on elapsed milliseconds, not a calendar-aware calculation like "1 month".
- The calculation result exists only on the page and is lost on reload, so copy and save it if you need to keep it.
Related Tools
Calculate exact age, days since birth, and days until the next birthday from a birth date and a reference date.
Convert a date and time to ISO 8601, RFC 2822, a custom format, and more.
Convert a date and time to a different timezone.