Skip to main content
ToolsHub

Duration Calculator

Enter a start and end date-time to get the precise duration broken down into days, hours, minutes and seconds — and as a total in each unit.

Updated

Files never leave your browser

No duration yet

Enter a start and end date-time to measure the duration.

How to use Duration Calculator

The Duration Calculator measures the precise length of time between two moments, each given as a date and a time of day. Unlike a date-difference tool that works in whole days, this one counts down to the second, which matters whenever the hours and minutes are part of the answer — shift lengths, event durations, processing times, or the gap between two timestamps. It presents the result two ways: as a readable breakdown of years, days, hours, minutes and seconds, and as a single total in each unit, so you can copy whichever figure your task needs.

  1. Enter the start date and time.
  2. Enter the end date and time.
  3. Read the breakdown of the duration.
  4. Use the totals row for a single-unit figure.
  5. Adjust either moment to recalculate.

Your data never leaves your device — 100% private processing.

Breakdown versus totals

A duration can be described in two complementary ways, and this calculator shows both. The breakdown splits the elapsed time into a hierarchy — years, then leftover days, then hours, minutes and seconds — which reads naturally, as in "2 days, 3 hours and 15 minutes". The totals express the entire duration in one unit at a time: the same gap might be 51 hours, or 3,075 minutes, or 184,500 seconds. Totals are what you need when feeding a figure into a timesheet, a billing system, or a script, whereas the breakdown is easier for a human to grasp. Because the calculator includes the time of day in both inputs, the result reflects partial days correctly, which a date-only tool cannot do.

Two views of one duration
ViewExample
Breakdown2d 3h 15m 0s
Total hours51
Total minutes3,075
Total seconds184,500

How the duration is measured

Internally the calculator converts each date-time you enter into a single instant and subtracts one from the other, giving the gap in milliseconds. That raw gap is then divided down into total seconds, minutes, hours and days for the totals row, and separately decomposed into the years-days-hours-minutes-seconds breakdown. Because it works from the absolute instants, the order of your two inputs does not matter — the duration is always reported as a positive length. One simplification worth knowing: the years figure in the breakdown treats a year as 365 days, so durations spanning leap years may differ by a day from a strict calendar count. For sub-year measurements, which is what most timing tasks involve, the result is exact to the second.

Worked examples

Shift length

Inputs: 09:00 to 17:30 same day

Result: 8h 30m · 510 total minutes

Multi-day gap

Inputs: Mon 08:00 to Wed 11:00

Result: 2d 3h · 51 total hours

Glossary

Duration
The length of time between two instants.
Date-time
A date combined with a time of day, down to the minute or second.
Elapsed time
The amount of time that has passed between a start and end.
Total seconds
The whole duration expressed as a single number of seconds.
Breakdown
A duration split into years, days, hours, minutes and seconds.

Related reading

Free · No spam

Get weekly tool tips & updates

New tools, power-user tips, and productivity hacks — delivered free every Friday.

No spam, ever. Unsubscribe with one click.

Related Date & Time

Explore all Date & Time.