duration.tools

Unix Epoch Interval Calculator

The exact span between two timestamps.

Free, no sign-upRuns in your browser — nothing is uploadedUpdated

A → 2025-01-01 00:00:00 UTC
B → 2025-07-22 00:00:00 UTC
Interval
202 d 0 h 0 min 0 s
17,452,800 seconds
Seconds
17,452,800
Minutes
290,880
Hours
4,848
Days
202
Weeks
28.86
hh:mm:ss
4848:00:00

Two epoch timestamps from a log file: how far apart are they? Paste them in seconds or milliseconds (auto-detected by magnitude) and get the interval as a full breakdown, plus each timestamp decoded to a human date.

Common intervals in Unix time

IntervalSecondsMilliseconds
1 minute6060,000
1 hour3,6003,600,000
1 day86,40086,400,000
1 week604,800604,800,000
30 days2,592,0002,592,000,000
365 days31,536,00031,536,000,000

Subtracting Unix timestamps

Because Unix time is a plain count of seconds since 1 January 1970 UTC, the interval between two timestamps is just their difference. 1767225600 − 1767139200 = 86,400 seconds, which is exactly one day. Divide by 60, 3,600 or 86,400 to get minutes, hours or days.

Mixing units is the classic bug: JavaScript's Date.now() and Java's System.currentTimeMillis() return milliseconds (13 digits today), while most Unix tools, databases and Python's time.time() use seconds (10 digits).

Time zones and leap seconds

Unix timestamps are always UTC, so the difference between two of them never depends on time zones or daylight saving. Leap seconds are ignored by definition — every Unix day is exactly 86,400 seconds — which keeps interval math simple.

Systems that store timestamps as signed 32-bit integers overflow at 2,147,483,647, which is 03:14:07 UTC on 19 January 2038.

How to use it

  1. 1.Paste two Unix timestamps (seconds or milliseconds).
  2. 2.Check the decoded UTC dates shown for each.
  3. 3.Read the interval as a breakdown and in every unit.

Questions people ask

How does it tell seconds from milliseconds?
By magnitude: 13-digit values are milliseconds, 10-digit are seconds. Timestamps near the boundary (before 2001 in ms) can be forced with the unit toggle.
What is Unix time?
Seconds elapsed since 1970-01-01 00:00:00 UTC, not counting leap seconds. It's the timestamp format of most logs, databases, and APIs.
How many seconds are in a day in Unix time?
Always 86,400. Unix time ignores leap seconds, so every day has the same length and dividing an interval by 86,400 gives exact days.