Skip to content
Tools

Duration Calculator

Measure the time between two dates in every useful unit.

Local

What this tool does

This tool measures the time between two dates or date-times. It gives a readable breakdown, the ISO 8601 duration, and the total expressed in seconds, minutes, hours, days and weeks.

Accepted formats

Enter a date as 2026-11-25 or a date and time as 2026-11-25 09:00 (or an ISO 8601 string). The order does not matter: the result is the absolute distance between the two moments.

Why testers reach for it

Timeouts, SLAs, cache lifetimes and token expiry are all durations, and asserting on them means knowing the exact number of seconds or the ISO form a system expects. This gives you both without arithmetic by hand.

Common use cases

  • Converting a gap between two timestamps into seconds for an assertion.
  • Producing an ISO 8601 duration such as PT1H30M.
  • Checking an elapsed time from a log against an expected limit.

Frequently asked questions

Which formats can I enter?
A date like 2026-11-25, a date and time like 2026-11-25 09:00, or an ISO 8601 string. The order of the two does not matter.
What is the ISO 8601 output?
The duration in the P…T… form, for example P1DT1H30M, which many APIs expect.

Learning resources

Testsmith also runs hands-on courses and a free practice app for the skills behind this tool.

Feedback welcome

Found a bug in this tool, or want it to do something it does not? Tell us and we will take a look.