How to count days between dates

Counting days sounds simple until a deadline depends on it. This guide shows the methods behind the date calculator, so you can check any result yourself.

Open the tool: Date Calculator

Count by months

Write down the days left in the first month, add the full months in between, then add the days of the last month. From March 15 to June 10: 16 days left in March, 30 in April, 31 in May and 10 in June gives 87 days.

Remember the knuckle rule for month lengths: January, March, May, July, August, October and December have 31 days; April, June, September and November 30; February 28, or 29 in a leap year.

Leap years

  • A year divisible by 4 is a leap year: 2028.
  • Except years divisible by 100: 2100 is not.
  • Unless they are divisible by 400: 2000 was.

In Excel or Google Sheets

Type =B1-A1 with the dates in A1 and B1 to get the days between them, or =DATEDIF(A1,B1,"Y") for whole years. =NETWORKDAYS(A1,B1,holidays) counts working days and includes both ends, so it often gives one more than a plain subtraction. =WORKDAY(A1,10) adds 10 business days.

Inclusive or exclusive?

A hotel stay from the 1st to the 5th is 4 nights: the last day is not counted. A course that runs from the 1st to the 5th is 5 days: both ends count. Legal deadlines often start the day after an event; check the rule that applies to you.