ReferenceFunctionsMath Functions
LCM
LCM: Returns the least common multiple of one or more integers.
Summary
LCM truncates fractional arguments toward zero and combines values iteratively.
Remarks
- Inputs must be non-negative and within the supported Excel-compatible range.
- If any input is
0, the resulting least common multiple is0. - Any argument error propagates immediately.
Examples
Least common multiple for two integers
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
12
Fractional values are truncated
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
24
Negative values return numeric error
Grid
| Cell | Value | |
|---|---|---|
| No inputs on Sheet1. | ||
Formula
=
Result
Not evaluated yet.
Expected
#NUM!
Related functions
FAQ
Why does LCM return 0 when one argument is 0?
LCM is defined as 0 if any truncated input is 0 in this implementation.
Are fractional inputs accepted?
Yes, but they are truncated toward zero before the LCM calculation.
Runtime metadata
Category
Math
Signature
LCM(arg1: Number, arg2…: Number)Arity
min 1, max variadic
Arguments
arg1Number · Scalar · coercion NumberLenientText
arg2Number · Scalar · coercion NumberLenientText
Caps
PURE
Source