This guide will show you quick and easy methods to find the number of days between dates in Excel.
Do you need to know how many days are between two dates? Maybe you want to find out the days between today and a date in the past or future, or just count the working days between two dates? Whatever you need, one of the examples below will help you find the solution

Table of Contents

Days Between Date calculator

If you are looking for a quick answer, just supply the two dates in the corresponding cells

Days Between Date calculator

Want to know the formula that calculated your dates? It’s as simple as =B3-B2. 🙂

Below you will find the detailed explanation on how this formula works and learn a few other methods to calculate days between dates in Excel.

How many days between dates calculations

The easiest way to find the number of days between two dates in Excel is to subtract one date from the other

Newer date – older date

For example, to find out how many days are between the dates in cells A2 and B2, use this formula:

=B2 – A2

Here, A2 is the earlier date, and B2 is the later date.

The result will be a number that shows how many days are between the two dates.

How many days between dates calculations

How this formula works

As you might know, Microsoft Excel stores dates as serial numbers starting from January 1, 1900, which is represented by the number 1. In this system, January 2, 1900, is stored as the number 2, January 3, 1900, as 3, and so on. So, when you subtract one date from another, you are actually subtracting the numbers that represent those dates.

In our example, the formula in C3 subtracts 43631 (the number for JUL 15, 2019) from 43291 (the number for July 10, 2018) and gives a result of 340 days.

The great thing about this method is that it works perfectly in all cases, no matter which date is earlier, and which is later. If you subtract a later date from an earlier date, like in row 5 in the screenshot above, the formula will return the difference as a negative number.

Calculate number of days between dates in Excel with DATEDIF

Another way to count days between dates in Excel is by using the DATEDIF function. This function is specially designed to calculate the difference between dates in various units, such as days, months, and years.
To find the number of days between two dates, you enter the start date as the first argument, the end date as the second argument, and use “d” for the unit in the last argument

DATEDIF(start_date, end_date, “d”)

in our example, the formula goes as follows:

=DATEDIF(A2, B2, “d”)

Unlike the subtraction operation, a DATEDIF formula can only subtract an older date from a newer date, but not the other way round. If the start date is later than the end date, the formula throws a #NUM! error, like in row 5 in the screenshot below

Using formula Data if

Count days between dates with Excel DAYS function

Users of Excel 2013 and Excel 2016 have another easy way to calculate the days between two dates – the DAYS function.
Note that, unlike DATEDIF, the DAYS function requires the arguments in reverse order:

DAYS(end_date, start_date)

So, our formula takes the following shape:

=DAYS(B2, A2)

Like subtraction, it returns the difference as a positive or negative number, depending on whether the end date is greater or smaller than the start date:

Count days between dates with Excel DAYS function

How to calculate number of days between today and another date

Calculating the number of days from or before a certain date is just a specific case of “how many days between dates” math. You can use any of the formulas mentioned above and use the TODAY function instead of one of the dates.
To calculate the number of days since a past date and today

TODAY() – past_date

To count the number of days until date, i.e. between a future date and today:

Future_date – TODAY()

As an example, let’s calculate the difference between today and an earlier date in A4:

=TODAY() – A4

How to Calculate Days Between Dates in Excel

And now, let’s find out how many days are between today and a later date:

How to Calculate Days Between Dates in Excel

How to calculate working days between two dates in Excel

In situations when you need to get the number of days between two dates without weekends, use the Networkdays Function

NETWORKDAYS(start_date, end_date, [holidays])

The first two arguments should already look familiar to you, and the third (optional) argument allows excluding a custom list of holidays from the day count.

To find out how many working days are between two dates in columns A and B, use this formula:

=NETWORKDAYS(A2, B2)

How to Calculate Days Between Dates in Excel

Optionally, you can enter your holiday list in some cells and tell the formula to leave out those days:

=NETWORKDAYS(A2, B2, $A$9:$A$10)

As the result, only business days between two dates are counted

Data calculation with Holiday

This is how you calculate the number of days between dates in Excel. 

Download Practice File

You can also practice this through our practice files. Click on the below link to download the practice file.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *