How the time between two dates is counted
Every calendar date can be given a day number: a running count of days from a fixed starting point. The gap between two dates is then a subtraction, and weeks follow by dividing by seven.
Days between = day number of end date − day number of start date
Weeks = days ÷ 7, rounded down, with the remainder left as days
Counted this way, the start date is included and the end date is not, the same way a hotel stay from Monday to Friday is four nights. If both the first and last day should count, as they do for a hire period or an event that runs through its final day, tick “Count the end date as well” and one day is added. The calculator counts whole calendar days in UTC, so a daylight-saving change never produces a 23-hour or 25-hour day.
Years, months and days are counted in stages: as many whole years as fit, then as many whole months, then the days that remain.
Worked example: 15 January 2024 to 20 April 2026
- Whole years. 15 January 2024 to 15 January 2026 is 2 years. A third year would overshoot.
- Whole months. 15 January 2026 to 15 April 2026 is 3 months.
- Days left. 15 April to 20 April is 5 days. The answer is 2 years, 3 months and 5 days.
- Total days. 2024 was a leap year, so the two years contain 366 + 365 = 731 days. The three months contain 16 + 28 + 31 + 15 = 90 days. With the final 5, that is 731 + 90 + 5 = 826 days.
- Weeks. 826 ÷ 7 = 118 weeks exactly, with no days over.
- Weekdays. Each full week has five weekdays, so 118 × 5 = 590 weekdays and 236 weekend days.
Adding months and years: the month-end rule
Days and weeks are exact lengths, so adding them is simple counting. Months and years are not, because months have 28, 29, 30 or 31 days. This calculator uses the rule most spreadsheets and banks use:
Result = the same day number in the target month, or that month’s last day if it has no such day
So 31 January 2025 plus one month is 28 February 2025, and 31 January 2024 plus one month is 29 February 2024, because 2024 was a leap year. In the same way, 29 February 2024 plus one year is 28 February 2025. The same rule is used when counting whole months between two dates, so 31 January 2025 to 28 February 2025 is reported as one month.
The rule has two consequences that catch people out:
- It does not always reverse. 31 January 2025 plus one month is 28 February, but 28 February minus one month is 28 January, not 31 January.
- Two steps can differ from one. Adding one month twice to 31 January 2025 gives 28 February and then 28 March. Adding two months in one go gives 31 March.
A month is also not the same as 30 days. From 15 January 2026, adding 30 days gives 14 February, while adding one month gives 15 February. If a contract or notice period is written in days, add days. If it is written in months, add months. Ages are a special case with their own convention for birthdays, which the age calculator handles.
Weekdays are not always working days
The weekday figure counts every Monday to Friday in the period and nothing else. Public holidays are not removed, because they differ between states and territories and from year to year. For a count of working days, take the weekday figure and subtract the public holidays that fall on a weekday in your location.
Practical points
- Check how a deadline counts its first day. “Within 28 days of the notice” may or may not count the day the notice was given. The wording of the rule decides, and the tick box lets you match it.
- Write dates so they cannot be misread. 03/04/2026 is 3 April in Australia and 4 March in the United States. The year-month-day form, 2026-04-03, is read the same way everywhere.
- Week numbers follow the ISO standard. Weeks start on Monday and week 1 is the week containing the year’s first Thursday. That means a date can belong to a week of the neighbouring year: 1 January 2027 is a Friday and falls in week 53 of 2026.
- Old dates. The modern Gregorian calendar is applied to every year, including years before it was adopted.