Date duration calculator

Count the exact days, weeks, months and business days between any two dates — privately, in your browser.

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 monthstotalDays / 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

ResultBest used for
Total daysInterest, late fees, day-rate billing and exact age in days.
Total weeksPregnancy progress, project sprints, notice periods.
Years / months / daysLength of employment, anniversaries, loan terms.
WeekdaysDelivery 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.

Privacy note: this tool runs entirely in your browser with no server and no analytics on your input. The dates you enter never leave your device and nothing is stored once you close the tab.

Frequently asked questions

How does the date duration calculator count days?

It counts the whole calendar days between the two dates. By default the end date itself is not counted, so 1 March to 4 March is 3 days. Tick “Include end day” to count both endpoints, which turns that same span into 4 days — the count you want when a hotel charges per night versus per day of attendance.

What is the difference between total days and the years/months/days breakdown?

Total days is a single running count of every day in the span. The years/months/days breakdown expresses that same gap in calendar terms by stepping forward whole years, then whole months, then leftover days. Because months vary in length, the breakdown is the human-readable view while total days is the precise one.

How are weekdays (business days) calculated?

The tool walks through every date in the range and counts only those that fall Monday to Friday, skipping Saturday and Sunday. It does not know about public holidays, which vary by country and region, so subtract any bank holidays in your own calendar for an exact working-day figure.

What happens if the start date is after the end date?

The two dates are swapped automatically so the duration is always reported as a positive number, and a small note tells you the swap happened. You never get a negative or confusing result from entering the dates in the “wrong” order.

Does leap year February 29 affect the result?

Yes, and it is handled for you. The calculation uses the browser’s real calendar, so any 29 February inside your range is counted as a genuine day and leap years are respected in the years/months/days breakdown.

Is my data sent anywhere?

No. Every calculation runs locally in your browser with JavaScript. The dates you enter are never uploaded, logged or stored — close the tab and nothing remains.