Date Difference Calculator

Find the exact time between two dates — years, months, days, hours, minutes and seconds, plus total counts in each unit. Leap years and month lengths handled correctly, all in your browser.

Difference (JSON)

About the date difference calculator

This tool measures the exact span between two points in time. Enter a start and an end date (or datetime) and it returns the duration two ways:

Everything runs locally in your browser. Nothing is uploaded to a server, and it works offline.

Accepted formats

You can mix and match these on either field:

How the breakdown is computed

Calendar units are counted by stepping the calendar forward, not by dividing a number of seconds. That means going from Jan 31 to Mar 31 is exactly 2 months (not "2 months and a few days"), and a span crossing Feb 29 in a leap year counts that extra day correctly.

FAQ

Does it handle time zones?

Dates are compared as wall-clock values. If you paste a timestamp with an offset (Z or +02:00), the offset is dropped and the local clock value is kept — so compare two timestamps in the same zone.

Why is the order-independent?

If you put the later date first, the magnitude is still reported as a positive duration, and the result is flagged so you know the end was before the start.

What's the difference between the breakdown and the totals?

The breakdown mixes units (years + months + days …); the totals each express the entire span in one unit. For example 8 days is "1 week and 1 day" in the breakdown, but "8" total days and "1" total week in the totals.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool date-diff "2024-01-15" 'end=2026-06-22T18:30:00'

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/date-diff/?start=2024-01-15&end=2026-06-22T18%3A30%3A00

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.