In everyday planning, “how long between these two dates” is asked constantly: notice periods, project schedules, return windows, wait times, statutory deadlines. The answer is not a single number, because a date range can be expressed in days, in weeks, or in a years-months-days breakdown, and each of those answers is useful for a different purpose.
Days are what contracts and reminder systems use, because they are unambiguous. Weeks are how people estimate effort. The breakdown is how people talk. This page reports all three from the same pair of dates so that the same underlying span can be quoted in whichever form the situation demands.
One property worth noticing up front: the tool takes the absolute difference, so the order of the two dates does not matter. Reversing them does not produce a negative number.
Total days comes first, because the others depend on it conceptually:
days = round(|end − start| ÷ 86400000)
The divisor is the number of milliseconds in a day. Rounding is used rather than truncation, which usefully absorbs the hour lost or gained at a daylight-saving transition.
Total weeks is the same count divided by seven, reported to one decimal place rather than rounded to a whole number, so a partial week is visible.
The breakdown is computed like an age, but by a route that cannot produce a negative component. The tool adds the whole years and months first, clamping the day to the length of the target month — 31 January plus one month is 28 February — then counts the days from that point to the later date. If adding a month overshoots, it steps back a month and retries, so the day count is always the genuine remainder. Both dates are read at local midnight, so a date entered as 2026-01-01 means the start of that day rather than an instant within it.
The defaults, 1 January to 30 August 2026. The 30th of August is day 242 of the year and the 1st of January is day 1, so the difference is 241, reported as 241 days. Divided by seven that is 34.428…, shown as 34.4 weeks. The breakdown needs no borrowing: 0 years, 8 − 1 = 7 months, and 30 − 1 = 29 days, giving 0 years 7 months 29 days. Read back, 1 January plus seven months is 1 August, and twenty-nine days later is 30 August, so the two forms agree.
A crossing of the year, 14 February to 3 November 2026. The total is 262 days, or 37.4 weeks. The breakdown does borrow: the day component starts at 3 − 14 = −11, so it takes a month and adds October's 31 days to become 20. That leaves 0 years, 8 months and 20 days, and checking forwards, 14 February plus eight months is 14 October, plus twenty days is 3 November. Correct.
The month-end case, 31 January to 1 March 2026. The total is 29 days. This is the span that separates a careful breakdown from a naive one, because 31 January has no counterpart in February. Adding two months clamps to 31 March, which overshoots 1 March, so the tool steps back to one month: 31 January plus one month clamps to 28 February. From there 1 March is a single day away, giving 0 years 1 month 1 day. Read forwards it holds: 31 January, then 28 February, then 1 March is 29 days. A routine that subtracted the month and day components independently would report a negative day count here.
No. The difference is taken as an absolute value, so 1 January to 30 August and 30 August back to 1 January both report 241 days. If you need to know which came first, compare the dates yourself.
Add one to the total. Deadlines expressed as “within 30 days” usually include the start day, which is why a stated 30-day window often contains 31 calendar days.
Because a partial week is the useful information. 34.4 weeks tells you the span is a bit past 34 weeks; a rounded 34 would hide the remainder, and rounding up to 35 would overstate it.
Yes — set the end date to the event. Note that the tool reports the span between two calendar dates and does not know about the current time of day, so on the day itself it will show 0 days rather than the hours remaining.
That page adds birthday semantics on top of this arithmetic: whole years completed, the next anniversary, and the days remaining until it. Use this page for arbitrary intervals between two dates and the Age page when one of the dates is a date of birth.