Back to Finance & Business

Time Duration Calculator

Get the exact duration between two dates or times, broken down into days, hours, minutes, and seconds.

● Live Preview
Duration
0
Total
Days
1
Total
Hours
60
Total
Minutes
3,600
Total
Seconds

Input

Results

Days / Hours / Minutes / Seconds0d 1h 0m 0s
Total Days0
Total Hours1
Total Minutes60
Total Seconds3,600

</> Formula

calculation
duration_ms = |end − start| days = floor(ms / 86_400_000) hours = floor((ms mod day) / 3_600_000) min = floor((ms mod hour) / 60_000) sec = floor((ms mod minute) / 1_000)

Explanation

Click Explain for a plain English summary of how this works.

FAQ

Does this handle dates in the past?▾

Yes. If end is before start the duration is shown with a minus sign, but the totals are still accurate.

Are seconds included?▾

The datetime picker is minute-precision, so the seconds field will read 0 unless your browser exposes seconds.