LCM function
The LCM (Least Common Multiple) function in Excel is used to calculate the least common multiple of two or more numbers. The least common multiple of two numbers is the smallest number that both numbers can divide without leaving a remainder.
Syntax
=LCM(number1, number2, ...)
Parameters
number1, number2, ...: These are the numbers for which you want to find the least common multiple. You can input up to 255 numbers in the function.
Return Value
The function returns the least common multiple (LCM) of the specified numbers.
Key Points
- The LCM of two numbers is the smallest positive integer that both numbers divide evenly into.
- If any of the arguments is zero or a negative number, the function returns an error.
Examples
Example 1: Calculate the LCM of 4 and 5
=LCM(4, 5)
Result: 20
Explanation: The least common multiple of 4 and 5 is 20 because it’s the smallest number that both 4 and 5 divide evenly into.
Example 2: Calculate the LCM of 6, 8, and 12
=LCM(6, 8, 12)
Result: 24
Explanation: The least common multiple of 6, 8, and 12 is 24, as it’s the smallest number that is divisible by all three numbers.
Example 3: LCM of 7 and 14
=LCM(7, 14)
Result: 14
Explanation: The LCM of 7 and 14 is 14 because 14 is the smallest number that both 7 and 14 divide evenly into.
Use Cases
- Mathematics and number theory: When you need to find the smallest number divisible by a set of numbers.
- Scheduling problems: In real-world problems like scheduling events or tasks at regular intervals, the LCM can help determine when those intervals will coincide.