pythonrequests

CalculatorsDates

Date difference calculator

Days, weeks, months and years between two dates.

Difference

—

Total days

—

Total weeks

—

Total months

—

Requirements used

  • Days
  • Weeks
  • Months

Everything runs in your browser. Your files are never uploaded.

Frequently asked questions

Is the end date included?

No. The total is the number of midnights between the dates, so 1 Jan to 2 Jan is 1 day. Add 1 if you want to count both dates.

What if the start date is later than the end date?

The dates are swapped automatically and a note tells you so, so the result is never negative.

How is the years, months and days result worked out?

Whole months are counted first, clamped to the end of shorter months, then the remaining days.

Does it account for leap years?

Yes. The calculation uses the real calendar, including 29 February.