Date difference calculator
Find exactly how far apart two dates are — for counting down to a deadline, working out a notice or probation period, tracking a project span, calculating an invoice date range, or settling how long ago something happened. Enter a start date and an end date and the calculator shows the gap as a total number of days, weeks, and hours, plus an exact years-months-days breakdown.
How it works
Both dates are normalised to midnight in your local time zone so a partial day at either end does not distort the count. The total days is the millisecond gap divided by the number of milliseconds in a day, floored to a whole number. Weeks are that figure divided by seven, rounded down to complete weeks. Hours are days multiplied by twenty-four. The calendar breakdown (years, months, days) subtracts each component in order, borrowing the length of the preceding month when the day subtraction would go negative — the same logic a human would use when counting on a calendar.
The order of dates never matters: the tool always measures from the earlier to the later date and simply flags whether the end date is before or after the start date.
When the calendar breakdown differs from what you expect
Month lengths are unequal, so the years-months-days view can look surprising. For example, a gap from 31 January to 1 March is only 29 days (or 28 in a non-leap year), but the calendar breakdown reads “1 month 1 day” because February was borrowed at its full length. The total-days figure is always exact; the calendar view is a human-readable interpretation that follows the same rules a calendar app would use.
Common uses
- Employment and contracts: counting the days between a start date and an end date for a fixed-term contract or probationary period
- Project planning: measuring the length of a sprint or phase in days and weeks
- Legal and financial: calculating the number of days an invoice has been outstanding, or the gap between two notice dates
- Personal milestones: finding out how many days are between two birthdays, anniversaries, or events
Worked example
From 1 January 2026 to 30 May 2026:
| Measurement | Value |
|---|---|
| Calendar breakdown | 0 years, 4 months, 29 days |
| Total days | 149 |
| Complete weeks | 21 (with 2 days remaining) |
| Total hours | 3,576 |
The gap crosses no leap day here because 29 February 2026 does not exist (2026 is not a leap year), so the day count is a straight 149. For date ranges that do cross a 29 February, that day is included automatically in the total-days count.
Everything runs entirely in your browser — nothing is uploaded.