Date Calculator
96 days
- 13
- Weeks
- 3
- Whole months
- 70
- Weekdays
- 26
- Weekend days
The date calculator does the two things people actually need from dates: measure the gap between two of them, or find the date a given period before or after another. The gap comes back as days, weeks, whole months and, usefully for planning, how many of those days are weekdays rather than weekend days.
How it works
All arithmetic runs in UTC on calendar dates rather than local timestamps. That removes daylight saving from the calculation entirely; without it, a span crossing a clock change is 23 or 25 hours long and rounds inconsistently.
- Days is a straight subtraction, exclusive of the start date and inclusive of the end. 1 March to 3 March is 2 days.
- Weekdays counts Monday to Friday across the span, so a two-week gap reports 10 rather than 14. Public holidays are not deducted. Those vary by country and are not knowable from the dates alone.
- Whole months counts completed months, not the difference between the month numbers. 31 December to 1 January is zero months, not one.
- Shifting by months or years clamps the day to the last one the target month has, so 31 January plus a month is 28 February, or 29 in a leap year.
- Business-day shifts step one calendar day at a time and count only Monday to Friday, which is why ten business days out is fourteen calendar days.
Examples
The gap between two dates
From
2024-01-15
To
2024-11-03
Result
293 days · 41 weeks · 9 whole months · 209 weekdays, 84 weekend days
2024 is a leap year, so February contributes 29 days and the same span in 2023 is 292. Nine whole months, not ten: 15 October plus a month is 15 November, which is past 3 November.
Adding a month to a month end
Start
2025-01-31
Shift
+1 month
Result
Friday 28 February 2025
There is no 31 February, so the day clamps to the last of the month. One consequence: adding a month then subtracting one gives 28 January, not 31.
Ten business days out
Start
2026-09-10
Shift
+10 business days
Result
Thursday 24 September 2026
Fourteen calendar days, because two weekends fall inside the span. This is the arithmetic behind almost every "within ten working days" commitment.
Frequently asked questions
Does the result include both the start and end dates?
No. The count excludes the start date and includes the end date, so 1 March to 3 March is 2 days. Add one when both endpoints should count, as they do when a hotel charges by night rather than by day.
Why is 31 December to 1 January zero whole months?
Because a whole month has not elapsed. One day has. The figure counts completed months rather than subtracting month numbers, which is the difference between an honest answer and one that calls a single day a month.
Are public holidays excluded from the weekday count?
No. Weekdays means Monday to Friday. Holidays differ by country, region and year, and there is no way to infer them from two dates, so deducting them would be guessing. Subtract the ones you know about yourself.
Why does adding one month to 31 January give 28 February?
Because 31 February does not exist and the day clamps to the end of the target month. Every calendar application does this. It also means month addition is not reversible, which occasionally surprises people scheduling from a month end.
Does daylight saving affect the result?
No. Everything is computed in UTC on calendar dates, so a clock change inside the span cannot introduce a short or long day and shift the total by one.
How is this different from the age calculator?
The age calculator is built around one date and today, and reports the years-months-days form people use for age. This handles two arbitrary dates in either direction, adds weekday and business-day counting, and shifts forwards or backwards from a single date.