Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to create Checklist in Excel
  • Error Bars in Excel
  • Conflicting Multiple Conditional Formatting Rules in Excel
  • Conditional Formatting Data bars Examples in Excel
  • How to count table columns in Excel

References

  • How to get address of last cell in range in Excel
  • To count total rows in a range in Excel
  • How to use Excel VLOOKUP Function
  • Perform case-sensitive Lookup in Excel
  • How to get address of first cell in range in Excel

Data Validations

  • How To Create Drop-down List in Excel
  • Excel Data validation date in next 30 days
  • Excel Data validation with conditional list
  • Excel Data validation must begin with
  • Excel Data validation must not contain

DAYS function: Description, Usage, Syntax, Examples and Explanation

by

What is DAYS function in Excel?

DAYS function is one of Date and Time functions in Microsoft Excel that returns the number of days between two dates.

Syntax of DAYS function

DAYS(end_date, start_date)

The DAYS function syntax has the following arguments.

  • End_date    Required. Start_date and End_date are the two dates between which you want to know the number of days.
  • Start_date   Required. Start_date and End_date are the two dates between which you want to know the number of days.

Note: Excel stores dates as sequential serial numbers so that they can be used in calculations. By default, Jan 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39447 days after January 1, 1900.

DAYS formula explanation

  • If both date arguments are numbers, DAYS uses EndDate–StartDate to calculate the number of days in between both dates.
  • If either one of the date arguments is text, that argument is treated as DATEVALUE(date_text) and returns an integer date instead of a time component.
  • If date arguments are numeric values that fall outside the range of valid dates, DAYS returns the #NUM! error value.
  • If date arguments are strings that cannot be parsed as valid dates, DAYS returns the #VALUE! error value.

Example of DAYS function

Steps to follow:

1. Open a new Excel worksheet.

2. Copy data in the following table below and paste it in cell A1

Note: For formulas to show results, select them, press F2 key on your keyboard and then press Enter.

You can adjust the column widths to see all the data, if need be.

Data
12/31/2011
1/1/2011
Formula Description Result
=DAYS(“3/15/11″,”2/1/11”) Finds the number of days between the end date (3/15/11) and end date (2/1/11). When you enter a date directly in the function, you need to enclose it in quotation marks. Result is 42. 42
=DAYS(A2,A3) Finds the number of days between the end date in A2 and the start date in A3 (364). 364

Post navigation

Previous Post:

CUBEVALUE function: Description, Usage, Syntax, Examples and Explanation

Next Post:

CLEAN function: Description, Usage, Syntax, Examples and Explanation

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • XOR function: Description, Usage, Syntax, Examples and Explanation
  • AND function: Description, Usage, Syntax, Examples and Explanation
  • Check multiple cells are equal in Excel
  • SWITCH function: Description, Usage, Syntax, Examples and Explanation
  • How to return blank in place of #DIV/0! error in Excel

Date Time

  • YEAR function: Description, Usage, Syntax, Examples and Explanation
  • NOW function: Description, Usage, Syntax, Examples and Explanation
  • Get fiscal year from date in Excel
  • How to calculate percent of year complete in Excel
  • How to determine year is a leap year in Excel

Grouping

  • Group times into 3 hour buckets in Excel
  • How to randomly assign data to groups in Excel
  • How to randomly assign people to groups in Excel
  • Calculate conditional mode with criteria in Excel
  • Categorize text with keywords in Excel

General

  • How to create dynamic named range with INDEX in Excel
  • Excel Operators
  • How to calculate percent change in Excel
  • Share Excel data with Word documents
  • Sum by group in Excel
© 2026 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning