Contact

DAYS Function (Gnumeric)

Date & Time Beginner Gnumeric

Learn the DAYS function in Gnumeric: Calculates the number of days between two dates.

Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Gnumeric. How formula examples are checked

Quick answer: Use =DAYS(end_date,start_date) to get the calendar-day difference end minus start. The result is positive if the ending date is later, negative if it is earlier, and zero for equal dates. For example, =DAYS(DATE(2024,3,1),DATE(2024,2,28)) has the expected result 2, because February 2024 has 29 days. Gnumeric Date/Time manual — DAYS, consulted 2026-10-11.

What DAYS does — and when to use it

DAYS counts every calendar day separating two date serial values. It does not remove weekends or public holidays. Common uses include turnaround intervals, elapsed days between shipments, and the days remaining before a deadline. The sign is meaningful: a negative result can flag that an end date precedes its start date. The official Gnumeric manual specifies this signed difference. If your goal is instead working days, compare the separately documented NETWORKDAYS function; that is a different calculation.

Official syntax and arguments

=DAYS(end_date,start_date)

end_date — Required. The ending numeric date serial, a reference to a date-valued cell, or a formula such as DATE(2024,3,1).

start_date — Required. The starting date serial, cell reference or date-generating formula.

Argument order matters. DAYS puts the end first, unlike DATEDIF(start_date,end_date,interval) and DAYS360(start_date,end_date,method). There is no optional third argument or documented special counting mode. Gnumeric’s manual identifies DAYS as OpenFormula compatible. Source: Gnumeric Date/Time manual, DAYS, accessed 2026-10-11.

Set up a reproducible worksheet

Enter the following dates using formulas so your spreadsheet does not depend on the regional interpretation of 02/03/2024:

On a narrow screen, scroll this table sideways to see every column.

Cell Enter this formula Expected date shown
A2 =DATE(2024,2,28) February 28, 2024
B2 =DATE(2024,3,1) March 1, 2024
C2 =DAYS(B2,A2) 2 (number; not a date)
D2 =B2-A2 2 (independent comparison in the same date system)

You can type =DAYS(B2,A2) into C2 and format it as Number/General if a previous date formatting choice makes the result look like a calendar date. The DATE(year,month,day) function creates date serials. Gnumeric documents an Excel-compatible historic serial convention, including the 1900 leap-year compatibility exception; these examples deliberately use modern Gregorian dates. Gnumeric Date/Time manual — DATE, accessed 2026-10-11.

Expected examples: leap years, reversed dates, and zero days

These expected results are independently calculated from ordinary modern Gregorian calendar dates, not observed Gnumeric output:

On a narrow screen, scroll this table sideways to see every column.

Formula Expected result Why
=DAYS(DATE(2024,3,1),DATE(2024,2,28)) 2 Includes the leap day February 29, 2024.
=DAYS(DATE(2024,2,28),DATE(2024,3,1)) -2 Reversing start/end reverses the sign.
=DAYS(DATE(2025,1,1),DATE(2024,12,31)) 1 Crossing a year boundary is ordinary subtraction.
=DAYS(DATE(2024,4,15),DATE(2024,4,15)) 0 Both arguments identify the same day.
=DAYS(DATE(2024,3,4),DATE(2024,2,28)) 5 Difference across leap February.

What is counted? The gap from the start of the first date to the start of the second, not the number of date labels in an inclusive range. A date span from March 1 through March 3 has a DAYS difference of 2, even though the inclusive list contains three calendar dates. If the task genuinely needs an inclusive count and dates are in ascending order, =DAYS(B2,A2)+1 changes the definition; do not add one by default.

Practical examples beyond a simple date difference

1. Deadline status with a fixed evaluation date. Put =DATE(2024,5,10) in A5 and =DATE(2024,5,13) in B5. =DAYS(B5,A5) has the expected result 3; reversing the references gives -3. Replacing A5 with TODAY() provides a rolling “days to deadline” calculation; note that Gnumeric recalculates TODAY() and its value can change on later days, so it is unsuitable for a fixed reproducible demonstration.

2. Timely deliveries without hiding late records. Suppose A2 is the promised date and B2 the actual delivery date. =DAYS(B2,A2) yields positive days late, zero on-time, and negative days early. =IF(DAYS(B2,A2)>0,"Late","On time or early") is a convenient classification only if both dates are valid. The IF usage is a composed example, not a separate native execution claim.

3. Calendar intervals are not working-day intervals. Saturday and Sunday are both included in DAYS; do not label the output “business days.” For whole months or years, use a documented date-oriented function such as DATEDIF when its specialized semantics fit, rather than dividing the day difference by 30 or 365 and calling it exact.

Problems, limitations, and troubleshooting

  • Unexpected negative number: Check the argument order; it is end_date then start_date.
  • Wrong results for a typed date: Text like 3/4/2024 may be interpreted differently under different locales, or it may remain text. Construct values with DATE(2024,3,4) or use date-valued cells and confirm formatting. Gnumeric’s own date-format guidance documents regional formats. Date and Time Formats, accessed 2026-10-11.
  • Output appears as a date: Apply a Number/General number format to the result cell; the function returns a day count.
  • Blank, text, invalid serial, or apparent error: First inspect the input type, date-system setting, and any upstream formula errors. The exact runtime error codes and coercion rules for blanks/strings were not verified in Gnumeric for the saved research; do not assume Excel and Gnumeric behave identically for invalid inputs.
  • Unusual historical dates: Modern examples avoid Gnumeric’s 1900/1904 workbook date-epoch differences and the documented fictitious February 1900 serial. Verify workbook date settings before comparing imported serial numbers.

Compatibility, implementation, and evidence quality

Gnumeric’s official Date/Time manual specifies DAYS(end_date,start_date) and explicitly describes OpenFormula compatibility. Its public function catalogue lists days under its “Unique to Gnumeric” classification and “No Testsuite”; these are the catalogue’s labels and do not negate the function’s documented presence or its OpenFormula-compatibility statement. “No Testsuite” is not evidence that the function fails. Other spreadsheet programs also have similarly named date-difference functions; compare argument order and input coercion in their current manuals before migrating workbooks. Gnumeric function catalogue, accessed 2026-10-11.

Gnumeric 1.12.62 was the latest stable release indicated by the GNOME download index at this review date. Official documentation confirms function syntax, but native support in a specific build, plugin configuration, locale or operating environment has not been tested in the recorded checks. GNOME Gnumeric 1.12 release index, accessed 2026-10-11.

DATE · DATEDIF · DAYS360 · NETWORKDAYS · YEARFRAC

Source and validation register

Function presence, exact argument order, signed day difference, OpenFormula statement. Official Date/Time manual, DAYS Documentation checked, 2026-10-11

Project’s function classification and testing label. Official function catalogue, Date/Time Documentation checked, 2026-10-11

Date constructors, serial/date-system notes. Official manual, DATE Documentation checked, 2026-10-11

Date display varies by locale. Gnumeric Date and Time Formats Documentation checked, 2026-10-11

Five fixed-date expected differences and three other date comparisons. Python standard-library datetime.date subtraction, in the example-check record Independently calculated; expected, not natively observed


How this guide was checked

The syntax and behaviour are based on the Gnumeric references cited above. The sample calculations were independently checked; they are expected results, not outputs observed in Gnumeric. Test locale-sensitive text conversion and imported files in your own installation. View the example-check record.

Official DAYS reference · Editorial standards