Excel function

DAYSfunction

Returns the number of days between two dates (end_date - start_date).

All versions
=DAYS(DATE(2026,12,25), DATE(2026,12,1))
Clicking a date sets

December 2026

Sun
Mon
Tue
Wed
Thu
Fri
Sat

Click a date on the calendar to change end_date. Choose "Change start date" and click a date after the end date. The result becomes negative. Try breaking it on purpose to see the errors.

Result

24

end_date
Dec 25, 2026 (Fri)

The later date. DAYS takes end_date first.

start_date
Dec 1, 2026 (Tue)

The earlier date. The result is end_date minus start_date.

What is the DAYS function?

=DAYS(end_date, start_date)

DAYS returns the number of days between two dates. The result equals end_date minus start_date.

Unlike other date functions, end_date comes first. Reversing the order gives a negative result; move the start date after the end date on the calendar above to see it.

Arguments

end_date
The later date.
start_date
The earlier date.

DAYS examples

  1. Example 1. Days to Christmas

    =DAYS(DATE(2026,12,25), DATE(2026,12,1))

    December 25 minus December 1 is 24 days.

  2. Example 2. From today to a deadline

    =DAYS(B2, TODAY())

    Recalculates every day how many days are left until the deadline in B2. After the deadline it becomes negative.

  3. Example 3. The same with subtraction

    =B2-A2

    Dates are serial numbers, so plain subtraction gives the same days. If the result cell turns into a date format, change it back to General.

Common mistakes

FAQ

Working days only?
Use NETWORKDAYS to leave out weekends and holidays.
What if I pass date text?
According to Microsoft, text that cannot be read as a date gives #VALUE!.