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.

## Supported versions

• All Excel versions

## Excel LCM Function Syntax

LCM(number1, [number2], …)

## Arguments

 number1 The first number or array of numbers you want to calculate the LCM for. [number2], … Optional. Additional numbers up to 254 (for a total of 255).

## Example

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.

=LCM(15,5)

=LCM({15;5})

=LCM(B3,C3)

=LCM(B3:C3) ## 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.

## Issues

• If any of the arguments is a negative number, the LCM function will return a #NUM! error.