The LCM function takes one or more arguments called number1, number2, number3, etc. All numeric values are expected to be integers. Numbers with decimal values will be truncated to integers before a result is calculated. Each argument can be a hardcoded constant, a cell reference, or a range that contains multiple values. The LCM function can accept up to 255 arguments total.
Examples
The least common multiple of 3 and 4 is 12, since 12 is the smallest multiple of both 3 and 4: The least common multiple of 3, 4, and 5 is 60, since 60 is the smallest multiple of all three numbers:
Worksheet example
In the example worksheet shown above, we are using two slightly different formulas to calculate the lowest common multiple. The first formula provides two separate cell references, and the second formula uses a single range that contains three values. In rows, 5 to 10, there are two values in columns B and C, and the formula in F5:F10 (copied down) is: In rows 11 to 15, there are three values in columns B, C, and D. The formula in F11:F15 (copied down) is: Because the LCM function evaluates empty cells as zero, the result returned by LCM will be zero if any cell references are empty. Therefore, it’s important not to include empty cell references.
Notes
LCM evaluates empty cells as zero. LCM works with integers; decimal values are removed before calculation. If arguments contain a non-numeric value. LCM returns the #VALUE! error. To calculate the greatest common divisor, see the GCD function.
Dave Bruns
Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.