Date
Counting days between two dates
Definition
Counting days from one date to another means giving DAYS the later date first and then the earlier date.
Syntax
=DAYS(end_date, start_date)
Arguments
| Argument | Meaning |
|---|---|
end_date |
The later date. This argument comes first. |
start_date |
The earlier date. This argument comes second. |
Worked example
A project list stores the start in B2 and the finish in C2.
| A: Job | B: Start | C: Finish |
|---|---|---|
| Roof | 1 Jan 2021 | 11 Jan 2021 |
| Fence | 1 Feb 2021 | 8 Feb 2021 |
| Path | 1 Mar 2021 | 4 Mar 2021 |
Formula: =DAYS(C2,B2)
Result: 10. From 1 January 2021 to 11 January 2021 is 10 days.
Practice
Cell A2 holds the date 1 June 2020. Cell B2 holds the date 1 June 2023. In C2, write a formula that returns how many days lie from A2 to B2.
- In C2, write a DAYS formula that returns the days from A2 to B2.
- C2 should show the days from A2 to B2.
Step 1 of 2
Enter =DAYS(B2,A2) in C2.
From 1 June 2020 to 1 June 2023 is 1095 days.
Formulas here use English function names, such as SUM, and a period as the decimal separator, in every language.
Loading the sheet…
C2 uses DAYS.
C2 now shows 1095.
The next lesson is Rounding a price up.
Related functions
DAYS is the function that counts the days between those two dates.
Common mistake
Reversing the arguments, as in =DAYS(B2,C2): the later date is second, so the result is -10 instead of 10.