← All calculatorsDate & Time

Date Difference Calculator

Counts the exact interval between two dates in total days, in weeks, and as a calendar breakdown of years, months and days.

Total days
243
Calendar breakdown
0y 8m 0d
Weeks
34 weeks 5d
Hours
5,832

How to use the Date Difference Calculator

  1. Enter the earlier date in the start field.
  2. Enter the later date in the end field; reversing them simply gives a negative total.
  3. Read the total days for anything contractual or interest-related.
  4. Read the years-months-days breakdown for anything expressed in human terms.
  5. Use the hours figure when an interval crosses into scheduling or billing.

How the calculation works

The total-days figure is computed by converting both dates to a millisecond count at UTC midnight and dividing the difference by the length of a day. Working in UTC deliberately sidesteps daylight saving: in a local time zone, two of the days each year are 23 or 25 hours long, and a naive subtraction can be off by one whole day near those transitions.

The calendar breakdown is a different calculation and is deliberately not derived from the day count. Months vary between 28 and 31 days, so 'one month' has no fixed length. The breakdown subtracts years first, then months, then borrows days from the preceding month when needed — the same convention used for ages, tenancy terms and notice periods.

The two answers do not always reconcile the way people expect, and that is correct rather than a bug. From 31 January to 28 February is 28 days but also 'one month' under the borrowing convention. Contracts avoid the ambiguity by specifying which basis applies: legal and financial documents almost always define terms in days, precisely because months are elastic.

Formula
days = (UTC(end) − UTC(start)) / 86,400,000; calendar difference computed by successive year, month and day borrowing

Source: Proleptic Gregorian calendar per ISO 8601:2019; UTC day length per BIPM.

Worked example

A 90-day payment term starts on 15 March 2026. When does it fall due, and how long is that in calendar terms?

  1. Enter 2026-03-15 as the start and 2026-06-13 as the end.
  2. Total days: 90.
  3. Calendar breakdown: 0 years, 2 months, 29 days.
  4. Weeks: 12 weeks and 6 days.

90 days lands on 13 June 2026 — nearly three calendar months, which is why '90 days' and 'three months' are not interchangeable in a contract.

Frequently asked questions

Is the end date counted?+

No. The result is the interval between the two dates, so 1 January to 2 January is one day. Add one if you need an inclusive count of days occupied.

Are leap years included?+

Yes, automatically. Any 29 February inside the range is counted as a real day.

Why is the months figure sometimes odd?+

Because months have different lengths. Moving from a 31-day month into a 30-day one requires borrowing, and the convention affects the day remainder.

Does daylight saving affect the count?+

Not here — the calculation runs in UTC specifically so that clock changes cannot shift the total.

Last reviewed August 31, 2026. We review this page whenever the underlying formula, tax year, published rate or standard changes.

Related

More in Date & Time