Pinterest Pixel

DAYS Formula in Excel

Bryan
DAYS function in Excel is used to calculate the number of days between two dates.
It is useful in tracking project deadlines, employee attendance, invoices, or subscription periods.

In this article, you will learn how to use the DAYS formula in Excel.

DAYS function in Excel is used to calculate the number of days between two dates. It is useful in tracking project deadlines, employee attendance, invoices, or subscription periods. In this article, you will learn how to use the DAYS formula in Excel.

Key Takeaways:

  • The DAYS function calculates the number of days between two dates.
  • Enter the end date first and the start date second.
  • The result can be positive, negative, or zero.
  • DAYS automatically handles leap years without extra formulas.
  • It is useful for deadlines, billing, and date tracking.

 

Download excel workbookDAYS-FORMULA.xlsx

 

DAYS Formula: An Introduction

The DAYS function calculates the number of days between two dates in Excel. It is less error-prone than manually subtracting one date from another. The syntax of DAYS formula is:

=DAYS(end_date, start_date)

  • end_date → The later date
  • start_date → The earlier date

 

Step-by-Step Guide to DAYS Formula in Excel

STEP 1: We need to enter the DAYS function in a blank cell:

DAYS Formula in Excel

STEP 2: The DAYS arguments: end_date

What is the ending date?

Select the cell containing the ending date:

DAYS Formula in Excel

start_date

What is the starting date?

Select the cell containing the starting date:

DAYS Formula in Excel

Apply the same formula to the rest of the cells by dragging the lower-right corner downwards.

DAYS Formula in Excel

You now have your differences in days!

DAYS Formula in Excel

 

Real-Life Use Cases

1. Project Deadlines

When managing projects, I often have a target completion date and a current date. With DAYS, I can instantly see how many days are left:

DAYS Formula in Excel

If the result is negative, I know that the deadline has passed. It can also be useful in catching any data entry errors, like typing 2027 instead of 2026.

2. Age in Days

It can be used to calculate the exact age of a person.

DAYS Formula in Excel

In seconds, I had the number. It would’ve taken me way longer to count month-by-month.

3. Rental Periods & Billing

For invoicing rental equipment, I use DAYS to figure out exactly how many days a customer kept an item.

DAYS Formula in Excel

Multiply that by the daily rate, and the math is airtight.

4. Event Planning

When planning events, DAYS helps me keep track of countdowns. I’ll set up a “Days Left” column:

DAYS Formula in Excel

When that hits zero, I know it’s go-time.

 

Common Errors to Avoid

Reversing the Dates

The syntax requires the end date first and the start date second. If you reverse them, Excel returns a negative number instead of a positive value.

Using Text Instead of Dates

If a cell contains text that Excel does not recognize as a valid date, the DAYS function returns a #VALUE! error. Always make sure your dates are stored as actual Excel dates.

Including Time Values

The DAYS function calculates only the difference between dates. Any time values included in the cells are ignored.

 

FAQs

What is DAYS function?

The DAYS function returns the total number of days between two dates. t is commonly used to calculate deadlines, project durations, and billing periods.

What is the syntax of the DAYS function?

The syntax is =DAYS(end_date, start_date). Always enter the ending date as the first argument and the starting date as the second argument.

Can the DAYS function return a negative number?

Yes. It returns a negative value if the end date is earlier than the start date. A negative result simply indicates that the dates were entered in reverse order or that the end date has already passed.

Does the DAYS function work with text dates?

It works only if Excel recognizes the text as a valid date. If the text is not in a valid date format, the function returns a #VALUE! error. Converting the text to a proper date fixes the issue.

Can I use the DAYS function with TODAY()?

Yes. It can calculate the number of days from today to another date.

If you like this Excel tip, please share it




Bryan

Bryan Hong is an IT Software Developer for more than 10 years and has the following certifications: Microsoft Certified Professional Developer (MCPD): Web Developer, Microsoft Certified Technology Specialist (MCTS): Windows Applications, Microsoft Certified Systems Engineer (MCSE) and Microsoft Certified Systems Administrator (MCSA).

He is also an Amazon #1 bestselling author of 4 Microsoft Excel books and a teacher of Microsoft Excel & Office at the MyExecelOnline Academy Online Course.

See also  How to Convert 1.7m to Feet in Excel

Star 30 Days - Full Access Star

One Dollar Trial

$1 Trial for 30 days!

Access for $1

Cancel Anytime

One Dollar Trial
  • Get FULL ACCESS to all our Excel & Office courses, bonuses, and support for just USD $1 today! Enjoy 30 days of learning and expert help.
  • You can CANCEL ANYTIME — no strings attached! Even if it’s on day 29, you won’t be charged again.
  • You'll get to keep all our downloadable Excel E-Books, Workbooks, Templates, and Cheat Sheets - yours to enjoy FOREVER!
  • Practice Workbooks
  • Certificates of Completion
  • 5 Amazing Bonuses
Satisfaction Guaranteed
Accepted paymend methods
Secure checkout

Get Video Training

Advance your Microsoft Excel & Office Skills with the MyExcelOnline Academy!

Dramatically Reduce Repetition, Stress, and Overtime!
Exponentially Increase Your Chances of a Promotion, Pay Raise or New Job!

Learn in as little as 5 minutes a day or on your schedule.

Learn More!

Share to...