How to Use the DAYS Function in Excel

Today, we’ll explore the DAYS function, which is available in both Microsoft Excel and Google Sheets.

Overview

The DAYS function is used to calculate the number of days between two specific dates. This function is especially useful for determining the duration between events, tracking deadlines, or for any calculations related to dates.

Syntax

The syntax of the DAYS function is straightforward:

DAYS(end_date, start_date)
  • end_date: This parameter represents the final date of the period being measured.
  • start_date: This parameter signifies the initial date of the period.

Example Tasks

Below, we’ll explore practical examples that demonstrate how the DAYS function can be applied:

Calculating Days Between Two Dates

Consider that you have a start date in cell A1 (01/01/2022) and an end date in cell B1 (01/10/2022), and you wish to calculate the number of days between these two dates.

Start Date End Date Days Between
01/01/2022 01/10/2022 =DAYS(B1, A1)

The function will return 9, reflecting that there are 9 days between January 1st and January 10th, 2022.

Handling Negative Values

If the start date is later than the end date, the DAYS function will return a negative value. This functionality is beneficial for indicating elapsed time periods or missed deadlines.

For instance, if the start date is 02/01/2022 and the end date is 01/01/2022, the formula =DAYS(B2, A2) will display -1, signifying that the end date was one day before the start date.

Using the DAYS function allows for straightforward calculations of date differences and helps assess the duration between various events or deadlines effectively. This tool is invaluable for numerous scenarios involving date-related calculations.

More information: https://support.microsoft.com/en-us/office/days-function-57740535-d549-4395-8728-0f07bff0b9df

Other functions
Returns the serial number of a particular date
Calculates the number of days, months, or years between two dates This function is useful in formulas where you need to calculate an age
Converts a date in the form of text to a serial number
Converts a serial number to a day of the month
Calculates the number of days between two dates based on a 360-day year
Returns the serial number of the date that is the indicated number of months before or after the start date
Returns the serial number of the last day of the month before or after a specified number of months
Converts a serial number to an hour
Returns the number of the ISO week number of the year for a given date
Converts a serial number to a minute
Converts a serial number to a month
Returns the number of whole workdays between two dates
Returns the number of whole workdays between two dates using parameters to indicate which and how many days are weekend days
Returns the serial number of the current date and time
Converts a serial number to a second
Returns the serial number of a particular time
Converts a time in the form of text to a serial number
Returns the serial number of today's date
Converts a serial number to a day of the week
Converts a serial number to a number representing where the week falls numerically with a year
Returns the serial number of the date before or after a specified number of workdays
Returns the serial number of the date before or after a specified number of workdays using parameters to indicate which and how many days are weekend days
Converts a serial number to a year
Returns the year fraction representing the number of whole days between start_date and end_date