Length of a project
| A | B | |
|---|---|---|
| 1 | Start | End |
| 2 | 1/1/2024 | 3/1/2024 |
Formula: D2: =DAYS(B2,A2)
Result: 60
2024 is a leap year, so January and February add up to 60 days.
DAYS with worked examples you can test in the live grid. The argument details are in the Excel guide.
The arguments and common errors are covered in the DAYS Excel guide; check the function help in Google Sheets for its own argument list.
| A | B | |
|---|---|---|
| 1 | Start | End |
| 2 | 1/1/2024 | 3/1/2024 |
Formula: D2: =DAYS(B2,A2)
Result: 60
2024 is a leap year, so January and February add up to 60 days.
| A | B | |
|---|---|---|
| 1 | Start | End |
| 2 | 1/1/2024 | 3/1/2024 |
Formula: D2: =DAYS(A2,B2)
Result: -60
Swapping the dates simply flips the sign of the answer.
| A | |
|---|---|
| 1 |
Formula: A1: =DAYS(DATE(2025,1,1),DATE(2024,1,1))
Result: 366
From January 1, 2024 to January 1, 2025 is 366 days.
A tiny spreadsheet with example data. Edit the formula or any number and see the result.
Formula in F2: =DAYS(B2,A2)
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Start | End | Holiday | Time | Result | |
| 2 | 3/15/2026 | 6/20/2026 | 5/1/2026 | 14:45 | 97 | |
| 3 | 1/31/2026 | 2/28/2026 | 5/9/2026 | 09:30 | ||
| 4 | 12/24/2025 | 1/9/2026 |
Google Sheets is used here only as a descriptive product name. FormulaCamp is not affiliated with Google.
Enter — commit · F2 — edit · F4 — $ in a reference · Ctrl+C/Ctrl+V — copy and paste · Ctrl+Z — undo
Esc or F6 — leave the sheet for the «Check» button · Shift+Tab in the first cell — back to the page