docs / articles / Calculate Calendar Days Between Two Dates in Excel

Calculate Calendar Days Between Two Dates in Excel

Eric Jul 09, 2026 2026-07-09 04:40:47

When working with dates in Excel, you might often need to calculate the number of calendar days between two dates. This can be useful for tracking project timelines, calculating age, or determining the duration of an event. While Excel doesn't have a built-in function for this, we can use a combination of functions to achieve this. Let's explore how to calculate calendar days between two dates in Excel.

How to calculate time between two dates in Years, Months & Days [Excel Formula]
How to calculate time between two dates in Years, Months & Days [Excel Formula]

Before we dive into the methods, let's understand that Excel stores dates as sequential serial numbers so that it can perform calculations easily. However, this also means that Excel considers weekends and holidays as valid days, which might not always be what we want. We'll need to account for this in our calculations.

Calculate Number of Days Between Two Dates in Excel - TheAppTimes
Calculate Number of Days Between Two Dates in Excel - TheAppTimes

Using DATEDIF Function

The DATEDIF function in Excel can help us calculate the difference between two dates. However, it includes weekends and holidays, so we'll need to adjust the result.

Excel Formula to Calculate Number of Days Between Two Dates - ExcelDemy
Excel Formula to Calculate Number of Days Between Two Dates - ExcelDemy

Here's the formula to calculate the number of calendar days between two dates using DATEDIF:

"=DATEDIF(start_date, end_date, "d") - (INT(DATEDIF(start_date, end_date, "7") / 7)) - (INT(DATEDIF(start_date, end_date, "4") / 4)) - (INT(DATEDIF(start_date, end_date, "3") / 13))"

Calculate Working Days between two Dates in Excel: Find Workdays Excluding Holidays & Weekends
Calculate Working Days between two Dates in Excel: Find Workdays Excluding Holidays & Weekends

Explanation of the Formula

The "d" argument in DATEDIF calculates the difference in days. The other arguments ("7", "4", and "3") calculate the number of complete weeks, months, and quarters, respectively. We divide these by 7, 4, and 13 (the average number of days in a month and quarter) to get the number of incomplete periods. We then subtract these from the total number of days to exclude weekends and holidays.

Example

How to calculate elapsed time/days/months/years between two datetimes in Excel?
How to calculate elapsed time/days/months/years between two datetimes in Excel?

If you want to calculate the number of calendar days between January 1, 2022, and December 31, 2022, you would input the following formula:

"=DATEDIF("2022-01-01", "2022-12-31", "d") - (INT(DATEDIF("2022-01-01", "2022-12-31", "7") / 7)) - (INT(DATEDIF("2022-01-01", "2022-12-31", "4") / 4)) - (INT(DATEDIF("2022-01-01", "2022-12-31", "3") / 13))"

This would return 364, indicating that there are 364 calendar days between these two dates.

Calculate Number of Days Between Two Dates in Excel (8 Quick Tricks)
Calculate Number of Days Between Two Dates in Excel (8 Quick Tricks)

Using NetworkDays Function

Excel also provides the NETWORKDAYS function, which calculates the number of whole workdays between two dates. This function excludes weekends and considers holidays as specified.

Get Difference between Two Dates in Excel | Calculate difference between Two Dates in Excel | Excel
Get Difference between Two Dates in Excel | Calculate difference between Two Dates in Excel | Excel
TECH-004 Calculate total days between two dates in Excel
TECH-004 Calculate total days between two dates in Excel
a green and white sign that says excel next to it is the date for an upcoming meeting
a green and white sign that says excel next to it is the date for an upcoming meeting
Calculate Difference between Two Dates in Excel: Get Number of Years Months Days with Excel Formula
Calculate Difference between Two Dates in Excel: Get Number of Years Months Days with Excel Formula
Excel DATEDIF function to get difference between two dates
Excel DATEDIF function to get difference between two dates
Calculate days from/before date in Excel
Calculate days from/before date in Excel
331K views · 4.5K reactions | 📅🏢🔢 Excel's NETWORKDAYS function is the perfect tool to calculate the difference between two dates while excluding a list of holidays, making it ideal for calculating workda | Excel Formulas Unleashed
331K views · 4.5K reactions | 📅🏢🔢 Excel's NETWORKDAYS function is the perfect tool to calculate the difference between two dates while excluding a list of holidays, making it ideal for calculating workda | Excel Formulas Unleashed
an image of a calendar in microsoft office 365 with the date and time tab open
an image of a calendar in microsoft office 365 with the date and time tab open
an image of a computer keyboard with the text auto save on it
an image of a computer keyboard with the text auto save on it
How to Calculate Year Month and Days From Difference Between Two Date in Microsoft Excel
How to Calculate Year Month and Days From Difference Between Two Date in Microsoft Excel
How to Use Excel to Calculate Between Dates
How to Use Excel to Calculate Between Dates
How to calculate Number of Days from today and between two dates in excel | Tamil
How to calculate Number of Days from today and between two dates in excel | Tamil
How to Use Excel to Calculate Between Dates
How to Use Excel to Calculate Between Dates
How to fill date by week in Excel quickly and easily?
How to fill date by week in Excel quickly and easily?
How To Calculate The Difference Between Two Dates in Excel - ExcelDataPro
How To Calculate The Difference Between Two Dates in Excel - ExcelDataPro
Excel Autofill - how to quickly enter Months, Days, Dates and Numbers without typing
Excel Autofill - how to quickly enter Months, Days, Dates and Numbers without typing
how to calculate Date and  time in excel
how to calculate Date and  time in excel
Mastering Excel Date & Time: Serial numbers, Networkdays, Datevalue, and more
Mastering Excel Date & Time: Serial numbers, Networkdays, Datevalue, and more
Create a date sequence in Excel and auto fill date series
Create a date sequence in Excel and auto fill date series
How to calculate Difference Between Two dates in Excel by learning center in Urdu/hindi
How to calculate Difference Between Two dates in Excel by learning center in Urdu/hindi

Here's the formula to calculate the number of calendar days between two dates using NETWORKDAYS:

"=NETWORKDAYS(start_date, end_date, [holidays])"

Explanation of the Formula

The NETWORKDAYS function takes three arguments: the start date, the end date, and an optional list of holidays. If you don't provide a list of holidays, the function will exclude weekends but include holidays.

Example

If you want to calculate the number of calendar days between January 1, 2022, and December 31, 2022, excluding weekends and including holidays, you would input the following formula:

"=NETWORKDAYS("2022-01-01", "2022-12-31")"

This would return 252, indicating that there are 252 calendar days between these two dates, excluding weekends and including holidays.

In both methods, you can replace "start_date" and "end_date" with the actual dates you're working with. The DATEDIF method is more complex but can be useful if you need to exclude specific holidays. The NETWORKDAYS method is simpler and more straightforward, but it requires you to input a list of holidays if you want to exclude them.

Now that you know how to calculate calendar days between two dates in Excel, you can use this knowledge to streamline your work and make your spreadsheets more efficient. Happy calculating!