complete.tools

Days Between Dates Calculator

Count the days between two dates, with the gap also shown in weeks and in years, months and days, and an option to count both end dates.

What this tool does

Count the days between two dates, with the gap also shown in weeks and in years, months and days, and an option to count both end dates. You fill in these fields: Start date and End date. Tick boxes adjust the calculation. It shows days between the dates; weeks and days; and years, months and days.

Inputs

  • Start date: A date.
  • End date: A date. Starts as today's date. Defaults to today. Change it to count to another day.
  • Count both the start and the end date: A tick box, off to start. Off: Feb 1 to Feb 10 is 9 days. On: it is 10 days, because both dates are counted.

How to use

  1. Pick a date for "Start date".
  2. Pick a date for "End date".
  3. Tick "Count both the start and the end date" if it applies.
  4. Read the result: days between the dates; weeks and days; and years, months and days. It appears once every required field has a valid value.

Worked examples

Example 1. Inputs:

  • Start date: January 1, 1990
  • End date: March 15, 2000
  • Count both the start and the end date: No

Results:

  • Days between the dates: 3,726 days
  • Weeks and days: 532 weeks, 2 days
  • Years, months and days: 10 years, 2 months, 14 days

How this is worked out: 1990-01-01 + 10 years = 2000-01-01; + 2 months = 2000-03-01; + 14 days = 2000-03-15. Days: 10 * 365 + 2 leap days (1992, 1996) = 3652 to 2000-01-01, then 31 + 29 (2000 is a leap year) + 14 = 74, total 3726. Weeks = 3726 / 7 = 532 remainder 2 (532 * 7 = 3724). Total months = 10 * 12 + 2 = 122.

Example 2. Inputs:

  • Start date: March 1, 2024
  • End date: January 31, 2023
  • Count both the start and the end date: No

Results:

  • Days between the dates: 395 days
  • Weeks and days: 56 weeks, 3 days
  • Years, months and days: 1 year, 1 month, 1 day
  • Note: The end date is before the start date. The gap is shown as a positive number.

How this is worked out: Measured from the earlier date 2023-01-31: + 13 months = 2024-02-29 (clamped, 2024 is a leap year), + 14 months would be 2024-03-31, past the date, so 1 year 1 month; Feb 29 to Mar 1 is 1 day. Days: 2023-01-31 to 2024-01-31 is 365, to Feb 29 is 29 more, to Mar 1 is 1 more, total 395. The start is later, so the signed count is negative.

Example 3. Inputs:

  • Start date: June 15, 2023
  • End date: June 15, 2023
  • Count both the start and the end date: No

Results:

  • Days between the dates: 0 days
  • Weeks and days: 0 weeks, 0 days
  • Years, months and days: 0 years, 0 months, 0 days

How this is worked out: A date to itself is 0 days, so every part is 0 and the dates are not reversed. A date to itself with the box off is 0 days.

Example 4. Inputs:

  • Start date: February 28, 1900
  • End date: March 1, 1900
  • Count both the start and the end date: No

Results:

  • Days between the dates: 1 day
  • Weeks and days: 0 weeks, 1 day
  • Years, months and days: 0 years, 0 months, 1 day

How this is worked out: Gregorian leap-year rule: 1900 is divisible by 100 but not by 400, so it is not a leap year and February 1900 has 28 days. Feb 28 to Mar 1 is 1 day.

Where this comes from

Count the days between two dates. The number of calendar days from the earlier date to the later one, not counting the first day unless both end dates are asked for. The same gap is split into whole weeks and leftover days, and into whole months and leftover days counted forward from the earlier date, stopping at the end of a shorter month. Source: The Gregorian calendar: month lengths and the leap year rule (every fourth year, except century years not divisible by 400).

Limitations

  • Counts whole calendar days only, including weekends and holidays. Time of day and time zones are not considered.
  • Accepts dates from year 0001 to 9999 in the Gregorian calendar, which is also used for dates before it was adopted.
  • The months in the years, months and days split are calendar months, so they do not always match days divided by 30.
  • Today's date is read from your device when the page opens.

FAQs

Q: Does the count include the start date?
A: Not by default. The start day is day zero, so February 1 to February 10 is 9 days and a date to itself is 0 days. Where the page offers the option to count both the start and the end date, ticking it gives 10 days and 1 day.
Q: What if the end date is before the start date?
A: The gap is the same either way and is shown as a positive number of days, measured from the earlier date to the later one. A note says the dates are reversed.
Q: How are years, months and days worked out?
A: Whole months are counted forward from the earlier date. If a month would land on a day that does not exist, it stops at the end of that month. So January 31 to March 1 is 1 month and 1 day.
Q: Are leap years counted?
A: Yes. The count uses real calendar days, so February 29 is counted in leap years.

Explore Similar Tools

Explore more tools like this one: