By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
World of SoftwareWorld of SoftwareWorld of Software
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Search
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
Reading: Excel DAYS Function Explained: Calculating Date Differences Between Two Dates! | HackerNoon
Share
Sign In
Notification Show More
Font ResizerAa
World of SoftwareWorld of Software
Font ResizerAa
  • Software
  • Mobile
  • Computing
  • Gadget
  • Gaming
  • Videos
Search
  • News
  • Software
  • Mobile
  • Computing
  • Gaming
  • Videos
  • More
    • Gadget
    • Web Stories
    • Trending
    • Press Release
Have an existing account? Sign In
Follow US
  • Privacy
  • Terms
  • Advertise
  • Contact
Copyright © All Rights Reserved. World of Software.
World of Software > Computing > Excel DAYS Function Explained: Calculating Date Differences Between Two Dates! | HackerNoon
Computing

Excel DAYS Function Explained: Calculating Date Differences Between Two Dates! | HackerNoon

News Room
Last updated: 2025/04/17 at 4:27 PM
News Room Published 17 April 2025
Share
SHARE

Excel DAYS Function ExampleExcel DAYS Function Example

DAYS Function: A Brief

DAYS function in Excel is used to calculate the number of days between two dates. If you have a start date in cell A1 and an end date in cell B1, the formula =DAYS(B1, A1) will return the total number of days between those two dates.

If your system uses the mm/dd/yy date format but your formula uses a different format like dd/mm/yyyy, Excel may show a #VALUE! error. This happens because the date format in the formula doesn’t match your system’s date setting, causing Excel to misread the date.

Objective

Value Returned by function

Aim to return days between two dates in number

DAYS Function will extract & return the number of days between the Ending date and the Starting date.

DAYS Function: A Syntax

=DAYS(end_date, start_date)
  • end_date: The later date.
  • start_date: The earlier date.

Note: The result will be a positive or negative number depending on the order of dates.

Function Compatibility:

The DAYS function was introduced in Excel 2013. It is supported in all modern versions of Excel, including Excel 2013, 2016, 2019, and Microsoft 365. If you are using older versions of Excel, then you might need to use the formula: =DATEDIF(start_date, end_date, "d").

Basic Example:

S.no

End Date

Start Date

Final Result

Formula Used

Comments

1

12-Mar-24

01-Jan-24

71

=DAYS(B4,C4)

Includes Feb 29, so leap year is considered

2

05-Jan-23

25-Dec-22

11

=DAYS(B5,C5)

Days between December and January, different years

3

19-Jun-21

01-Aug-21

-43

=DAYS(B6,C7)

Reversed dates, returns a negative number

4

03-Oct-20

05-Sep-20

28

=DAYS(B8,C8)

In 2020, a leap year, but Feb not in range

5

08-May-23

01-Jan-23

127

=DAYS(B9,C9)

Days between two dates in the same year

6

30-Jun-22

15-Jun-22

15

=DAYS(B10,C10)

Days between two dates in the same month and year

Basic Example of using DAYS Function in ExcelBasic Example of using DAYS Function in Excel

  • The 1st explains that the DAYS function automatically checks whether the given dates include a leap year. If so, it adds one extra day for the month of February.
  • The 2nd shows that the DAYS function can calculate the difference in days between dates that fall in different years.
  • The 3rd explains that if the end date is earlier than the start date, the DAYS function will return a negative value.
  • The 4th shows that even if a leap year is present, the DAYS function will ignore it if February is not within the range of the dates.
  • The 5th explains that the DAYS function can find the difference between two dates in the same year.
  • The 6th shows that the DAYS function can also calculate the difference between two dates within the same month.

In the above example, I’ve tried to cover all the necessary possibilities of using DAYS function in Excel.

Using Other Functions Nested with DAYS Function:

Start Date

End Date

Today’s Date

01 January 2023

30 June 2024

01-Apr-25

In the below example, I’ve listed the available combinations of using DAYS functions with other Excel functions.

Label

Formula Used

Days Between

=DAYS(B7,B4)

Days Remaining

=DAYS(B7,B10)

Status (Overdue)

=IF(DAYS(B10,B7)<0,”Overdue”,”On Time”)

Duration Text

=TEXT(DAYS(B7,B4),”0″) & ” days between start and end”

Subscription Status

=IF(DAYS(B10,B4)>365,”Expired”,”Active”)

Months Duration

=DATEDIF(B4,B7,”m”)

Fancy Duration

=DATEDIF(B4,B7,”y”) & ” years, ” & DATEDIF(B4,B7,”ym”) & ” months, ” & DATEDIF(B4,B7,”md”) & ” days”

Using DAYS Function with Other Excel FunctionsUsing DAYS Function with Other Excel Functions

That’s it. This article is originally published on How to Use Excel DAYS Function?

Sign Up For Daily Newsletter

Be keep up! Get the latest breaking news delivered straight to your inbox.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Share This Article
Facebook Twitter Email Print
Share
What do you think?
Love0
Sad0
Happy0
Sleepy0
Angry0
Dead0
Wink0
Previous Article Cook call helped Trump introduce tariff exemptions helping Apple
Next Article We might have just gotten our first look at part of the Apple Vision Air
Leave a comment

Leave a Reply Cancel reply

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

Stay Connected

248.1k Like
69.1k Follow
134k Pin
54.3k Follow

Latest News

Circle to Search now uses your entire screen automatically
News
Check Out Rumoured Specifications, Display, Battery, Pricing and More
Mobile
OpenAI’s planned data center in Abu Dhabi would be bigger than Monaco | News
News
Beloved retailer to exit low price era as price hikes confirmed
News

You Might also Like

Computing

The HackerNoon Newsletter: Police Officers Are Turning Into Reddit Mods Thanks to Amazons Neighborhood Watch (5/16/2025) | HackerNoon

1 Min Read
Computing

How to Become Mr. Worldwide and Get Your Articles Translated to 77 Different Languages | HackerNoon

3 Min Read
Computing

Free Figma Style Guide Templates to Create Consistent Designs

25 Min Read
Computing

Is AI Making People Delusional? | HackerNoon

10 Min Read
//

World of Software is your one-stop website for the latest tech news and updates, follow us now to get the news that matters to you.

Quick Link

  • Privacy Policy
  • Terms of use
  • Advertise
  • Contact

Topics

  • Computing
  • Software
  • Press Release
  • Trending

Sign Up for Our Newsletter

Subscribe to our newsletter to get our newest articles instantly!

World of SoftwareWorld of Software
Follow US
Copyright © All Rights Reserved. World of Software.
Welcome Back!

Sign in to your account

Lost your password?