1 min readLocal-first workflow

How to Calculate Days Between Dates

Count calendar days, weekdays, and date offsets without turning calendar dates into timezone surprises.

Start with calendar dates

Use date-only values when the question is about deadlines, schedules, invoices, travel, school work, or planning. A calendar date is different from a timestamp because it does not need an hour, minute, or timezone.

Decide whether to include the end date

For a gap between dates, leave the end date out. For a count where the final day should be included, turn on Include end date before copying the result.

  • July 1 to July 2 is a 1-day gap.
  • Including the end date counts July 1 and July 2 as 2 counted days.
  • Use the same setting when comparing weekday and weekend totals.

Use weekdays carefully

Weekday counts exclude Saturdays and Sundays. They do not remove public holidays, company holidays, school breaks, or regional non-working days.

Add months with a quick sanity check

Month lengths differ, so date math near the end of a month needs a check. A clamped result keeps the date valid by using the last day of the target month when needed.

  • January 31 plus 1 month becomes February 28 in a common year.
  • January 31 plus 1 month becomes February 29 in a leap year.
  • For legal, payroll, or contract deadlines, confirm the rule your organization uses.

Open the related tool and keep the workflow local.