Quick Navigation
LCM Function
Summary
The Excel LCM function calculates the least common multiple of two or more integers. This is the smallest positive integer that is evenly divisible by all the given numbers, making it essential for working with fractions that have different denominators.
Syntax
LCM(number1, [number2], ...)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| number1 | Number |
Yes | Required first positive integer (1 to 255 values total) |
| number2, ... | Number |
No | Optional subsequent integers (truncated if non-integer) |
Using the LCM Function
LCM is particularly valuable when adding or working with fractions that share different denominators. By finding the least common multiple of the denominators, you can convert all fractions to have the same denominator for accurate arithmetic operations.
Common LCM Examples
Basic LCM Calculation
=LCM(5, 2)
Returns 10, the smallest number divisible by both 5 and 2.
Multiple Numbers
=LCM(24, 36)
Returns 72, the least common multiple of 24 and 36.
Three Numbers Example
=LCM(4, 6, 8)
Returns 24, the smallest number divisible by 4, 6, and 8.
Frequently Asked Questions
Common Errors and Solutions
#VALUE!
Cause: Non-numeric argument provided
Solution: Ensure all arguments are numbers
#NUM!
Cause: Negative number or result exceeds 2^53
Solution: Use only positive integers and verify result size
#NUM!
Cause: All arguments are zero
Solution: LCM requires at least one positive integer
Notes
- If value is not an integer, LCM truncates toward zero
- Works with 1-255 arguments
- Ideal companion to GCD function
- Result must be < 2^53 (9,007,199,254,740,991)
Compatibility
Available in: Excel 2007, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 2021, Excel 365, Excel for Mac, Excel for Web
Not available in: Excel 2003, Excel XP, Excel 2000, Excel 97
Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+