DAYS Function in Google Sheets: Examples, Pitfalls & Compatibility
DAYS in Google Sheets: find an elapsed calendar-day difference with the end date supplied first. Includes worked examples and application-specific cautions.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: DAYS(end_date,start_date) measures an elapsed calendar interval. =DAYS(DATE(2026,10,12),DATE(2026,10,1)) returns an expected 11, including weekends. Put the end date first even when the source table lists Start before End.
Availability and version history
- Introduced: Introduction version not established by the official history reviewed.
- Availability: Documented in the rolling Google Sheets service; examples use the web spreadsheet workflow.
- Checked: October 14, 2026; official DAYS reference. Documentation check, not a new native test; existing example-verification notes retain their scope.
Syntax and date setup
=DAYS(end_date, start_date)
Both arguments are required. Use validated date cells or DATE expressions. These examples use English names and comma separators; the spreadsheet locale can change date displays and formula punctuation.
Keep the result as a number. DAYS returns a count, whereas DAY extracts a day-of-month component. Neither a date format nor a familiar-looking slash string establishes that the underlying input is a valid date.
Three original worked controls
=DAYS(DATE(2026,10,12),DATE(2026,10,1))
=DAYS(DATE(2026,10,12),DATE(2026,10,12))
=DAYS(DATE(2024,3,1),DATE(2024,2,28))
Expected counts are 11, 0 and 2. The first interval has twelve named dates when both endpoints are listed, but only eleven elapsed days. The second has no elapsed gap. The third crosses February 29, so there are two days rather than one.
These are independently calculated calendar expectations, not captured Google Sheets results. Keep the same-day and leap-day controls when adapting the examples to imported data.
Advanced example: validate a chronological interval
Enter this independent table in A1:B4 using DATE formulas:
| Row | A · Start | B · End |
|---|---|---|
| 2 | =DATE(2026,10,1) | =DATE(2026,10,12) |
| 3 | =DATE(2026,10,12) | =DATE(2026,10,12) |
| 4 | =DATE(2026,10,12) | =DATE(2026,10,1) |
For an explicitly inclusive, date-only reporting policy, enter C2 and fill down:
=IF(B2<A2,"Check dates",DAYS(B2,A2)+1)
Expected outputs are 12, 1 and Check dates. The extra one is a reporting rule added after testing chronological order. It is not part of DAYS itself. The reversed row is flagged rather than assigned an unverified DAYS result or silently made positive with ABS.
This example uses valid dates. It does not claim that IF validates every text input or that every imported string can be compared meaningfully as a date.
Advanced example: separate calendar and working-day questions
=DAYS(DATE(2026,6,8),DATE(2026,6,5))
Friday June 5 to Monday June 8 spans 3 elapsed calendar days. Counting both named dates and the weekend gives 4 inclusive calendar dates. A Monday-through-Friday working calendar contains just 2 eligible dates, Friday and Monday; see NETWORKDAYS for that separate rule.
Adding one to DAYS cannot turn a calendar count into a working-day count. Likewise, a returned 3 says nothing about how many paid hours or shifts occurred during the interval.
Advanced example: measure a complete reporting period
=DAYS(DATE(2026,4,1),DATE(2026,1,1))
=DAYS(DATE(2024,4,1),DATE(2024,1,1))
Expected counts are 90 and 91. These intervals use the first date of the next quarter as an exclusive endpoint. The leap-year quarter contains one additional day. January, February and March contribute 31+28+31 or 31+29+31.
For an October period, =DAYS(DATE(2026,11,1),DATE(2026,10,1)) gives 31. Do not add another one to an already exclusive-next-period interval.
Advanced check: a component subtraction is a different calculation
=DAY(DATE(2026,2,1))-DAY(DATE(2026,1,31))
=DAYS(DATE(2026,2,1),DATE(2026,1,31))
Expected results are -30 and 1. The first expression subtracts the labels 1 and 31; it does not measure elapsed time. Preserve the complete dates until after computing the interval.
Across February 28 to March 1, the forward count is 1 in 2026 and 2 in 2024. These short controls make a leap-day omission easier to detect than a large annual total.
Source discrepancy and unverified cases
Google explicitly documents leap-day inclusion. Its help also prints a reversed 2016/2017 date pair beside a positive 366 result, which conflicts with the stated end-first signature. This guide does not copy that sign example; reversed-date native behavior remains a check to perform separately.
The short reference does not establish a complete rule set for fractional timestamps, text coercion, historical serials or invalid-input error codes. The examples here use date-only values. For hours or partial days, retain the timestamp and establish the intended rule rather than importing Excel’s numeric DAYS behavior.
Related guides and verification
DAYS guide for Microsoft Excel · DATE · DAY · NETWORKDAYS · DATEDIF · All Google Sheets functions
A guide for another spreadsheet is a separate product reference. It does not establish identical date parsing, serial boundaries or error displays after a file import.
The complete guide and original examples were reviewed on October 14, 2026 against direct Google documentation. Calendar, interval and numeric expectations were independently calculated; no native Google Sheets execution, mobile-client certification or complete input-conversion test was performed.