Contact

LCM Function in ONLYOFFICE Spreadsheet Editor: Repeating Cycles and Examples

Math and Trigonometry Beginner ONLYOFFICE Spreadsheet Editor

Learn LCM in ONLYOFFICE for repeat schedules, common denominators and 12 reproducible whole-number test cases.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: For repeating events every 6 and 8 days, =LCM(6,8) has expected result 24: the schedules align again after 24 days if both occur at the same starting time. The official reference gives LCM(number1, [number2], ...), allowing up to 255 numeric arguments.

Verification: All outputs are independently calculated mathematical expectations. Native Desktop/web execution, localized parsing and runtime error observation were not performed.

Availability and version history

  • Introduced: The original introduction version and date are not established by the official sources checked.
  • Availability: Documented in the current ONLYOFFICE Spreadsheet Editor help; no final working-version endpoint is established.
  • Scope: Docs and Desktop Editors release separately. This unversioned help does not establish availability in every older build, mobile client or deployment.
  • Checked: October 14, 2026, against the official function reference. Documentation check; not a new native test.

What the function does and when it helps

LCM finds the smallest positive whole number that is a multiple of each supplied positive whole number. It is particularly useful for combining recurring schedules, common denominators and aligning repeat cycles.

For positive integer a and b, the LCM is the least positive integer divisible by both. Mathematically, lcm(a,b) = (a×b)/gcd(a,b). For 6 and 8, gcd=2 and (6×8)/2=24. The LCM is a cycle length, not necessarily the first calendar date without a shared starting point.

Exact official syntax, argument order and defaults

=LCM(number1, [number2], ...)
Argument Required? Type and purpose
number1 Required First numeric value; use a positive whole number in the examples.
number2, additional values Optional Additional numeric values, up to 255 total numeric inputs as documented.

No default numeric value for additional arguments is documented. A single number1 satisfies the vendor syntax, but this tutorial uses two or more positive integers to make the common-cycle examples unambiguous. These argument rules are grounded in the ONLYOFFICE LCM function reference (accessed 2026-10-13 UTC). The square brackets in the official signature indicate an optional argument; do not type them as literal characters. For GCD and LCM, the ... notation indicates successive values, not a literal formula token.

Reproduce the calculations in ONLYOFFICE

  1. Open a scratch workbook in ONLYOFFICE Spreadsheet Editor, or create a blank sheet. These are test instructions, not a claim of native editor execution.
  2. Select the specified cells and type the values exactly as displayed in the table below. Put the listed formula in the indicated result cell (or type the first formula and use the fill handle to copy it down).
  3. In the English interface, type a leading = and use commas to separate arguments. The official Insert Functions guide documents both this entry workflow and comma separation in its English examples.
  4. Inspect the result and compare it to the independently calculated expected number. Any different output is evidence to investigate, not proof the documentation is incorrect; check value types and formula-language settings first.
  5. Change one input and verify that the result recalculates. The official guide documents automatic workbook recalculation by default and a Formula → Calculation control when needed.

Validation classification: The function signature and documented argument description were checked against the vendor reference. All numbers below were calculated separately using Python’s standard math module, then sanity-checked using mathematical identities. Native execution: not performed; no cell output or exact error code was observed.

Locale, function language and numeric entry

These examples use English ONLYOFFICE function names, commas, and a decimal point only where relevant. The Advanced Settings documentation describes independently configurable formula-language and region settings; it does not establish which exact translated names or separators are supported by every installation or version. Do not silently replace commas, assume identical localized names, or interpret a number containing locale separators until testing the target editor. The documented maximum of 255 numeric arguments for GCD/LCM is a function-reference claim, not a native stress-test result.

Desktop, browser, historical releases and other spreadsheet editors

The official Spreadsheet Editor function catalogue documents the English function names in the current, unversioned ONLYOFFICE Help Center. It is not a release-by-release runtime compatibility table. ONLYOFFICE Desktop Editors and browser-hosted Docs have separate release histories; neither the function page nor the current catalogue identifies the first Desktop, cloud or self-hosted release for this function. The exact tested build matrix remains unverified. In particular, an identically named function in Excel or Google Sheets is not evidence for ONLYOFFICE’s coercion rules, errors, array treatment or display precision. No cross-product formula-execution test was performed.

Reproducible worksheet: LCM with actual cell references

Type each pair into A2:B13. In C2, enter the displayed formula and fill down through C13. The reference uses one cell per numeric argument, which avoids making undocumented claims about how whole arrays or blank cells are handled.

