Home » Excel-Built-In-Functions » Excel-Math-Functions » Excel-Lcm-Function

# The Excel LCM Function

Related Function:

GCD Function## Function Description

The Excel LCM function returns the least common multiple of two or more supplied integers.

The syntax of the function is:

LCM( number1, [number2], ...)

Where the number arguments are up to 255 numeric values for which you want to calculate the least common multiple.

If any of the supplied numbers are decimals, these values are truncated to integers.

## LCM Function Examples

The following spreadsheet shows four examples of the Excel Lcm Function.

Formulas: | A |
---|
1 | =LCM( 1, 5 ) |
---|
2 | =LCM( 15, 10, 25 ) |
---|
3 | =LCM( 1, 8, 12 ) |
---|
4 | =LCM( 7, 2 ) |
---|
| Results: |

Further details and examples of the Excel Lcm function are provided on the Microsoft Office website.

## LCM Function Errors

If you get an error from the Excel Lcm function this is likely to be one of the following:

Common Errors

#NUM! | - | Occurs if any of the supplied number arguments are less than zero. |

#VALUE! | - | Occurs if any of the supplied number arguments are non-numeric. |