When to use: Timestamp difference calculator
Compare system records and find the interval between instants represented by Unix timestamps.
How to use
Enter both timestamps and select each unit: seconds, milliseconds or automatic. The units may differ.
How the calculation works
Unix timestamps measure time since 1 January 1970 at 00:00 UTC. Seconds are multiplied by 1000; milliseconds are used directly. The result identifies the unit used for each input.
Worked example
With both in milliseconds, 0 and 1000 differ by 1 second. With the start in seconds and end in milliseconds, 1716508800 and 1716595200000 differ by 24 hours.
Limitations and precautions
Automatic treats magnitudes of at least 100,000,000,000 as milliseconds and smaller values as seconds. Select the unit explicitly to avoid ambiguity, especially near 1970. The end cannot precede the start.
Frequently asked question
Does the time zone change the difference?
No. A timestamp represents an instant. Time zones change its clock display, but not the interval between timestamps.
Checking logs with different units
One system may log seconds and another milliseconds. Between 1 second and 2000 milliseconds after the Unix epoch there is only a 1-second gap, not 1999 seconds. Choose each input’s unit before comparing. Input order does not change the displayed absolute duration; to identify the earlier event, compare the normalised values.
If your records are dates and clock times rather than Unix numbers, use Date difference calculator.
Method and examples reviewed: 12 October 2026.
Continue with Convert a timestamp to a date or read how the tools work.