A to Z of Excel Functions: the LCM Function
6 September 2021
Welcome back to our regular A to Z of Excel Functions blog. Today we look at the LCM function.
The LCM function
This function returns the least (lowest) common multiple of integers. The least common multiple is the smallest positive integer that is a multiple of all integer arguments. You can use LCM to find the first positive number (in ascending order) that all arguments will divide with no remainder.
The LCM function employs the following syntax to operate:
LCM(number1, [number2], …)
The LCM function has the following arguments:
- number1, [number2], …: number1 is required, but subsequent numbers are optional. This can be one (1) to 255 values for which you want the least common multiple. If each number is not an integer, it is truncated.
It should be further noted that:
- if any argument is non-numeric, LCM returns the #VALUE! error value
- if any argument is less than zero, LCM returns the #NUM! error value
- if LCM(a,b) ≥ 2^53, LCM returns the #NUM! error value
- this function is often used with GCD, which determines the greatest common divisor (i.e. the highest number that will divide each number), in order to add fractions, for instance (see below).
Please see my examples below:
We’ll continue our A to Z of Excel Functions soon. Keep checking back – there’s a new blog post every business day.
A full page of the function articles can be found here.