The Excel LCM function is a Math formula that returns the least common multiple (LCM) of two or more numbers. Also known as lowest common multiple or smallest common multiple, the least common multiple will give you the smallest positive number that is divisible by a particular set of numbers. In this guide, we’re going to show you how to use the LCM function and also go over some tips and error handling methods.
- All Excel versions
Excel LCM Function Syntax
The first number or array of numbers you want to calculate the LCM for.
Optional. Additional numbers up to 254 (for a total of 255).
To find the least common multiple of a set of numbers, all you need to is enter them into the LCM function arguments. You can use static values or references. Below is a few examples showing various use cases with different references.
Summary and Tips
- If any of the values entered as an argument is not an integer, it will be truncated.
- Use the GCD function to calculate the greatest common divisor of a set of numbers.
- If any of the arguments is a negative number, the LCM function will return a #NUM! error.