Category: FUNCTION | Updated: 2026-11-22

How to Use the LCM Function | Find the Least Common Multiple

How to Use the LCM Function

The LCM (Least Common Multiple) function returns the least common multiple of two or more integers. It is handy for finding when recurring events with different cycles will next occur at the same time.

Syntax

=LCM(value1, [value2, ...])
  • value1: The first number or cell range for which to find the least common multiple (required).
  • value2, …: Additional numbers or cell ranges (optional).

Example Table

Examples of calculating the next day when two different cycles (such as day intervals) align.

Item A Cycle Item B Cycle Formula Result Explanation
4 6 =LCM(A2, B2) 12 Least common multiple of 4 and 6
3 5 =LCM(A3:B3) 15 Cell ranges are also supported
10 0 =LCM(A4, B4) 0 Including 0 makes the result 0
4.9 6.1 =LCM(A5, B5) 12 Decimals are truncated to 4 and 6

Common Errors and Caveats

  • #NUM! error: Occurs if any argument is a negative number (less than 0).
  • #VALUE! error: Occurs if a text string that cannot be converted to a number is passed directly.
  • Handling empty cells: When you specify a cell range, empty cells are treated as 0, which causes the result to be 0.

Frequently Asked Questions

Q. What is the result if 0 is included in the LCM function?

A. If any argument is 0, the calculated result is 0.

Q. Are decimal inputs rounded to the nearest integer?

A. No, they are not rounded; the decimal portion is truncated and only the integer part is used.