Skip to content

Date Difference Calculator: Days, Weeks, Months Between Dates

Years, months and days between two dates, plus total days, weeks and months, counted both ways.

Inputs

Difference
2 years, 7 months, 29 days

Use this calculator on your own site

Free embed

  • Two lines of HTML, unlimited views
  • Shows a small CalculateEveryday bar, with a credit link under the calculator

What each Date Difference input means

Start date
The earlier date. If you enter the later one here by mistake, the page swaps them and says so.
End date
The later date. The total counts the days from the start date's midnight to this one's; a second line adds one for counts that include both ends.

Date Difference formula

calendar span = later − earlier in years, months, days (borrowing) · total days = days between the two midnights · inclusive = total + 1

There are two honest answers to 'how long between these dates', and the page gives both. The calendar answer counts whole years, then whole months, then the days left over — borrowing the length of the previous month when the end day is smaller than the start day, the way you would count on a wall calendar. The flat answer counts days: from one midnight to the other, which is what interest, notice periods and countdowns use. If you need to count both the first and the last day — a hotel stay counted in days, or a contract that says 'from and including' — add one; the page shows that figure too. Leap years are handled because the count uses the real calendar.

Date Difference worked example

From 1 January 2024 to 30 August 2026 is 2 years, 7 months and 29 days. As a flat count it is 972 days — 2024 alone has 366 because it is a leap year — which is 138 weeks and 6 days, or 973 days if both the first and last day are counted.

More Date Difference examples

From Sunday 15 March to Friday 2 October 2026: 0 years, 6 months, 17 days on the calendar, or 201 days flat — 28 weeks and 5 days, and 202 days counting both ends.

From 31 January to 28 February 2026 the result is 0 years, 0 months, 28 days: February has no 31st, so no whole month has passed, even though it is the last day of each month.

Where the Date Difference calculator can give the wrong answer

  • If the end date is before the start date the dates are swapped and the absolute difference shown, with a note.
  • Month lengths vary, so a 'month' in the calendar answer is not a fixed number of days: 31 January to 28 February is 0 months and 28 days, while 1 February to 1 March is 1 month.
  • Whether to count the last day depends on the use. A notice period 'of 30 days' usually counts like the flat figure; a stay 'from the 1st to the 5th inclusive' is 5 days.
  • Times of day are ignored. Use the hours calculator for a span inside one day.

Spotted a mistake? Tell us

Date Difference reference table

Days in each month, and the running total through the year
MonthDaysDay of the year at month endIn a leap year
January313131
February28 (29 in a leap year)5960
March319091
April30120121
May31151152
June30181182
July31212213
August31243244
September30273274
October31304305
November30334335
December31365366
Source: The Gregorian calendar

Date Difference FAQ

Enter both dates; the 'Total days' line is the count from the first midnight to the second. 1 January to 31 December in the same year is 364 — or 365 counting both days.