LCM Function

Excel Functions › Math & Trig

All versions Math & Trig

The Excel LCM function returns the least common multiple — the smallest positive whole number that every supplied value divides into evenly.


Quick answer:
=LCM(4,6) = 12

Syntax

=LCM(number1, [number2], ...)
ArgumentDescription
number1RequiredThe first value. Non-integers are truncated to integers; negatives are not allowed.
number2, ...OptionalUp to 254 additional values. LCM finds the smallest multiple shared by all of them.

How to use it

LCM (least common multiple) finds the smallest number that all the arguments divide into without a remainder.

=LCM(4,6) // = 12
=LCM(3,5) // = 15
=LCM(6,8,12) // = 24

The classic use is finding a common denominator when adding fractions, or working out when repeating cycles line up again (every 4 days and every 6 days coincide every 12 days). LCM is the partner of GCD.

GCD and LCM are linked: for two numbers, GCD(a,b) * LCM(a,b) = a * b. So once you know one, the other follows.

Try it: interactive demo

Live demo

Pick a LCM example to see the formula and its result.

Result:

Practice workbook

📊
Download the free LCM practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

What is the least common multiple?
The smallest positive whole number that every argument divides into evenly. =LCM(4,6) = 12 because 12 is the smallest number both 4 and 6 divide into.
Can LCM take more than two numbers?
Yes — up to 255 arguments. =LCM(6,8,12) = 24, the smallest multiple shared by all three.
How is LCM useful with fractions?
The LCM of the denominators is the least common denominator. To add 1/4 and 1/6, use LCM(4,6) = 12 as the common denominator.
How are LCM and GCD related?
For two numbers, GCD times LCM equals their product: GCD(a,b) * LCM(a,b) = a * b. They are complementary measures of shared factors.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: GCD · MOD · QUOTIENT · FACT · INT