Row A: first positive integer B: second positive integer Formula in C Independently expected C
2 6 8 =LCM(A2,B2) 24
3 3 4 =LCM(A3,B3) 12
4 4 10 =LCM(A4,B4) 20
5 7 9 =LCM(A5,B5) 63
6 12 18 =LCM(A6,B6) 36
7 5 6 =LCM(A7,B7) 30
8 9 12 =LCM(A8,B8) 36
9 8 14 =LCM(A9,B9) 56
10 15 20 =LCM(A10,B10) 60
11 16 24 =LCM(A11,B11) 48
12 21 28 =LCM(A12,B12) 84
13 24 36 =LCM(A13,B13) 72

How results were computed: Python math.lcm using integer inputs, then checked against divisibility / multiplicative or factorial identities. Formulas are intended as reproducible worksheet instructions, not observed workbook outputs. The exact display (e.g., number separators, decimals, scientific notation) can vary by editor and regional settings.

Additional paste-ready formula examples

Paste each into a blank scratch cell. Expected numbers are independent mathematical calculations; the exact success/error outcome of the native implementation remains to be tested.

Paste-ready formula Expected numerical value
=LCM(3,4,6) 12
=LCM(4,6,10) 60
=LCM(6,8) 24
=LCM(12,18) 36
=LCM(21,28) 84
=LCM(7,9) 63
=(12*18)/GCD(12,18) 36
=LCM(5,6,10) 30
=LCM(8,14) 56

Advanced uses and worked reasoning

Align two recurring maintenance tasks

If one check happens every 6 days and another every 8 days, and both are performed today, enter 6 and 8 in A2:B2. =LCM(A2,B2) in C2 gives expected 24: they recur together 24 days later, assuming perfectly regular integer-day periods and the same starting event. Actual calendar recurrence may require holiday, weekend, time-zone and start-date logic; LCM alone is not a complete scheduler.

Find a common denominator

To add 1/6 + 1/8 exactly, start with =LCM(6,8), expected 24. Scale the numerators by 24/6=4 and 24/8=3: 4/24 + 3/24 = 7/24. Keep numerator/denominator separate when exact fractional output matters; a formatted spreadsheet decimal can round the result.

Compare LCM to a GCD identity

If A2=12 and B2=18, =LCM(A2,B2) has expected result 36. The formula =(A2*B2)/GCD(A2,B2) has the same expected result 36, since GCD(12,18)=6. For large inputs, multiply-then-divide can risk floating-point loss even when mathematically valid. Do not assert identical internal spreadsheet precision without testing.

More than two recurrence cycles

=LCM(3,4,6) has expected result 12; =LCM(4,6,10) has expected result 60. This relies on the published variadic signature. For a cycle with different starting offsets, a solution requires congruences rather than just the LCM of periods.

Errors, edge cases, limits and troubleshooting

Symptom or scenario What to check Evidence classification
Returning 24 when you expected 2 for 6 and 8 24 is the LCM; 2 is their GCD. Mathematical interpretation.
Scheduling events without a common starting date LCM yields a repeat period, but not automatically the first coincident date for offset schedules. Mathematics; verify business assumptions.
Using negative, zero or fractional arguments The official function page does not specify their conversion, zero or error semantics. Use positive whole numbers in verified examples. Native test required.
Providing numeric-looking text or blanks The vendor reference does not define coercion, range or blank treatment. Native test required.
Sending 256 supplied arguments The vendor documents up to 255 numeric values. Exact warning/error and the interpretation of array/range arguments require native validation. Official limit / native pending.
A large cycle seems inaccurate Formatting, floating-point rounding, multiplication overflow or mistaken period units can cause confusion. Confirm integers and use small reproducible inputs first. Numerical caution.

Important: The vendor function article does not specify literal error codes for invalid values, decimal truncation, text coercion, mixed arrays or particular calculation overflow behaviour. A different spreadsheet application’s documentation does not establish ONLYOFFICE’s result. Before relying on undocumented behavior, record results natively in representative Desktop and browser versions with each regional setting in scope.

Claim or link Vendor source (checked 2026-10-13 UTC) Evidence quality
Return least common multiple of one or more numbers; syntax LCM(number1, [number2], ...), up to 255 numeric values. LCM function reference Official function-specific description; unversioned.
Current catalogue lists LCM under Math and Trigonometry and permits formula insertion through Home/Formula controls. ONLYOFFICE Insert Functions catalogue Official current online documentation; not full Desktop/web version proof.
Current English documented formulas use a leading = and commas for multiple arguments. ONLYOFFICE Insert Functions instructions Official entry-method documentation.
Formula language and region are configurable. ONLYOFFICE Advanced Settings Official interface documentation; locale-specific examples require native testing.
Desktop release chronology is separately documented. ONLYOFFICE Desktop Editors changelog Official release history; minimum function version not established.
Cross-check related mathematical operation where applicable. Related ONLYOFFICE function Official documentation; numerical values in this guide remain independently computed.

Verification limitations

Native input coercion, invalid-input errors, historical release support, localized formula entry and workbook round trips remain untested.