CalcOS

CalcOS calculator

Calculate Days Between Two Dates

Count elapsed calendar days between two dates with an optional inclusive end date.

Enter your details

Updating answer…

How this calculator works

Count calendar days between two dates without local time-zone or daylight-saving changes affecting the answer. The calculator normalizes reversed endpoints and can optionally include both boundary dates.

Method
Strict ISO-date validation and integer UTC proleptic-Gregorian calendar-day ordinal subtraction
Source
CalcOS Days Between Dates Calendar-Day Contract v1.0.0
Last reviewed
2026-08-24
Method limitations
  • Accepts four-digit ISO calendar dates from 0001-01-01 through 9999-12-31
  • Normalizes reversed endpoints instead of returning a signed duration
  • The months result is an average-length-month approximation, not an exact calendar decomposition

Engine-backed example

Inclusive days across a leap day: worked example

How many calendar dates are counted from February 28 to March 1, 2024, when both dates are included?

Date range
February 28–March 1, 2024
Counting rule
Include both dates
Days Between Dates3 Days
Weeks & Days
0 Weeks, 3 Days
Average-length Months (Approx.)
0.1
Equivalent Hours (24h Days)
72

The inclusive count is 3 calendar days: February 28, leap day February 29, and March 1.

Trust and review

Who created and reviewed this calculator?

Author
CalcOS Editorial TeamResponsible for calculator explanations, examples, assumptions, and search-intent clarity.
Reviewed by
CalcOS Scientific ReviewTechnical review of strict calendar-date validation, UTC Gregorian day ordinals, boundary rules, leap-day behavior, engine parity, and narrative examples.
Substantive review date
2026-08-24Exclusive-end and inclusive-both counting, reversed endpoints, invalid dates, leap years, exact day decomposition, approximate month labeling, and worked-example parity.

Sources

Assumptions used by this calculator
  • Inputs are real four-digit YYYY-MM-DD calendar dates from year 0001 through 9999.
  • Reversed endpoints are normalized and the answer is non-negative.
  • Exclusive-end mode measures elapsed calendar days; inclusive-both mode adds exactly one day.
  • The average-month result is approximate and is not an exact calendar-month decomposition.

Continue this calculation

Useful next steps