Datetime Calculator - Compute Differences and Add/Subtract Time

Two modes: "Difference" computes the gap between two datetimes in years, months, days, hours, minutes, and seconds; "Add/Subtract" adds or subtracts time units from a base datetime. No external libraries.

🔒
Client-Side & Privacy-First: Your data and files are never sent to any server. Everything is processed safely within your browser.

How to Use

  1. In the Difference tab, enter start and end datetimes to automatically compute the gap
  2. Results show a breakdown in years, months, days, hours, minutes, and seconds, plus totals
  3. In the Add/Subtract tab, set a base datetime, operation, value, and unit
  4. The result is computed automatically as you configure the options

Usage Examples

Days until a deadline:
Set today as start and the deadline as end to instantly see the remaining days.
Date 30 days from now:
Add 30 days to today's datetime to find the target date.
Employment duration:
Calculate years and months of employment from the hire date to today.

FAQ

How is "month" calculated?
365.25 days = 1 year and 30.44 days = 1 month are used as approximations. Minor inaccuracies may occur.
Can I specify seconds?
Yes. The datetime-local field accepts seconds.
Can I calculate past dates?
Yes. If the end datetime is before the start, the result is shown with a minus sign.
Is data sent to a server?
No. Everything runs in the browser.
Is timezone taken into account?
The browser's local timezone is used.

Related Tools

Update History

Last Updated: 2026-02-20

  • 2026-02-20 Initial release