LCM Function (OpenOffice Calc)
Learn the LCM function in Apache OpenOffice Calc: Lowest common multiple.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Availability and version history
- Introduced: Documented by Apache OpenOffice 4.1.16; original introduction not established.
- Availability: Supported in Apache OpenOffice 4.1.16, verified against its function registry. This identifies a supported release, not a final working version.
- Scope: Desktop Calc, using the English function name. Availability in other spreadsheet applications is separate.
- Checked: 2026-10-14 — function reference; versioned support. Documentation/source check; not a new native test. Existing example-specific test claims below retain their stated scope.
LCM returns the least common multiple of nonnegative integers. For positive inputs it is the smallest positive number divisible by every input. It is useful for aligning repeating cycles that begin together and for finding a common denominator. It is not the greatest common divisor.
Syntax and arguments
=LCM(number1; number2; ...)
=LCM(A2:A4)
Supply at least one argument; the pinned help documents up to 30 arguments and the interpreter accepts range arguments. Use nonnegative whole numbers. The 4.1.16 core function floors numeric values approximately and rejects negative effective values. LCM_ADD is a separate add-in function; its implementation should not be substituted as evidence for this core LCM page. Formulas here use English function names and semicolon argument separators.
Reproducible examples
| Formula | Expected result |
|---|---|
=LCM(4;6) |
12 |
=LCM(3;4;5) |
60 |
=LCM(7;11) |
77 |
=LCM(0;6) |
0 |
=LCM(0;0) |
0 |
=LCM(4.9;6.9) |
12 |
The first formula preserves the original worked example. Its older comparable LibreOffice 25.2 check was not execution in OpenOffice. These new results are independently calculated expectations; no fresh native or GUI test is claimed.
Practical worksheet: align two repeating maintenance cycles
Enter 4 in A2 and 6 in B2 for cycles measured in days. Assume both events occur on day 0. In C2 enter =LCM(A2;B2); the next shared occurrence is after 12 days. The first cycle reaches days 4, 8 and 12; the second reaches days 6 and 12.
Add a third cycle of 5 days in D2. =LCM(A2;B2;D2) gives 60 days for all three to coincide. This simple model requires positive whole-day intervals and a common starting point. If the cycles start on different days, LCM alone does not solve their offsets. It also does not account for weekends, holidays or scheduling exceptions.
Advanced applications
Find a common denominator. For fractions 1/6 and 1/8, =LCM(6;8) gives 24. Their numerators become 4 and 3, so their sum is 7/24. Keep the original denominators and derived scaling factors visible in a teaching worksheet. Calc normally computes the numeric sum directly; this use is for showing the integer representation.
Use a clean numeric range. Enter 4, 6 and 10 in A2:A4. =LCM(A2:A4) returns 60. A range is convenient when more cycle lengths are added, but check that the selected range does not include irrelevant totals or unvalidated values.
Cross-check two positive inputs. For 12 and 18, =12*18/GCD(12;18) returns 36, equal to LCM(12;18). Separate multiplication can overflow or lose precision for large values, so this small identity check is not an arbitrary-size implementation recommendation.
Errors, edge cases and troubleshooting
A numeric zero among otherwise valid inputs makes core LCM return zero. This is a defined worksheet result, not a useful positive recurrence interval. The maintenance worksheet should reject zero and negative cycle lengths even though zero itself is accepted by the function. LCM(0;0) also returns zero.
Fractional values are floored before calculation. LCM(4.9;6.9)=12 is based on 4 and 6, not the true decimal intervals. If intervals must use fractions of a day, convert them to an agreed integer unit such as minutes and check the rounding policy explicitly.
Scalar values, range values and matrix contents follow separate source paths. A matrix with nonnumeric elements is rejected; do not infer universal text-ignoring behavior from a numeric range example. Source errors should be diagnosed, not treated as missing schedules. For many relatively prime inputs, the result grows quickly and can overflow or become inexact. A displayed integer need not retain every digit exactly.
Related functions
Documentation and verification
See the Apache OpenOffice LCM reference, versioned mathematical-function help, and 4.1.16 implementation. The saved official source snapshots were re-read for this guide; their original retrieval records remain in the evidence package. Source inspection and independent arithmetic are not application execution. The lifecycle section identifies a supported release; the original introduction and final functioning release remain unestablished.