Date & duration calculator
Use validated YYYY-MM-DD dates and get an explicit day count.
Dates
Use four-digit ISO calendar dates in YYYY-MM-DD form. Arithmetic uses UTC day numbers, so daylight-saving changes do not add or remove a day. The offset must be a whole number and may be negative.
Result
No result yet. Enter two dates and calculate.
Counting the days
Days between reports the exclusive count: end date minus start date. The same date is 0, and adjacent dates are 1 day apart. Theinclusive count includes both endpoints, so adjacent dates span 2 calendar days and the same date is 1. A reversed range keeps the same sign as the exclusive count.
Adding or subtracting days
Enter a base date and a whole-number offset. Positive offsets move forward, negative offsets move backward, and 0 keeps the same date. Month lengths and leap years follow the calendar: 2024-02-28 + 1 day is 2024-02-29, while 2023-02-28 + 1 day is 2023-03-01.
Validation and time zones
Dates must use four-digit ISO form YYYY-MM-DD with a year from 1000 to 9999. Impossible dates such as 2024-02-30, month 13 and a non-leap 29 February are rejected. Arithmetic uses UTC day numbers, not local clock time, so a daylight-saving transition cannot add or remove an hour or a day. The result falls outside the supported range if the offset leaves years 1000–9999.
Example
Example
2024-02-28 to 2024-03-01 is 2 exclusive days or 3 inclusive calendar days. Adding 2 days to 2024-02-28 gives 2024-03-01.
Scope
This is calendar-day arithmetic, not a timestamp or time-zone conversion. It does not account for weekends, public holidays, business hours or working-day rules. Dates and results stay in the browser and are not uploaded or added to analytics.