How to use the timestamp diff calculator
- Enter Start (date or Unix timestamp), for example
2026-01-01T00:00:00Zor1700000000. - Enter End (date or Unix timestamp) in either form.
- Pick a Time zone if either value is a date without
Zor an offset. UTC is the default. - Read the Difference, Compact and ISO 8601 duration results, then the Total table. If the end is before the start, every value is negative.
What it does and when to use it
Use it to check how long a job or incident lasted from two log lines, or to find a token’s lifetime from its iat and exp claims. The calendar view suits people; the totals are what you put into code.
To convert a single timestamp to a date, use the Unix timestamp converter. To turn a raw number of milliseconds into readable text, use the duration humanizer. For counting working days rather than elapsed time, use business days between dates.
How it works
Each input is parsed into a moment in milliseconds:
- Numbers are Unix timestamps, with the unit detected by size.
- Dates of the form
YYYY-MM-DDorYYYY-MM-DDTHH:mm[:ss]without an offset are read in the chosen time zone, including daylight-saving changes. - Other date strings with
Zor an offset go to the browser’s date parser.
The exact difference is end minus start. For the calendar line, whole months are added to the earlier moment (counted in UTC, with month ends clamped). The rest is split into days, hours, minutes and seconds. Everything runs in your browser.
Worked examples
1 January to 15 March 2024, 12:30 UTC. February 2024 has 29 days:
Difference: 2 months, 14 days, 12 hours, 30 minutes
Compact: 74d 12h 30m
ISO 8601 duration: P74DT12H30M
Days | 74.520833
Two Unix timestamps in seconds, 1700000000 and 1700086400:
Difference: 1 day
Seconds | 86,400
A daylight-saving day. Noon to noon on 28–29 March 2026 in Europe/London crosses the spring change, when the clocks go forward:
Difference: 23 hours
Start | 2026-03-28T12:00:00.000Z | 2026-03-28T12:00:00+00:00
End | 2026-03-29T11:00:00.000Z | 2026-03-29T12:00:00+01:00
Limits and tips
- Calendar parts are counted in UTC. Near a DST change, the Difference line can say “23 hours” where a person would say “1 day”. The totals are always exact.
- Use ISO dates.
04/01/2026is read differently by different parsers; write2026-04-01.
Frequently asked questions
How does it tell seconds from milliseconds?
What does the Time zone menu change?
Why is 31 January to 28 February "1 month"?
Why does the ISO duration show days instead of months?
Can I type "yesterday" or "next Friday"?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.