Calendar Date Difference

Choose dates with the native date control, or type in the format shown by your browser. Dates are read as YYYY-MM-DD (year-month-day). Gregorian calendar; supported range 0001-01-01 to 9999-12-31.

Same date = 0. Reversed dates give a negative result. This is elapsed counting, not inclusive counting of both endpoints.

Enable JavaScript to calculate dates locally.

Count calendar days between two dates

Enter a start and end date, then select Calculate days or press Enter. Swap dates reverses the calculation; Reset clears both dates and returns focus to Start date. Copy result copies the signed number with its day unit. Dates and results stay in this tab, not in URLs, analytics or saved tool history.

Worked example: 2024-02-28 → 2024-03-01 = 2 days: one step to February 29, then one to March 1. In 2025 the same February 28 → March 1 interval is 1 day. No extra day is added for the start date.

Counting method and limits

Each valid date is mapped to an integer Gregorian day number, then the start day number is subtracted from the end day number. Leap years are divisible by 4, except century years must be divisible by 400. The Gregorian rules apply throughout the range (the proleptic Gregorian calendar), even before historical adoption.

A calendar day is not treated as a local 24-hour duration. For example, 2026-03-28 → 2026-03-30 is 2 calendar days even across Europe/London’s daylight-saving change. Parsing and calculation do not guess a locale or timezone. Invalid dates, incomplete dates and out-of-range years are rejected rather than normalized.

Not included: inclusive endpoint counts, business days, public holidays, timezone durations, age calculations, months or years. Use the Duration Converter to rescale fixed durations (its months and years are approximate), or the Unix Timestamp Converter to inspect instants with timezone offsets.

Reference: US Naval Observatory: calendars and Gregorian leap-year rules.

Content modified : explanation checked against the implementation and linked references; examples covered by automated reference checks. Human editorial sign-off is pending. Maintenance and correction tracking: michaeldaly / UsefulUtilities. Report a correction with the page, non-sensitive input and expected result, or contact the project.

Calculate signed elapsed Gregorian calendar days between two dates locally, without timezone or daylight-saving ambiguity.