ID EN
#Math

LCM

Excel Functions

Get the least common multiple of numbers

Syntax

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

Arguments

Parameter Description
number1 The first number.
number2 [optional] The second number.

Return Value

The least common multiple of all numbers

Details

The LCM function returns the least common multiple of two or more numbers. The least common multiple is the smallest positive integer that is a multiple of all numbers supplied. Least common multiple is also known as the "least common denominator", and the "lowest common denominator". 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. 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

Examples

Examples

The least common multiple of 3 and 4 is 12, since 12 is the smallest multiple of both 3 and 4:

EXCEL
=LCM(3,4) // returns 12
Examples

The least common multiple of 3, 4, and 5 is 60, since 60 is the smallest multiple of all three numbers:

EXCEL
=LCM(3,4,5) // returns 60
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

EXCEL
=LCM(B5,C5) // 2 cell references
Worksheet example

In rows 11 to 15, there are three values in columns B, C, and D. The formula in F11:F15 (copied down) is:

EXCEL
=LCM(B11:D11) // range with 3 values

See Also

GCD