Calligra Sheets EOMONTH Function: Find Month-End Dates
Calculate the last calendar day of a month shifted forward or backward using EOMONTH in Calligra Sheets, with leap-year, billing and date-conversion examples.
Verification status: Consult the documentation and examples below. Native application testing has not been documented for this guide. How formula examples are checked
Quick answer
EOMONTH returns the last calendar day of a month relative to a starting date. Give it a date and a positive, negative or zero whole-month offset. For instance, =EOMONTH(DATE(2024;1;31);1) is expected to represent February 29, 2024: one month after January 2024 lands in February, and the last day of that leap-year month is the 29th. Unlike EDATE, EOMONTH always moves to the end of the destination month.
Validation boundary. KDE’s Calligra Sheets 26.08.2 function XML/registration/implementation and the official handbook were checked on 2026-10-12. The application was not run. All dates labelled expected below are independently computed Gregorian-calendar results consistent with the pinned source; they are not screenshots, native execution results or a promise about a particular localized date display. Availability on every platform/build and export/import behavior have not been tested.
Exact syntax and parameter order
=EOMONTH(date;months)
The two arguments are required, in this exact order. Calligra’s 26.08.2 registration uses setParamCount(2)—there are no optional parameters or default offsets.
| Argument position | Parameter | Official XML type | What to enter |
|---|---|---|---|
| 1 | date |
String (legacy XML input label) |
A starting calendar date. Prefer a real date cell or a DATE(year;month;day) expression rather than ambiguous date-like text. |
| 2 | months |
Int |
A signed whole-number offset: positive for future months, negative for earlier months, zero for the current month. |
Return type: Date in the XML. The examined implementation converts the first parameter to a Qt QDate, shifts it through the EDATE helper, moves it to the final day of the resulting month and constructs a Calligra date value. The legacy XML’s String parameter label is not evidence that every quoted, region-dependent date string will parse reliably.
The KDE EOMONTH reference displays semicolons in its English examples. If a localized formula editor uses different separators, follow the syntax it shows. The display may use 2024-02-29, 29/02/2024, 2/29/2024, or another configured date pattern; those are not different function results. For the worksheet below, format the result column as an ISO-like YYYY-MM-DD date for easier comparison.
Compatibility alias: Pinned source registers the alternate name COM.SUN.STAR.SHEET.ADDIN.ANALYSIS.GETEOMONTH. It points to this same canonical EOMONTH implementation and is not a separate function.
Step-by-step worksheet: compute six month-end dates
- In A1 type
Start date, in B1 typeMonths to move, and in C1 typeLast day of target month. - Enter the
DATEformulas below in A2:A7. Each creates an actual intended date rather than a date string whose interpretation depends on locale. - Enter the integer offsets shown below into B2:B7.
- In C2 type
=EOMONTH(A2;B2)and fill down to C7. Display column C as a date (ideally YYYY-MM-DD) and compare it against these independently calculated expectations:
| Row | A — formula entered for start date | B — months | C — formula | Expected calendar result |
|---|---|---|---|---|
| 2 | =DATE(2024;1;31) |
1 | =EOMONTH(A2;B2) |
2024-02-29 |
| 3 | =DATE(2023;1;31) |
1 | =EOMONTH(A3;B3) |
2023-02-28 |
| 4 | =DATE(2024;6;15) |
-1 | =EOMONTH(A4;B4) |
2024-05-31 |
| 5 | =DATE(2024;2;29) |
0 | =EOMONTH(A5;B5) |
2024-02-29 |
| 6 | =DATE(2024;11;30) |
2 | =EOMONTH(A6;B6) |
2025-01-31 |
| 7 | =DATE(2024;12;31) |
-12 | =EOMONTH(A7;B7) |
2023-12-31 |
How to reproduce the date calculation independently: Take the starting year/month, move by the requested number of calendar months, and select that target month’s final day (28, 29, 30 or 31 as applicable). A separate Gregorian calendar calculation—not running Calligra—was used to check all six row results. Because the implementation internally uses Qt QDate::addMonths followed by setDate(year, month, daysInMonth), the source supports the same expected calendar-date behavior for these examples. The application’s actual displayed result remains unobserved.
Tiny direct-formula checks
=EOMONTH(DATE(2024;1;31);1) → expected 2024-02-29
=EOMONTH(DATE(2024;3;15);0) → expected 2024-03-31
=EOMONTH(DATE(2024;1;31);-1) → expected 2023-12-31
The arrows annotate expected date values, not literal text strings to type in cells. KDE’s XML also contains examples using quoted dates such as EOMONTH("2/22/2002";3); they are handbook examples, not evidence that a given locale accepts US-style date strings.
Why EOMONTH is different from EDATE
EDATE shifts a date by whole calendar months and attempts to keep its day-of-month, adjusting to a valid day if the destination month is shorter. EOMONTH shifts to that month and then returns its final day, even if the starting day was the 1st or the 15th.
For example, with =DATE(2024;6;15) in A4 and -1 in B4, =EDATE(A4;B4) is expected to represent May 15, 2024, whereas =EOMONTH(A4;B4) is expected to represent May 31, 2024. This difference is independently calculated and supported by the separate code paths. Neither formula was run natively for this manuscript. Choose EDATE for a matching monthly anniversary; choose EOMONTH for month-end deadlines.
More practical and advanced applications
Recurring last-day-of-month billing
Put the signup date in A2 as a real date, and put a nonnegative integer billing-cycle number in B2. Use:
=EOMONTH(A2;B2)
With A2 = DATE(2024;1;31) and B2 = 3, the expected period-end date is 2024-04-30. For a new billing table, keep the original signup date fixed in the first argument and increment B rather than expecting repeated text-date imports to behave consistently. If the schedule’s contractual rule is instead “last business day,” EOMONTH alone is not enough: it ignores weekdays/holidays and returns the calendar month end.
Last day of the current month for a fixed input
If D2 contains a real date such as =DATE(2024;8;9), enter:
=EOMONTH(D2;0)
Expected date: 2024-08-31. The zero month offset is necessary because Calligra 26.08.2 registers exactly two parameters. Unlike using TODAY(), the fixed DATE formula makes the example independently reproducible regardless of the day it is opened.
First day of the next month
For D2 = DATE(2024;8;9), the expression below is intended to add one calendar day to the end of the month:
=EOMONTH(D2;0)+1
Expected calendar date: 2024-09-01, provided the installed build treats addition of numeric one to the returned date as advancing one day. The month-end portion is supported by pinned EOMONTH source; this date-arithmetic integration has not been executed natively and requires a live Calligra check before operational use. A fully component-based alternative is =DATE(YEAR(D2);MONTH(D2)+1;1) (also a source-inferred expectation).
Flag records that close in a chosen month
With date in A2, enter:
=IF(EOMONTH(A2;0)=DATE(2024;2;29);"February 2024 month-end";"Different month")
For A2 containing a valid February 2024 date, the expected label is February 2024 month-end. This also relies on separately implemented IF, DATE and date-comparison semantics; the combined behavior is a documentation/source-supported expectation only, not a native formula test. The formula is for teaching categorization, not for making a regulatory or financial determination without validation.
Errors, limits, and troubleshooting
- Not exactly two arguments:
EOMONTH(A2)orEOMONTH(A2;1;2)violates registrationsetParamCount(2). The function engine checks arity and can return a VALUE-class error; the exact cell error text is not native-verified. - Invalid/out-of-range dates: The pinned helper converts the date argument to
QDateand callsaddMonths; if the adjusted date is invalid, it explicitly returnsValue::errorVALUE(), then EOMONTH propagates that error. Other malformed-input conversion outcomes are not settled by this one code path. Do not promise Excel’s#NUM!wording in Calligra. - Ambiguous quoted input:
"3/12/2002"may be March 12 or December 3 depending on localization. KDE’s own sample is a documentation example, not proof of locale-independent parsing. PreferDATE(2002;3;12)or an actual typed date. - Fractional month values: The source uses
asInteger(); the precise conversion behavior for a noninteger or nonnumeric cell is not independently tested in a running spreadsheet. Enter genuine whole numbers, do not assume that Excel’s fractional-month rules establish Calligra behavior. - Unexpected numeric-looking output: EOMONTH returns a date value according to XML and pinned source. Check the cell’s number/date format before assuming the formula failed or that its value is a text label.
- Beginning/end of month confusion:
EDATE(date;1)andEOMONTH(date;1)are not interchangeable. A June 15 date moves to July 15 under EDATE but to July 31 under EOMONTH (independent calendar expectation). - Weekend/holiday handling: EOMONTH returns the last calendar day; it does not test whether a bank, office, or business is open that day. Consult separate business-day logic for that requirement.
- Very large offsets, historic calendar dates and cross-file serial systems: Qt’s date range and workbook formats can differ; there is no native import/export validation for edge cases here.
- Unexpected error label: This guide describes VALUE-class source paths rather than claiming a particular translated or styled error token was seen on screen. Native Calligra testing is still needed.
Excel and cross-software compatibility
Microsoft’s official Excel EOMONTH help describes the same purpose and required pair of arguments, but Excel documentation illustrates comma-separated formula syntax for its English examples while the Calligra handbook displays semicolons. Both can represent the same familiar month-end date, but this does not prove identical parsing of date text, serial calendars, coercion, or error classes. Excel stores date results as spreadsheet serial numbers and documents #NUM! for certain invalid dates; the pinned Calligra code constructs a Qt-backed date and has a VALUE-class invalid-date path. These are source/documentation-level distinctions, not side-by-side runtime tests. Microsoft explicitly describes truncating fractional month values; Calligra’s asInteger() conversion must be tested before asserting the same. This comparison was checked on October 12, 2026.
The alternative COM.SUN.STAR.SHEET.ADDIN.ANALYSIS.GETEOMONTH is a Calligra registration alias, not evidence of a separate algorithm or installed add-in.
Official references and claim-level verification trail
All primary Calligra sources below were inspected 2026-10-12, scoped to the official 26.08.2 source associated with KDE’s October 8, 2026 release and pinned commit 72123cc643f6625351139e7df294544255a1056f.
- KDE handbook: EOMONTH — stated purpose, syntax, types and documented examples. The handbook is not a substitute for an installed package test.
- Pinned KDE EOMONTH XML — Date return type; String date input/Int month input; EOMONTH, EDATE and MONTH relation; source-provided examples.
- Pinned KDE function registration — EOMONTH canonical name, explicit alternate name and exactly two arguments.
- Pinned KDE EDATE helper and EOMONTH callback —
asDate, integer months,QDate::addMonths, invalid-date error path,daysInMonthand final date value. - Pinned Calligra function engine argument guard — arity/source error distinction.
- Qt QDate calendar documentation — behavior of calendar-month shifting and last valid dates, supporting API documentation not a Calligra runtime result.
- KDE Gear 26.08.2 release notice — KDE release context and date; packaged capabilities vary.
- Microsoft official Excel EOMONTH documentation — cross-software syntax, date-serial conventions and error comparisons only.
Related, independently registered functions: EDATE shifts months without forcing month-end; DATE builds dates; DAY, MONTH, and YEAR extract date components. See the linked KDE documentation.
Testing limitation: Native Calligra locale, coercion, error display and workbook interchange have not been executed.