How the day count works
The calculator converts both dates to a fixed point in time and divides the difference by the number of milliseconds in a day. That handles leap years automatically — 2024 and 2028 each contribute an extra day without any special rule.
All arithmetic runs in UTC deliberately. Doing it in local time means a clock change during the period can produce a 23 or 25 hour day and round the answer off by one.
Inclusive or exclusive?
From 1 January to 2 January is 1 day if you count the gap, or 2 days if you count both dates themselves. Neither is wrong — they answer different questions. Contracts, hotel stays and notice periods often count inclusively, so the toggle is there to match whichever definition applies to you.
Working days
The weekday count excludes Saturdays and Sundays by walking the range day by day rather than approximating with a divide-by-seven, so it stays exact regardless of which day the range starts on.
It does not exclude public holidays, which vary by country and region. If you are counting a legal deadline, check whether your jurisdiction counts calendar days, business days, or business days excluding holidays — the three can differ by more than a week over a long period.
Why "months" is approximate
Calendar months run from 28 to 31 days, so there is no fixed conversion from days to months. The years-months-days breakdown counts forward from the start date one unit at a time, which is why it can look inconsistent with a simple division: 31 days from 1 January is "1 month", but 31 days from 1 February is "1 month and 3 days".
For working out an age rather than a gap, the age calculator applies the same counting method against today's date. For converting shift lengths into decimal hours, see the time calculator.