DAYS Function
Counts the days from start_date to end_date.
Syntax
Parameters
| Parameter | Description | Required |
|---|---|---|
| end_date | The later date. This is the FIRST argument, the opposite of the intuitive order. | Required |
| start_date | The earlier date. This is the SECOND argument. | Required |
Basic Example
Days between the 1st and 15th of January
=DAYS(DATE(2024, 1, 15), DATE(2024, 1, 1))end_date (Jan 15) minus start_date (Jan 1) is 14 days. Note that end_date comes first.
Advanced Examples
Example 1: Spanning two months including a leap day
From Jan 1 to Mar 1 in a leap yearCounts each day across the boundary
=DAYS(DATE(2024, 3, 1), DATE(2024, 1, 1))Example 2: Reversed dates give a negative result
Accidentally swapping the argumentsOrder matters: end first, start second
=DAYS(DATE(2024, 1, 1), DATE(2024, 1, 15))How DAYS Works
DAYS simply subtracts start_date from end_date using their underlying serial numbers. Because dates are stored as integers, the difference is the exact number of days between them, including leap days.
Important Notes & Limitations
Available only in Excel 2013 and later; in older versions use end_date - start_date directly.
The argument order is (end_date, start_date), the reverse of what many expect.
Text date strings must be parsed by Excel, otherwise you get #VALUE!.
Common Errors & Fixes
Negative result unexpectedlyThe arguments were supplied in the wrong order (start before end).Fix: Put the later date first: DAYS(end_date, start_date).
#VALUE!One or both arguments are text Excel cannot interpret as a date.Fix: Use real date serials or DATE(...) so the values are numeric.
Download Practice File
DAYS
daysPractice DAYS with Real Data
Download a sample CSV file with pre-populated data and practice exercises for the DAYS function. Works in both Excel and Google Sheets.
File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps