DAYS Function

Excel Functions › Date & Time

Excel 2013+

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.


Quick answer: days remaining until a deadline in B2:
=DAYS(B2, TODAY())
End date first, start date second. Positive means the deadline is still ahead; negative means it has passed.

Syntax

=DAYS(end_date, start_date)
ArgumentDescription
end_dateRequiredThe later date — and yes, it goes first. Think of it as the order of subtraction: end − start.
start_dateRequiredThe 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:

ABCD
1ProjectKickoffDeadline=DAYS(C2,B2)
2Website refresh01/15/202603/01/202645
3Q2 audit04/01/202605/15/202644
4Office move06/12/202609/30/2026110
=DAYS(C2, B2) // deadline minus kickoff = 45 days

The everyday companion formulas, both built on TODAY:

=DAYS(C2, TODAY()) // days remaining until the deadline
=DAYS(TODAY(), B2) // days elapsed since kickoff

DAYS counts every calendar day — weekends and holidays included. For working days only, that is NETWORKDAYS’s job.

Try it: interactive DAYS demo

Live 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:

=DAYS(C2, B2)
=C2 - B2 // works in every Excel version ever made

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

📊
Download the free DAYS practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

Why does DAYS take the end date first?
It mirrors subtraction: 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?
The number is identical. DAYS is self-documenting and rejects non-date text with a clear error, while subtraction works in every Excel version including pre-2013. Use whichever fits — they are interchangeable for valid dates.
Why is my DAYS result negative?
The arguments are swapped — your start date is sitting in the end_date slot. DAYS does not error on reversed dates; it just returns a negative count. Swap the arguments or wrap the formula in ABS.
Does DAYS include both the start and end date?
No — it returns the gap, so Jan 1 to Jan 2 is 1 day. If both endpoints should count (an inclusive booking, for instance), add 1 to the result.
How do I count only working days between two dates?
Use =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?
DAYS counts real calendar days. DAYS360 pretends every month has 30 days — a convention used in some accounting and bond calculations. For actual elapsed time, always use DAYS.

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

Related functions: DATEDIF · NETWORKDAYS · DAYS360 · TODAY · DATE