Date & Time

Date Difference Calculator

Find the years, months, weeks and days between two dates, with or without the end date.

By Nitin Raturi · Last reviewed

Your dates

How to use the Date Difference Calculator

Find the years, months, weeks and days between two dates.

  1. Pick the start date.
  2. Pick the end date, or keep today.
  3. Choose whether to count the end date.
  4. Read the span in years, months and days, and the totals.

Good to know

  • Check the rule you need: some periods count both dates, others only the gap.
  • Your dates stay in your browser.

Whole calendar days only. Your dates stay in your browser and are never sent anywhere.

Start date

The first date of the period.

How to fill it in

  • Pick a date from the calendar, or type it in your browser’s date format.
  • Allowed range: 1 Jan 1900 to 31 Dec 2100.
  • If it is after the end date, the two are swapped.

Example

From 1 Jan 2026 to 3 Nov 2026 is 0 years, 10 months, 2 days.

End date

The last date of the period. It starts as today’s date on your device.

How to fill it in

  • Pick or type a date.
  • Use Today to go back to the current date.

Example

That period is 306 days, or 43 weeks and 5 days.

Count the end date

Count the end date

Whether the end date itself is counted as a day.

How to fill it in

  • No: the gap between the dates, as for age or a notice period from a date.
  • Yes: both dates counted, as for a hotel stay counted in days or a leave application.

Example

Counting the end date, the worked period is 307 days.

Tip: A month runs to the same date next month, or to the month’s last day: 31 Jan to 29 Feb 2024 is 0 years, 1 month, 0 days.

1 Jan 2026 to 3 Nov 2026

0 years, 10 months, 2 days

306 days: from Thursday to Tuesday.

Total days
306
Weeks
43 weeks, 5 days
Total months
10 months
Start
Thursday, 1 Jan 2026
End
Tuesday, 3 Nov 2026

Whole days in the Gregorian calendar; times and time zones are ignored. A month runs to the same date next month, or to that month’s last day when it is shorter.

How this calculator works

  1. Step 1Start1 Jan 2026A Thursday.
  2. Step 2Whole months10 monthsCounted to the same date in each later month.
  3. Step 3Days left2 daysFrom the last month mark to the end date.
  4. Step 4Total306 days43 weeks and 5 days.

The calculator counts whole calendar months from the start date, then the days left over. It also turns the period into total days, weeks and months.

Dates are handled as calendar days in the Gregorian calendar, so leap years are included and times or time zones never change the answer.

Worked example: 1 Jan to 3 Nov 2026

Years, months and days
Months
latest same-date month mark on or before the end
Days
end date − that month mark
  • SStart date 1 Jan 2026
  • EEnd date 3 Nov 2026
  1. Whole months1 Jan 2026 → 1 Nov 202610 months
  2. Days left1 Nov → 3 Nov 20262 days
  3. Total days1 Jan 2026 → 3 Nov 2026306 days

Counting both the first and last dates adds one day: 307 days, or 0 years, 10 months, 3 days.

Counting the end date or not

  • Gap between dates306 daysUse for ages, durations and "days since".
  • Both dates counted307 daysUse when the first and last days both count, such as leave taken.

The right choice depends on the rule you are applying. A notice or contract usually says whether the first or last day is included; follow its wording.

Month ends and leap years

A month runs to the same date next month, or to that month's last day when the date does not exist.

From 31 Jan 2024, one month reaches 29 Feb 2024, so that period is 0 years, 1 month, 0 days. One more day, to 1 Mar, is 0 years, 1 month, 1 day.

From 29 Feb 2000 to 28 Feb 2001 is 1 year, 0 months, 0 days: in a year without 29 Feb, the anniversary falls on 28 Feb.

Read the result

The headline is years, months and days; the table adds total days, weeks, months and both weekdays.

If the end date is earlier than the start date, the two are swapped and the result says so. The span itself is the same either way.

Assumptions and limits

  • Gregorian calendarDates from 1 Jan 1900 to 31 Dec 2100, with leap years.
  • Whole daysTimes of day and time zones are ignored.
  • Month ruleShort months move the month mark to their last day.
  • TodayThe end date starts as the date on your device.

For working days with weekends and holidays removed, use the working days calculator instead.

Counting days is one calendar question. Working days, ages and future dates have their own tools.

To leave out weekends and holidays, use the working days calculator. The age calculator gives an exact age, and the add or subtract dates calculator finds a date some days away.

Common mistakes

  • Mistake: Counting both dates when only the gap is needed.

    Instead: Choose whether the end date counts before you read the total.

  • Mistake: Treating every month as 30 days.

    Instead: Use calendar months, which run from 28 to 31 days.

  • Mistake: Forgetting leap years over long periods.

    Instead: Let the calculator count each 29 Feb in the range.

Checking the method

Every golden case is rechecked with Python's datetime library and a separate month-by-month walk.

The calculator reuses the tested calendar functions from the age calculator. An independent script recomputes every case with Python’s date arithmetic.

Read how we test our calculators, or browse more everyday tools.

Frequently asked questions

How many days are there between two dates?

Subtract the start date from the end date in whole days. 1 Jan 2026 to 3 Nov 2026 is 306 days.

Should I include the end date?

Include it when both the first and last days count, such as leave taken. The worked period then becomes 307 days.

How are months counted?

A month runs to the same date next month, or to the month’s last day when that date does not exist. 31 Jan to 29 Feb 2024 is 0 years, 1 month, 0 days.

What if the end date is before the start date?

The calculator swaps them and tells you. The span is the same either way.

Does the time of day or time zone matter?

No. The calculator counts whole calendar days only.

Sources and methodology

The formulas are standard time-value-of-money results. We check every figure against golden values worked out independently, by closed form and by month-by-month simulation; see the methodology.

Written and maintained by Nitin Raturi, a software engineer (about the author). Last reviewed 3 Nov 2026; next review due by . Found an error? Tell us.

Changelog

  • : Initial release.