DAYS Function

Counts the days between two dates.

Category

Date & Time

Available in

Excel 2013+, Microsoft 365

Returns

A whole number of days

Want to practice DAYS in a real spreadsheet? Open a blank sheet in our Practice Sandbox and try it with live data, with the AI Excel tutor beside you. No Excel needed — just a free account.Try it free in the Sandbox

Overview

DAYS returns the number of days from a start date to an end date. Notice the order: the end date comes first.

It's the same as subtracting one date from the other, but it also accepts dates written as text.

Syntax

=DAYS(end_date, start_date) Explain

Arguments

ArgumentRequired?What it does
end_dateYesThe later date.
start_dateYesThe earlier date. If it's after end_date, the result is negative.

Examples

Example 1 — Length of each project

Count the calendar days from start to finish.

C2fx=DAYS(B2,A2)
ABC
1StartFinishDays
23/2/20263/31/202629
31/15/20264/15/202690
412/20/20251/5/202616
=DAYS(B2,A2) Explain

Example 2 — Including both the start and the end day

Add 1 when both days count, such as a hotel stay counted in days.

=DAYS(B2,A2)+1 Explain

Common mistakes

  • A negative answer. The arguments are the wrong way round — end date first, then start date.

Notes

Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.