LCM
TheLCM
function in Google Sheets calculates the least common multiple (LCM) of two or more numbers. The LCM is the smallest positive integer that is a multiple of every number in the input set. This function is commonly used in mathematical computations and in finding the lowest common denominator when adding or subtracting fractions.
 How to use
LCM
formula?  Examples of using
LCM
formula LCM
formula not working? Similar formulas to
LCM
Usage
Use the LCM
formula with the syntax shown below, it has 2 required parameters:
 value1 (required):
The first value or range of values for which you want to calculate the LCM.  value2 (required):
The second value or range of values for which you want to calculate the LCM.
Examples
Here are a few example use cases that explain how to use theLCM
formula in Google Sheets.
Calculating the LCM of two numbers
You can use the LCM
function to find the LCM of two numbers. For example, to find the LCM of 12 and 18, you would use the formula =LCM(12, 18)
, which returns the value 36.
Calculating the LCM of a range of numbers
You can use the LCM
function with a range of numbers to find the LCM of all the numbers in the range. For example, to find the LCM of the numbers 2, 4, and 8, you would use the formula =LCM(A1:A3)
, where A1:A3 contains the values 2, 4, and 8. This returns the value 8.
Finding the lowest common denominator of fractions
To add or subtract fractions with different denominators, you need to find the lowest common denominator (LCD). You can use the LCM
function to find the LCD. For example, to add the fractions 1/3 and 1/6, you would first find the LCD, which is 6, using the formula =LCM(3, 6)
. You would then convert each fraction to have a denominator of 6, giving you 2/6 and 1/6, which can be added together to get 3/6 or 1/2.
Common Mistakes
LCM
not working? Here are some common mistakes people make when using the LCM
Google Sheets Formula:
Incorrect range format
One common mistake is to input the range of values incorrectly. The range should be in the format 'A1:A10' for example. Make sure to include the colon and use the correct column and row references.
Not enough arguments
Another common mistake is to not provide enough arguments. The LCM formula requires at least two values to find the least common multiple. Make sure to include all necessary arguments.
Nonnumeric values
The LCM formula only works with numeric values. If you include nonnumeric values, the formula will result in an error. Make sure all values are numeric or use the ISNUMBER function to check.
Zero or negative values
If any of the values provided are zero or negative, the LCM formula will result in an error. Make sure all values are positive and greater than zero.
Incorrect function name or spelling
Doublecheck that you have spelled the function name correctly and that you are using the correct function name. If you are still having trouble, try looking up examples of the function being used or consult the Google Sheets documentation.
Related Formulas
The following functions are similar to LCM
or are often used with it in a formula:

GCD
The GCD formula returns the greatest common divisor of two or more integers. It is often used in mathematical calculations to find the highest number that divides evenly into two or more numbers. The GCD formula is part of the Math functions in Google Sheets.

PRODUCT
The
PRODUCT
formula in Google Sheets multiplies all the numbers given in the arguments and returns the product. It is commonly used to calculate the total product of a range of cells. 
SUM
The
SUM
function in Google Sheets adds up a range of numbers. This function is most commonly used to sum the values in a range of cells. 
QUOTIENT
The
QUOTIENT
formula in Google Sheets returns the integer portion of a division operation. It takes two parameters, thedividend
and thedivisor
. The formula divides thedividend
by thedivisor
and returns the quotient without the remainder.
Learn More
You can learn more about the LCM
Google Sheets function on Google Support.