The Excel LCM function returns the least common multiple of integers. The least common multiple is the smallest positive integer that is a multiple of all supplied numbers. For example, =LCM(25,40) returns 200.
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:
In the example worksheet shown above, we are using two slightly different formulas to calculate the lowest common multiple. The first formula provides two separate cell references, and the second formula uses a single range that contains three values. In rows, 5 to 10, there are two values in columns B and C, and the formula in F5:F10 (copied down) is:
The Excel GCD function returns the greatest common divisor of two or more integers. The greatest common divisor is the largest integer that goes into all supplied numbers without a remainder. For example, =GCD(60,36) returns 12.