0Pricing
Excel Formulas Academy · Lesson

Counting Days Between Dates

Find the gap between two dates with DATEDIF and subtraction.

Measuring the Gap

One of the most common date tasks is finding how much time separates two dates: days until a deadline, age in years, or the length of a project.

Because spreadsheets store dates as numbers, the simplest answer is plain subtraction. For more advanced needs like counting whole months or full years, the DATEDIF function steps in.

In this lesson you will master both the quick subtraction approach and the precise DATEDIF approach.

Subtracting Two Dates

To count the days between an earlier date in A2 and a later date in B2, just subtract.

The result is the number of days between them. If A2 is June 1 and B2 is June 18, then =B2-A2 returns 17.

Put the later date first so the result is positive. Subtracting the other way gives a negative number, which simply means the order is reversed.

=B2-A2

All lessons in this course

  1. Today and Now for Live Dates
  2. Breaking Apart Dates With YEAR, MONTH, DAY
  3. Building Dates With DATE and EDATE
  4. Counting Days Between Dates
← Back to Excel Formulas Academy