Quick Answer

DAYS Function

Counts the days from start_date to end_date.

✓ Excel✓ Google SheetsExcel Excel 2013+

Syntax

DAYS
(end_date, start_date)

Parameters

ParameterDescriptionRequired
end_dateThe later date. This is the FIRST argument, the opposite of the intuitive order.Required
start_dateThe 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))
Result14

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 year

Counts each day across the boundary

=DAYS(DATE(2024, 3, 1), DATE(2024, 1, 1))
Result: 60
January (31 days) plus February 2024 (29 days, leap year) equals 60 days.

Example 2: Reversed dates give a negative result

Accidentally swapping the arguments

Order matters: end first, start second

=DAYS(DATE(2024, 1, 1), DATE(2024, 1, 15))
Result: -14
Because the earlier date is first, the result is negative (Jan 1 minus Jan 15 = -14).

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.

1
Enter end_date first
Provide the later date as the first argument.
2
Enter start_date second
Provide the earlier date as the second argument.
3
Read the day count
The result is end_date minus start_date.

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

Practice 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.

Works in Google SheetsCompatible with ExcelIncludes exercises

File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps

Frequently Asked Questions

Why is end_date the first argument?
DAYS(end_date, start_date) mirrors the subtraction end minus start; the order is easy to confuse with DATEDIF.
What is the difference from DATEDIF?
DAYS returns total days; DATEDIF can return years, months, or day remainders.
Does DAYS account for leap years?
Yes, because it works on serial numbers; Feb 29 simply exists as a day.