DAYS

Count the calendar days from one date to another.

Syntax

DAYS(end_date, start_date)
Argument Required Description
end_date Required The later date. Comes first.
start_date Required The earlier date.

Examples

Every example below was executed against VisiGrid engine 0.35.0 — not transcribed from another vendor's documentation. Reproduce any of them with vgrid calc.

Formula Result Notes
=DAYS(DATE(2024,3,15),DATE(2024,3,11)) 4 Four days apart. End date first — the reverse of how you would say it.
=DAYS(DATE(2024,3,11),DATE(2024,3,15)) -4 Reversed arguments give a negative, not an error.
=DATE(2024,3,15)-DATE(2024,3,11) 4 Plain subtraction does the same thing.

It is subtraction with names

DAYS(end, start) and end - start give the same answer. The function exists because the named form says which way round the subtraction goes, which matters when the dates come from cells rather than literals.

The argument order is the trap: end date first. That reads backwards from how anyone says it out loud, and it is the opposite way round from NETWORKDAYS(start, end). Getting it wrong gives you a negative number rather than an error, so nothing tells you.

Gaps, not days

DAYS counts the distance between two dates. It does not count the dates themselves:

=DAYS(Fri, Mon)                    → 4    four days apart
=NETWORKDAYS(Mon, Fri)             → 5    five working days

Both are correct answers to different questions. “How far apart are these” wants DAYS; “how many days will this take” wants NETWORKDAYS, which counts both ends and skips weekends.

Excel compatibility

Matches Excel, including the end-date-first argument order and negative results.

Related functions

Last updated