How to use it
- Choose “Difference between two dates” or “Add or subtract”.
- Pick the dates, or press “Today”.
- To add or subtract, choose plus or minus and type the years, months, weeks and days.
- Read the result; it changes as you type.
Rules and limits
How dates are counted
- Dates are in the Gregorian calendar, applied also before 1582 (proleptic), years 1 to 9999, as Python’s
datetimeuses them. Days are counted from the first date to the second; “Counting both dates” adds one. - Months and years as Python’s dateutil
relativedeltacounts them: the most whole months that, added to the first date, do not pass the second, then the days left. A day that a month lacks becomes its last day: 31 January + 1 month = 28 February (29 in a leap year), and 29 February + 1 year = 28 February. - Adding: years and months first, with the same rule for the end of a month, then weeks and days; subtracting does the same backwards, so 31 March − 1 month = 28 February.
- For each date the weekday, the ISO 8601 week (weeks start on Monday, week 1 holds the year’s first Thursday) and the day of the year are shown.
Tested limits
- Checked against Python 3.14
datetimeand python-dateutil 2.9.0: 25,000 random pairs of dates from year 1 to 9999 (half from 1900 to 2100, many at the end of a month and on 29 February, 11,027 counted backwards) give the same days, weeks, months, years-months-days, weekday, ISO week and day of the year; 25,000 random additions and subtractions give the same date, and the 1,893 whose result falls outside years 1 to 9999 are refused by both. - Each amount can be at most 3,660,000 (about 10,000 years in days); every result must fall in years 1 to 9999.
Questions and answers
Why is 31 January plus one month 28 February?
February has no 31st, so the date moves to the last day that exists. Adding a month to the end of a month thus keeps you in the next month instead of spilling into March, as calendar programs and Python’s dateutil do.
Why does counting back give a different answer than counting forward?
Months differ in length. From 29 February 2024 to 28 February 2025 is one whole year, but counting back from 28 February 2025 the months end on 28 March 2024 and 28 days are left, so the page shows 11 months and 28 days.
Is the end date included?
The day count goes from the first date to the second, so 1 to 2 March is one day. If you count both days, as for a period of leave, read the line “Counting both dates”.
Is anything sent anywhere?
No. The calculation runs in your browser and the page sends nothing. The dates are kept only in this tab, like other tools’ options.