The Excel DAYS function returns the number of days between two dates — the simplest of all date calculations, given its own function in Excel 2013. The one thing everybody trips on: the end date comes first. It is DAYS(end, start), mirroring the subtraction end − start that works in every Excel version. Pair it with TODAY for live countdowns.
Syntax
| Argument | Description | |
|---|---|---|
end_date | Required | The later date — and yes, it goes first. Think of it as the order of subtraction: end − start. |
start_date | Required | The earlier date. If it is actually the later one, DAYS happily returns a negative number rather than an error. |
Available in: Excel 2013 and later, Excel for Microsoft 365, and Excel for the web. In Excel 2010 and earlier the name is not recognized — but plain subtraction =end-start gives the identical result in every version ever shipped.
Counting days between two dates
Each project row holds a kickoff date in B and a deadline in C. Column D counts the calendar days between them:
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Project | Kickoff | Deadline | =DAYS(C2,B2) |
| 2 | Website refresh | 01/15/2026 | 03/01/2026 | 45 |
| 3 | Q2 audit | 04/01/2026 | 05/15/2026 | 44 |
| 4 | Office move | 06/12/2026 | 09/30/2026 | 110 |
The everyday companion formulas, both built on TODAY:
DAYS counts every calendar day — weekends and holidays included. For working days only, that is NETWORKDAYS’s job.
Try it: interactive DAYS demo
Pick two dates and watch DAYS count the gap — note what happens when you swap them.
DAYS vs. plain subtraction
These two formulas return exactly the same number:
So why does DAYS exist? Two practical edges:
- It reads as intent.
DAYS(end, start)says what the formula does; a bare subtraction could be anything. - It validates its inputs. Feed DAYS a text value that is not a recognizable date and you get a clean error. Subtraction on the wrong cells can silently produce a meaningless number.
If subtraction shows a date instead of a number: the result cell inherited date formatting. Press Ctrl+1 and set the format to General — the underlying value was right all along. DAYS results, arriving as a plain number, dodge this annoyance more often than not.
Errors & common pitfalls
Pitfall: the argument order is backwards from what you expect. Nearly every other date function takes the start date first — DAYS takes the end date first. Get it backwards and there is no error, just a negative answer quietly poisoning downstream math. If a countdown shows -45 instead of 45, this is why.
#VALUE! — an argument isn’t a real date. Text like "Jan 15th" or a date typed with stray spaces cannot be interpreted. Store real dates (use DATE to build them reliably) or check suspect cells with ISNUMBER.
#NAME? — Excel 2010 or earlier. DAYS arrived in Excel 2013. On older versions, replace it with subtraction: =end_date - start_date.
Pitfall: DAYS counts calendar days, not working days. A Friday-to-Monday gap is 3 days to DAYS. If you need business days — weekends and holidays excluded — reach for NETWORKDAYS instead.
Pitfall: the boundary days are not both counted. DAYS returns the difference, so Monday to Friday is 4, not 5. If your scenario should include both endpoints (nights vs. hotel days, inclusive rentals), add 1.
Practice workbook
Frequently asked questions
Why does DAYS take the end date first?
DAYS(end, start) computes end − start. It feels backwards next to functions like DATEDIF and NETWORKDAYS that take the start first, but the subtraction analogy is the way to remember it.What's the difference between DAYS and just subtracting two dates?
Why is my DAYS result negative?
Does DAYS include both the start and end date?
How do I count only working days between two dates?
=NETWORKDAYS(start, end), which skips weekends and an optional holiday list — and note it takes the start date first, unlike DAYS.What's the difference between DAYS and DAYS360?
Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class