Duration Between Two Timestamps
Give two instants and get the interval between them, expressed in units you can actually reason about rather than a raw difference in seconds.
This page opens in duration mode.
What this answers
How long a job ran between its start and end log lines. How stale a cached record is. How much time elapsed between a request and the error it produced. All questions where the two endpoints are epoch values and the answer needs to be human-readable.
Both endpoints can be epoch values or dates, and mixing the two is fine - enter whichever form you have.
Elapsed time is not calendar arithmetic
A duration in seconds is exact. Expressing it in months is not, because months have different lengths, and expressing it in days across a daylight saving boundary is not either - one local day that year is 23 or 25 hours long.
For anything that must be precise, work in the raw difference and convert to larger units only for display.
Leap seconds are already ignored
Unix time defines every day as exactly 86400 seconds, so a leap second repeats a value rather than incrementing. Durations computed from epoch values are short by however many leap seconds fell inside the interval - currently 27 in total since 1972. This matters for scientific timing and for essentially nothing else.
Negative durations mean reversed inputs
A negative result simply means the second instant precedes the first. That is often correct and occasionally a signal that two log lines were written by machines whose clocks disagree.
Clock skew of a few seconds between hosts is normal; a skew of minutes usually means NTP is not running somewhere.