Least Common Multiple Calculator

Please provide numbers separated by a comma "," and click the "Calculate" button to find the LCM.




RelatedGCF Calculator | Factor Calculator

What is the Least Common Multiple (LCM)?

In number theory, the least common multiple (often abbreviated as LCM) of two or more integers a and b is the smallest positive integer that can be divided evenly by each of them. It is typically written as LCM(a, b).

Brute Force Method

One straightforward approach to determine the LCM is the brute‑force technique, which simply enumerates the multiples of each integer until a common one appears.

EX:   Find LCM(18, 26)
18: 18, 36, 54, 72, 90, 108, 126, 144, 162, 180, 198, 216, 234
26: 52, 78, 104, 130, 156, 182, 208, 234

As can be seen, this method can be fairly tedious, and is far from ideal.

Prime Factorization Method

A more organized strategy uses prime factorisation. By expressing each number as a product of primes, the LCM can be obtained by taking the greatest exponent of every prime that appears and multiplying them together. This method is faster than brute force, though it remains practical for relatively small values. See the example below for a step‑by‑step illustration.

EX:   Find LCM(21, 14, 38)
21 = 3 × 7
14 = 2 × 7
38 = 2 × 19

The LCM is therefore:
3 × 7 × 2 × 19 = 798

Greatest Common Divisor Method

Another practical way to compute the LCM is to employ the greatest common divisor (GCD), also known as the greatest common factor. After locating the GCD of the numbers, the LCM follows from (a × b) ÷ GCD(a,b). For three numbers, first find LCM(a,b) = q, then calculate LCM(q,c). The final result equals the LCM of all three. Detailed instructions are available via the linked GCD calculator.

EX:   Find LCM(21, 14, 38)

GCF(14, 38) = 2
LCM(14, 38) = 
38 × 14
2
  = 266

GCF(266, 21) = 7
LCM(266, 21) = 
266 × 21
7
  = 798

LCM(21, 14, 38) = 798

The sequence in which you apply the LCM formulas does not matter, provided every number is included and calculations are performed correctly. Each technique has its own advantages, allowing the user to choose the most suitable one for the particular problem.

Financial Fitness & Health Math Other