Pinterest Pixel

DAYS Formula in Excel

Bryan
When I first stumbled upon the DAYS formula in Excel, I thought, “Great, yet another function I’ll probably never use.” I was wrong.
This tiny formula has saved me from hours of manual counting, avoided embarrassing mistakes in deadlines, and made me look a lot more organized than I actually am.

When I first stumbled upon the DAYS formula in Excel, I thought, “Great, yet another function I’ll probably never use.” I was wrong. This tiny formula has saved me from hours of manual counting, avoided embarrassing mistakes in deadlines, and made me look a lot more organized than I actually am.

In this article, I’m going to walk you through everything I’ve learned about the DAYS formula in Excel—what it is, how it works, where it can trip you up, and how I’ve used it in real-world scenarios.

Key Takeaways:

  • The DAYS function calculates the number of days between two dates quickly and clearly.
  • Syntax is simple: =DAYS(end_date, start_date) with end date first, start date second.
  • It’s safer and more readable than subtracting dates manually.
  • DAYS automatically handles leap years without extra formulas.
  • Real-world uses include deadlines, age calculation, rental billing, and event countdowns.

DAYS Formula in Excel | MyExcelOnline

Download excel workbookDAYS-FORMULA.xlsx

 

DAYS Formula: An Introduction

What is the DAYS Function?

At its core, the DAYS function calculates the number of days between two dates in Excel. Instead of manually subtracting one date from another (which, yes, you can do), DAYS gives you a clean, explicit way to get the result without ambiguity. The syntax is ridiculously simple:

=DAYS(end_date, start_date)

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

That’s it. No hidden parameters. No weird optional arguments. Just dates.

Why Use DAYS Instead of Just Subtracting Dates?

Here’s the thing: you could just write:

=EndDate – StartDate

And Excel will give you the number of days. But the DAYS formula has some key advantages I’ve come to appreciate:

  • Clarity – When I open a file months later, =DAYS(A2, A1) tells me exactly what’s going on. A raw subtraction like =A2-A1 doesn’t.
  • Fewer mistakes – I don’t have to remember which cell to subtract from which. If I mix them up in subtraction, I get a negative number. With DAYS, I know the order: end date first, start date second.
  • Data type safety – DAYS will throw an error if it gets something that isn’t a date, whereas subtraction might quietly give you a strange number that makes no sense.

 

Step-by-Step Guide to DAYS Formula in Excel

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

=DAYS(

DAYS Formula in Excel

STEP 2: The DAYS arguments: end_date

What is the ending date?

Select the cell containing the ending date:

=DAYS(D9,

DAYS Formula in Excel

start_date

What is the starting date?

Select the cell containing the starting date:

=DAYS(D9, C9)

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

Here’s where DAYS has been a game-changer for me.

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(TargetDate, TODAY())

DAYS Formula in Excel

If the result is negative, I know I’m past the deadline. I once caught a delivery date mistake in a shared project sheet this way—someone had accidentally entered “2026” instead of “2025.” DAYS showed a 500+ day gap, and we fixed it before the client saw it.

2. Age in Days

I once needed to calculate a pet’s exact age in days for a vet form. Yes, they were that specific.

=DAYS(TODAY(), BirthDate)

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.

Example:

=DAYS(ReturnDate, RentalDate)

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(EventDate, TODAY())

DAYS Formula in Excel

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

 

FAQs

1. What does the DAYS function do in Excel?

The DAYS function returns the total number of days between two dates. It works by taking an end date and a start date and calculating the difference. This can be positive or negative depending on the order of the dates. It’s a more explicit and readable alternative to subtracting dates directly in Excel.

2. Why should I use DAYS instead of simple subtraction?

While subtracting dates works, DAYS is more self-explanatory and reduces errors. When revisiting a spreadsheet after months, =DAYS(A2, A1) clearly shows the intention. DAYS also throws an error for invalid dates, whereas subtraction might silently return meaningless numbers. This makes your formulas safer and easier to maintain.

3. Can DAYS handle leap years automatically?

Yes, DAYS accounts for leap years without any additional work from you. For example, calculating between February 28 and March 1 in a leap year will return 2 days instead of 1. This ensures accuracy even in long date ranges that cross multiple years.

4. What happens if I reverse the dates in the DAYS function?

If you put the start date after the end date, DAYS will return a negative number. For example, =DAYS(“01-Jan-2025”, “15-Aug-2025”) gives -226. This can be useful for showing overdue days but can cause confusion if you only expect positive results. Always double-check the argument order.

5. Does DAYS consider weekends or business days?

No, DAYS simply counts every calendar day between the two dates, including weekends and holidays. If you need to calculate only working days, use the NETWORKDAYS function instead. This is important if you’re dealing with payroll, project scheduling, or timelines that exclude non-working days.

If you like this Excel tip, please share it



DAYS Formula in Excel | MyExcelOnline


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 Multiply Decimals by Whole Numbers 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...