The LCM function returns the Least Common Multiple of the integers passed as arguments.
LCM(
number1
[, number2...]
)
- number: Numbers to consider in the calculation.
The LCM function returns an integer.
The LCM function supports between 1 and 255 arguments.
If any of the arguments is not a number or is less than zero, the function will return an error. If any of the arguments are zero, the LCM function returns zero.
True values are interpreted as 1 and False values as 0.
In this example, the Least Common Multiple of the numbers 14 and 6 is calculated. The first can be decomposed as 14 = 7 * 2 and the second as 6 = 3 * 2, so the result is 2 * 3 * 7 = 42: