DevToolbox

Free Online Time Difference Calculator

Calculate the exact difference between two dates or times, and convert datetimes across timezones. Free online tool — no signup, works in your browser.

100% Client-Side · Your data never leaves your browser

How to Use Time Difference Calculator

The tool has two tabs: Date Difference for calculating the time between two datetimes, and Timezone Converter for translating a datetime across world timezones.

  • Date Difference tab: Select a start and end date/time using the datetime pickers. Click Calculate or press Ctrl/Cmd+Enter. The result shows total days, hours, minutes, and seconds, plus a human-readable breakdown. Use the swap button (↔) to reverse start and end instantly.
  • Timezone Converter tab: Enter a datetime (or leave empty for "now"). Select a specific target timezone from the dropdown, then click Calculate. The World Clock panel shows the same moment in UTC, New York, London, Tokyo, and Sydney simultaneously. The highlighted card shows your selected target timezone.

Keyboard shortcuts: Ctrl/Cmd+Enter to calculate, Ctrl/Cmd+K to clear all inputs.

Frequently Asked Questions

What is the difference between a date difference and a datetime difference?

A date difference counts only whole calendar days between two dates, ignoring time. A datetime difference is precise to the second (or millisecond) and accounts for the time-of-day component. This tool uses datetime-local inputs so you get precision down to the minute; the breakdown shows days, hours, minutes, and seconds.

How does the tool handle Daylight Saving Time (DST)?

The Date Difference tab uses local datetime-local inputs (browser local time). The Timezone Converter tab uses dayjs with the timezone plugin, which correctly handles DST transitions for all IANA timezone names. For example, a 24-hour period crossing a DST boundary in America/New_York will show the correct UTC offset change.

What happens if the end date is before the start date?

The tool still calculates the difference and displays it as a positive value. An amber direction indicator shows when the end date/time is in the past relative to the start — useful when you want to calculate how long ago something happened.

Can I calculate business days between two dates?

This tool calculates total calendar days, not business days (it does not exclude weekends or holidays). Business day calculation depends heavily on locale and holiday calendars, so we recommend a dedicated payroll or scheduling tool for that purpose.

What date/time format should I use for input?

The tool uses HTML datetime-local inputs, which accept dates and times in your browser's local format. Internally these are handled as ISO 8601 values (YYYY-MM-DDTHH:MM). The Timezone Converter also accepts ISO 8601 strings directly. You can leave inputs empty to use the current time.

What timezone names are supported in the Timezone Converter?

The tool uses IANA timezone names such as America/New_York, Europe/London, Asia/Tokyo, and Australia/Sydney. These are the standard names used by the Intl API and IANA tz database. Over 30 common timezones are listed in the selector.

How accurate is the time difference calculation?

The calculation is accurate to the millisecond using dayjs. The human-readable summary (e.g. '3 years, 2 months, 5 days') uses approximate month lengths (30.44 days) for the breakdown display, so it may differ slightly from calendar-exact month counting.

Related Tools