How to Use the DAYS () Function in Microsoft Excel?

The DAYS function in Microsoft Excel is a Date/Time function that comes in handy in checking the number of days between two dates. The feature is in-built, and you can use it as a worksheet function in Excel.

The formula of the function relies on two crucial aspects; the Start Date and the End Date. They are the two dates between which you want to establish the number of days. Both values representing the dates must be valid on the Excel document, or they can be text values that qualify as dates.

Note that the function is only responsive to whole numbers, and fractional time values are not recognised in the formula. If you reverse the start and end dates, the DAYS function will give you a negative number.

YouTube video

Examples of the DAYS Function at Work

  • Example 1: In an empty column, enter the formula: =DAYS (end date, start date), for instance, =DAYS (H4, G4). When you click on the individual cells, their values will be captured automatically. Drag down from column J to apply the rest of the values.
  • Example 2: In another example, assume you have a start date in A1 and an end date in A2, the formula will be =DAYS (A2, A1), which will return the same result as =A2-A1. Take note that the feature can also work with dates in their text format for as long as Excel can recognise them.

For example, =DAYS (“7/15/2019”, “7/1/2019”) // returns 14. The function gives you a return that reflects the number of days between two dates. If you want to capture both the start and end dates in the results, remember to add 1 to the result. For example: =DAYS (“1/3/21”, “2/3/21”) + 1// returns 2.

As a tip, avoid storing and parsing values that represent dates, as doing so introduces errors. The best approach is to work with native Excel dates in numbers. You can use the Date Function to create numeric dates from scratch in the formula. If you would like more assistance using Microsoft’s features for your business, learn more on our blog.