CalculatorFree.net

LCM Calculator — Least Common Multiple

Enter two or more numbers separated by commas. The calculator finds the least common multiple using both the prime factorization method and the GCF formula, with all steps shown.

Results

LCM (4, 6):12
Prime Factorization Method:

  4 = 2^2
  6 = 2 × 3

Take the highest power of each prime factor:
  2: max exponent = 2
  3: max exponent = 1

LCM = 2^2 × 3 = 12
GCF Method (step-by-step):

  LCM(4, 6):
  GCF(4, 6) = 2
  LCM = |4 × 6| / GCF = 24 / 2 = 12

  LCM(4, 6) = 12

What Is the Least Common Multiple?

The least common multiple (LCM) of two or more integers is the smallest positive integer that each of the given numbers divides into exactly. In other words, it is the smallest number that is a multiple of all the given numbers simultaneously.

Multiples of 4: 4, 8, 12, 16, 20, 24, 28, 32, 36, ...
Multiples of 6: 6, 12, 18, 24, 30, 36, ...

The common multiples of 4 and 6 are 12, 24, 36, 48, ... The smallest of these is 12, so LCM(4, 6) = 12. Listing multiples works fine for small numbers, but the prime factorization and GCF methods are more efficient for large numbers.

Method 1: Prime Factorization

The prime factorization method finds the LCM by taking the highest power of every prime that appears in any of the numbers.

  1. Write the complete prime factorization of each number.
  2. List every prime factor that appears in any number.
  3. For each prime, take the highest exponent across all factorizations.
  4. Multiply the selected prime powers together.

Example: LCM(12, 18, 20)

12 = 2² × 3
18 = 2 × 3²
20 = 2² × 5
All primes: 2, 3, 5. Max exponents: 2², 3², 5¹
LCM = 4 × 9 × 5 = 180

Verification: 180 / 12 = 15 (integer). 180 / 18 = 10 (integer). 180 / 20 = 9 (integer). Correct.

Method 2: GCF Formula

For two numbers A and B, there is a direct algebraic relationship between their GCF and LCM:

LCM(A, B) = (A × B) ÷ GCF(A, B)

This formula is efficient when you are already computing the GCF (for example, using the Euclidean algorithm). It avoids the need to fully factor each number.

Example: LCM(56, 98)

GCF(56, 98): 98 = 1 × 56 + 42; 56 = 1 × 42 + 14; 42 = 3 × 14 + 0. GCF = 14.
LCM = (56 × 98) / 14 = 5488 / 14 = 392

For three or more numbers, apply the formula iteratively: LCM(A, B, C) = LCM(LCM(A, B), C).

LCM and Fractions: Finding the Least Common Denominator

The most common school-level use of LCM is adding or subtracting fractions with different denominators. To add 1/4 + 5/6:

  1. Find LCM(4, 6) = 12. This is the least common denominator (LCD).
  2. Convert each fraction: 1/4 = 3/12 and 5/6 = 10/12.
  3. Add the numerators: 3/12 + 10/12 = 13/12 = 1 and 1/12.

Using the LCD (the LCM of the denominators) keeps the numbers as small as possible. You could use any common multiple, but the LCD minimizes arithmetic complexity and avoids the need to simplify at the end.

LCM in Scheduling and Real Life

LCM solves a classic type of problem: "two events happen at regular intervals — when will they next happen at the same time?"

Example: Bus A runs every 12 minutes. Bus B runs every 18 minutes. Both depart at 8:00 AM. When will they next depart at the same time?

LCM(12, 18) = 36 minutes. Both buses next depart together at 8:36 AM.

Other real-world applications:

Frequently Asked Questions

What is the least common multiple (LCM)?

The least common multiple (LCM) of two or more integers is the smallest positive integer that is divisible by each of them. For example, LCM(4, 6) = 12, because 12 is the smallest number that both 4 and 6 divide into evenly. LCM is widely used in adding or subtracting fractions with different denominators, scheduling problems (when will two events next coincide?), and music (rhythm patterns).

How do you find the LCM using prime factorization?

To find LCM by prime factorization: (1) write the prime factorization of each number, (2) list every prime factor that appears in any of the numbers, (3) for each prime, take the highest exponent across all numbers, (4) multiply the results. Example: LCM(12, 18). 12 = 2² × 3. 18 = 2 × 3². Take max exponents: 2² and 3². LCM = 4 × 9 = 36.

How do you find the LCM using the GCF formula?

For two numbers A and B, LCM(A, B) = (A × B) / GCF(A, B). This formula works because the product A × B counts the shared prime factors twice, and dividing by the GCF removes that duplication. Example: A = 12, B = 18. GCF(12, 18) = 6. LCM = (12 × 18) / 6 = 216 / 6 = 36. This is often faster than full prime factorization when you already know the GCF.

How do you use LCM to add fractions with different denominators?

To add fractions with different denominators, find the LCM of the denominators — this becomes the least common denominator (LCD). Convert each fraction to an equivalent fraction with the LCD as the denominator, then add the numerators. Example: 1/4 + 1/6. LCM(4, 6) = 12. Convert: 3/12 + 2/12 = 5/12. Using the LCM (rather than any common multiple) keeps the numbers as small as possible, simplifying the arithmetic.

What is the difference between LCM and GCF?

GCF (greatest common factor) finds the largest number that divides into both A and B. LCM (least common multiple) finds the smallest number that both A and B divide into. GCF is used when dividing or simplifying. LCM is used when combining or finding a common container. For any two numbers: GCF × LCM = A × B. So they are inverse in a sense — if you know one, you can find the other using the product formula.

Related Calculators