Date & time function

DAYS function

Returns the number of days between two dates (end date minus start date).

Available in Excel 2013 and later, Excel for the web

Excel 2013 and laterWorks in Google Sheets

Syntax

DAYS(end_date, start_date)
ArgumentWhat it means
end_dateRequiredThe later date. Note it comes first.
start_dateRequiredThe earlier date.

Returns: A whole number of days; negative if end_date is before start_date.

How DAYS works

DAYS counts the calendar days between two dates. It is the same as subtracting one date from another (=B2-A2), but it has two small advantages: the result is always a plain number (subtraction sometimes inherits a date format and shows something like "19-Jan-1900"), and it accepts dates written as text, such as "2026-12-25", converting them for you.

Watch the argument order: the end date comes first, which is the reverse of DATEDIF and most other date functions. If you swap them you simply get a negative number. DAYS counts every calendar day; to skip weekends and holidays use NETWORKDAYS instead.

Examples

1How many days late was the payment?

D2fx=DAYS(C2,B2)
ABCD
1InvoiceDue datePaid onDays late
2INV-20412026-10-152026-11-0319

Result: 19

The payment arrived 19 days after the due date. Use MAX(0, DAYS(C2,B2)) if early payments should show 0 rather than a negative number.

2Countdown using text dates

A1fx=DAYS("2026-12-25","2026-12-02")
A
123

Result: 23

DAYS converts both text dates automatically: there are 23 days from 2 December to Christmas Day.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 13 KB

Common errors and how to fix them

ErrorWhy it happensFix
#VALUE!A text argument cannot be read as a date.Use ISO text like "2026-12-25" or a real date cell.
#NUM!A numeric argument is outside Excel's valid date range.Check for very large or negative numbers.

Tips

  • Remember: end date first. =DAYS(start, end) returns a negative count.
  • For days remaining from today use =DAYS(B2,TODAY()).
  • To count only working days use NETWORKDAYS; to count on a 30/360 basis for interest, use DAYS360.

Google Sheets

DAYS also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.

DAYS in other languages

In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.

LanguageFunction name
DanishDAGE
DutchDAGEN
FinnishPÄIVÄT
FrenchJOURS
GermanTAGE
HungarianNAPOK
ItalianGIORNI
Norwegian (Bokmål)DAGER
PolishDNI
Portuguese (Brazil)DIAS
Portuguese (Portugal)DIAS
RussianДНИ
SpanishDIAS
SwedishDAGAR
TurkishGÜNSAY

Recipes that use DAYS