Counting the time between two dates
Working out how long it is between two dates sounds trivial until you try it by hand. Months have 28, 29, 30 or 31 days, leap years add a day every four years, and “how many days” can mean two different things depending on whether you count the last day. This calculator settles all of that for you and reports the gap in days, weeks, months, a tidy years-months-days breakdown, and a separate count of weekday (business) days.
How the maths works
The core figure is the total day count. Both dates are reduced to midnight UTC so daylight-saving shifts can’t skew the result, then the calculator uses:
totalDays = round((end − start) / 86,400,000)— the millisecond gap divided by the number of milliseconds in one day.- If Include end day is ticked, it adds 1 so both endpoints are counted (
totalDays + 1). - Weeks =
totalDays / 7, and months ≈totalDays / 30.4375(the average month length across a 4-year cycle).
The years / months / days breakdown is calculated separately by calendar arithmetic — stepping forward whole years, then whole months, then counting the remaining days — so it always lands on real calendar boundaries instead of fixed-length approximations. The weekday count is found by walking every date in the span and tallying those that fall Monday through Friday.
A worked example
Take 1 January 2025 to 14 February 2025. The millisecond gap
divided by a day gives 44 days. That is 44 / 7 ≈ 6.3 weeks and about
44 / 30.4375 ≈ 1.4 months. The calendar breakdown is 1 month and 13
days. Of those 44 days, 32 fall on a weekday and 12 fall on a weekend. Tick “Include end
day” and every figure recounts with 14 February added in, giving 45 total days.
Days & weeks
A precise running count of every day in the span, plus the same gap expressed in weeks for planning sprints or notice periods.
Calendar breakdown
Years, months and days that respect real month lengths and leap years — the way you’d describe an age or a tenure out loud.
Business days
Weekday-only counts that exclude Saturday and Sunday, useful for delivery windows and contractual deadlines.
Where each figure is useful
| Result | Best used for |
|---|---|
| Total days | Interest, late fees, day-rate billing and exact age in days. |
| Total weeks | Pregnancy progress, project sprints, notice periods. |
| Years / months / days | Length of employment, anniversaries, loan terms. |
| Weekdays | Delivery estimates, business deadlines, working-day SLAs. |
The weekday count excludes weekends but not public holidays, which differ by country. Subtract any bank holidays in your range for an exact working-day total.