Guides

How Do You Count Weekdays Between Two Dates?

Count weekdays between two dates: the working-time equation, full weeks times five, remainder days, weekend rules, and options to include or exclude weekdays.

Miryori Editorial Team2 min read
Try the Time Between Dates Calculator

A plain day count includes weekends, which is rarely useful for a work schedule. The time between dates calculator has a separate Working time result. Here is how it works.

To count weekdays between two dates, count each full week as five working days, then count the leftover days that are neither Saturday nor Sunday. The calculator's Working time field applies ⌊(d2−d1)/7⌋×5\lfloor (d_2 - d_1)/7 \rfloor \times 5 plus a remainder count. Its end-date option decides whether the final day is added when it is a weekday.

What does the working-time equation count?

Each whole week counts as five working days. The leftover days are checked one by one, skipping Saturday (day 6) and Sunday (day 0).

tworking=⌊d2−d17⌋×5+getRemaining(d1+⌊d2−d17⌋×7, d2, include end date)t_{\text{working}} = \left\lfloor \frac{d_2 - d_1}{7} \right\rfloor \times 5 + \text{getRemaining}\left(d_1 + \left\lfloor \frac{d_2 - d_1}{7} \right\rfloor \times 7,\ d_2,\ \text{include end date}\right)

The getRemaining term adds every non-weekend leftover day. A weekday end date adds one more day when the option is ticked; a weekend end date adds none.

Which weekdays can I include or exclude?

Seven weekday selectors open under Include / exclude some week days. All start at 0. Exclude flips the values to leave chosen days out; Include keeps only chosen days.

Selector Weekday number used by the tool Default
Mondays 1 0
Tuesdays 2 0
Wednesdays 3 0
Thursdays 4 0
Fridays 5 0
Saturdays 6 0
Sundays 0 0

These are the tool's own weekday numbers. The custom result appears in Custom time, separate from Working time.

Worked example: one February week

February 12 to February 19, 2024 has both dates on Mondays. Seven days make one full week: 1×5=51 \times 5 = 5 working days, Monday to Friday, with no leftover weekdays.

With the end date excluded, Working time is 5 days; ticking the option adds Monday February 19, giving 6. A weekend end date adds nothing.

Frequently Asked Questions

Does the weekend rule treat Saturday and Sunday the same?

Yes. The tool treats day 6 (Saturday) and day 0 (Sunday) alike and leaves both out of the count.

What do the Include and Exclude choices do?

Include keeps only the selected days in the Custom time result. Exclude flips each selector so selected days are left out. All seven start at 0.

What happens if the end date falls on a Saturday or Sunday?

The remainder routine omits the end-date term when the final day is a weekend day.

References

  • Omni's time between dates calculator: working-time equation and weekday selectors.
  • The calculator's date helpers for weekend and custom weekday counting.
  • The tool's weekday numbering, from Sunday 0 through Saturday 6.
Calculator

Time Between Dates Calculator

Calculate Time Between Dates with practical everyday formulas, interactive references and step-by-step results. Free, fast and private.

Try the Time Between Dates Calculator