Simple Time Calculator

This is a simple calculator to add or subtract 2 time values. This one has minimal bloat and runs locally in JavaScript, so it is not hampered by slow network connections. I created this because I often need to know how much time is between entries in log files. The result will auto-update whenever the inputs are changed, or an update can be forced with the ‘=’ button.

 


 





“XX:YY” represents:

Times can be entered as strings, or through separate components.
String values can be an integer representing seconds, or one of the formats “HH:MM” (or “MM:SS” depending on the above toggle), “HH:MM:SS”, or “Dd HH:MM:SS”, with SS seconds, MM minutes, HH hours, and D days. These formats can be followed by an AM or PM designation, and all can be preceded by a minus sign to represent a negative value (past).

Enabling one of the ‘hourglass’ ⏳ checkboxes will enable live updating, as if clicking the adjacent ‘now’ button every second.
12:00:00 AM is considered to be midnight and 12:00:00 PM to be noon.
The calculator allows entering nonstandard time designations like 25:72:60.

◆ Other calculators: File sizesVideo bitrate

Calculate deltas between a list of dates / times

If you have a bunch of server log lines and want to know how much time elapsed between each line, this tool will be more practical than the calculator above. Just paste the list of dates in the first field, hit the ‘Compute’ button to process it all in batch mode, and view the deltas in the second field. The last value is the cumulative time difference.
This has some flexibility regarding date formats, and if the timestamp matches certain common formats, you can paste full log lines, and times will be automatically extracted. Enabling the ‘[stamp]’ checkbox enforces only looking for times in between [brackets].
In case results seem incorrect due to ambiguity between D/M/Y and M/D/Y formats, enabling the ‘swap’ checkbox might help.

 

©2023-2025 Alexander Thomas