CALCULATORS

Date Calculator

Compare two dates or shift one date by a number of days, weeks, months, or years. Results distinguish elapsed days from inclusive calendar days and clamp month-end dates instead of rolling into the next month. Dates are calculated as calendar dates in your browser.

Calculation mode

Choose whether to compare two dates or add and subtract from one date.

Use YYYY-MM-DD format. The end date can be earlier than the start date.

Elapsed days versus inclusive calendar days

Elapsed days measures the distance from the start date to the end date. From 1 January to 31 January is 30 elapsed days, because the clock reaches the end of the 30th day at the end of 31 January. Inclusive counting adds one so that both the start and end dates are counted, giving 31 calendar days for the same span.

Same-day comparisons are 0 elapsed days and 1 inclusive calendar day. When the end date is earlier than the start date, the difference is shown as a number of days earlier, and the calendar breakdown uses the earlier date as the starting point.

The weeks line divides the absolute day difference into whole weeks plus leftover days. The calendar line reports whole years, months, and days, which is useful for ages and durations but can differ from a simple day division.

Adding and subtracting dates

Day and week arithmetic moves by exact calendar days. Month and year arithmetic follows the calendar instead: 31 January plus one month is 28 February in a common year and 29 February in a leap year. The day is clamped to the end of the target month rather than rolling into March. Subtracting one month from 31 March gives 29 February in a leap year.

Amounts must be whole numbers from 0 to 1,000,000, and the resulting date must stay within the supported years 1 to 9999. Invalid dates such as 2023-02-29 are rejected instead of being silently corrected.

Every result is computed from date-only values, so there is no timezone or daylight-saving shift. For a birthday-style breakdown, the age calculator also reports total days lived and the next birthday.

Date calculator FAQ

Why do months and years differ from dividing by 30 or 365?

Months and years have different lengths, so a calendar breakdown is not a fixed number of days. The calculator counts whole calendar units first, then the remaining days, and also shows the exact day difference so you can compare both views.

What happens with 31 January plus one month?

The result is clamped to the last day of February: 28 February in a common year or 29 February in a leap year. The explanation notes when clamping changed the day number.

Can I subtract more than the date allows?

Yes, as long as the result stays within years 1 to 9999. Subtracting one day from 1 January 2024 gives 31 December 2023. A result outside the supported range is rejected with an explicit message.

Does the calculator store my dates?

No. Dates are processed in this page and are not saved between visits. The only external script is the advertising tag described in the privacy policy.

Last updated: