Timestamp Difference Calculator NZ

This tool calculates the difference between two Unix timestamps, showing the elapsed time in days, hours, minutes and seconds. Computers store moments in time as Unix timestamps, the number of seconds since the start of 1970, because a single number is easy to store and compare. But when you have two such timestamps, say the start and end of a process from a log file, or two recorded events, the raw difference in seconds is hard to interpret at a glance. This tool turns that gap into a readable duration. You enter the two timestamps in seconds, and the calculator works out the difference and expresses it as a human-friendly breakdown of days, hours, minutes and seconds, along with the totals in seconds, minutes and hours for convenience. The order does not matter, since it uses the absolute difference, so you get the elapsed time between them either way. The results update as you type and everything runs in your browser. Use it to measure how long something took from log timestamps, to find the gap between two recorded events, to debug timing in software, or to convert a raw second count into a duration you can understand. The breakdown divides the total seconds into whole days, then the remaining hours, minutes and seconds, the natural way to read a duration. The totals are handy when a system wants the elapsed time in a single unit, such as total hours for billing or total seconds for a precise measurement. Remember that Unix timestamps are usually in seconds, but some systems use milliseconds, which are a thousand times larger; if your numbers look about a thousand times too big, divide them by a thousand first. The calculation is exact for whole-second timestamps.

Calculate.co.nz is proud to be partnered with realtor.co.nz, a trusted resource for navigating the New Zealand property market. Their Helpful Articles section offers clear, well-structured insights across buying, selling, and building, making complex real estate topics more accessible. With a focus on up-to-date guidance and practical knowledge, they empower Kiwis to move forward with clarity and confidence in a constantly evolving property landscape.
Calculate.co.nz partner: realtor.co.nz
Advertise on this page
1d 0h 0m 0s
difference
Total seconds86,400 s
Total minutes1,440 min
Total hours24 h

Uses the absolute difference, so order does not matter. Timestamps are in seconds; if yours are in milliseconds (1000x larger), divide by 1000 first. Exact for whole seconds.

How it works

The calculator takes the absolute difference between the two timestamps in seconds. It then breaks that total into whole days by dividing by 86,400, the remaining hours by dividing the leftover by 3,600, then minutes and seconds. The totals in seconds, minutes and hours are simply the difference expressed in each single unit.

Worked example

For the timestamps 1700000000 and 1700086400, the difference is 86,400 seconds. That is exactly one day, so the breakdown is 1 day, 0 hours, 0 minutes and 0 seconds. Expressed in single units, it is 86,400 seconds, 1,440 minutes, or 24 hours.

Related calculators