Contact

LCM in Calligra Sheets: Find a Shared Cycle

Mathematics Intermediate Calligra Sheets

Calculate a least common multiple for integer cycles, with Calligra-specific fractional and range-zero caveats.

Verification status: Consult the documentation, examples and any stated test scope below. How formula examples are checked

Quick answer: =LCM(6;8;12) has an independently expected result of 24. It finds the smallest positive integer that is divisible by all three positive integer inputs. For periodic jobs that start together every 6, 8 and 12 minutes, 24 minutes is the first later shared restart time.

Important Calligra caveat: use nonnegative integer inputs, preferably strictly positive cycles. The handbook prints LCM(1.5;2.25) = 4.5, but the inspected source rounds positive arguments downward before combining them, predicting 2 instead. It also treats a literal zero differently from a zero inside a range. These disputed cases must be read separately from the ordinary integer example; the native results below confirm both behaviors in 25.04.2.

Syntax and defaults

=LCM(value1; value2; ...)

At least one argument is accepted by the source registration, even though the handbook presents two or more. There is no default argument. Numeric ranges are accepted. A single positive integer such as =LCM(6) is its own least common multiple. Keep every input in the same unit: minutes cannot be mixed with seconds without conversion.

LCM is the least common multiple, not the greatest common divisor. For 6 and 8 the LCM is 24, while the common divisor is 2. The result measures a shared cycle, not how many cycles have occurred.

Worked worksheet: align repeating maintenance jobs

Enter these cells:

Cell Entry Meaning
A1 Job Label
B1 Interval (minutes) Label
A2 / B2 Filter check / 6 Repeats every 6 minutes
A3 / B3 Sensor check / 8 Repeats every 8 minutes
A4 / B4 Log export / 12 Repeats every 12 minutes
  1. In B6 enter =LCM(B2:B4).
  2. Independently expected B6 is 24 minutes.
  3. In C2 enter =$B$6/B2 and fill down to C4. Expected counts are 4, 3 and 2 cycles.
  4. Confirm that each count is an integer: 4×6, 3×8 and 2×12 all equal 24.

This model assumes all jobs start at the same time and repeat without drift. LCM alone does not solve staggered starts or variable-duration tasks.

Advanced example: decimal intervals without decimal LCM

Suppose the actual intervals are 1.5 and 2.25 minutes. Convert to a common integer unit first: 90 seconds and 135 seconds. =LCM(90;135) has the mathematical result 270 seconds, or 4.5 minutes after dividing by 60.

This is a unit-conversion method with integer inputs, not a claim that Calligra’s decimal LCM call behaves like rational-number LCM. Choose a unit in which the source intervals are exact integers. Rounding noisy measurements to whole seconds changes the model and must be an intentional policy.

Zero, fractional and invalid inputs

Case Source-established expectation Practical consequence
LCM(6;0;8) The scalar zero branch immediately returns 0. Zero is not a usable repeating interval.
Range containing 6, 0, 8 The range helper combines through an accumulator whose zero is treated as a starting identity; predicted result 24. A zero in a range is not equivalent to an explicit scalar zero in this implementation. Validate inputs first.
LCM(1.5;2.25) Positive values are rounded downward in the function path, predicting 2. Do not follow the handbook’s decimal result uncritically.
LCM(-2;3) Scalar negative input constructs errorNUM. A negative cycle is invalid.
LCM("6";8) Scalar text is rejected by the numeric-type check, even when it looks numeric. Store inputs as numbers.

Do not infer that the range helper validates negatives or text identically to scalar arguments; it follows a separate path. Large products are calculated numerically and are not an arbitrary-precision guarantee. Use small validated integer periods for scheduling examples.

Calligra’s registry also names COM.SUN.STAR.SHEET.ADDIN.ANALYSIS.GETLCM as an alternate for this same function. An alias registration does not prove complete cross-application file compatibility.

See KDE GCD for a common divisor and Calligra ROUND for decimal rounding. Neither substitutes for choosing a consistent unit before calculating periodic coincidences.

Availability, sources and test scope

Checked October 18, 2026. Original introduction date is unknown. The function is registered in Calligra 26.08.2 source; the relevant mathematics, statistical and information-function source plus numeric engine/converter files are byte-identical in the separately retrieved 25.04.2 source. This establishes source availability in both releases, not an introduction date. Native tests used Calligra Sheets 25.04.2 on Linux, October 18, 2026. The tables below record formulas recalculated in that application and read from its completed saved ODS workbook. Source inspection of 26.08.2 is separate; no native 26.08.2 run is claimed.

Primary references: KDE LCM handbook, 26.08.2 function implementation, numeric calculation engine and numeric converter. The handbook is an unversioned living page; the source links identify the inspected release. The native table identifies the exact cases with confirmed application error labels; other source-derived cases are not claimed as runtime tests.

Native verification in Calligra Sheets 25.04.2

The following formulas were recalculated in the actual Linux application on October 18, 2026. Results were checked in the completed native-saved workbook. The screenshot is an unmodified application capture; it is not a simulated worksheet. The model examples above are independent mathematical explanations, and only the formulas below are claimed as executed tests.

Native K2:K4 contains 6, 8, 12; K6:K8 contains 6, 0, 8. The fractional result 2 confirms the source behavior and disagrees with the handbook’s 4.5 example in this tested release.

Calligra Sheets 25.04.2 showing LCM formulas, input cells and native results

Formula executed Native result
=LCM(6;8;12) 24
=LCM(K2:K4) 24
=LCM(6;0;8) 0
=LCM(K6:K8) 24
=LCM(1.5;2.25) 2
=LCM(-2;3) #NUM!
=LCM("6";8) #NUM!
=LCM(6) 6

These observations are specific to the tested release, settings and inputs. They do not establish all coercions, precision limits or cross-application import behavior.