How to lcm of two numbers

Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.

Last updated: April 4, 2026

Quick Answer: The Least Common Multiple (LCM) of two numbers is the smallest positive integer that is a multiple of both numbers. You can find it by listing multiples, using prime factorization, or applying a formula involving the Greatest Common Divisor (GCD).

Key Facts

What is the Least Common Multiple (LCM)?

The Least Common Multiple (LCM), also known as the Lowest Common Multiple, of two integers 'a' and 'b' is the smallest positive integer that is divisible by both 'a' and 'b'. Think of it as the first number that appears in both of their multiplication tables (or lists of multiples).

Why is the LCM Important?

The LCM has practical applications in mathematics, particularly when working with fractions. For instance, when adding or subtracting fractions with different denominators, you need to find a common denominator, and the LCM of the original denominators is the smallest and most efficient common denominator to use. It also appears in number theory, scheduling problems, and even in some physics and engineering contexts.

Methods to Calculate the LCM

There are several effective methods to find the LCM of two numbers:

Method 1: Listing Multiples

This is the most intuitive method, especially for smaller numbers.

  1. List out the multiples of the first number.
  2. List out the multiples of the second number.
  3. Identify the smallest number that appears in both lists. This is the LCM.

Example: Find the LCM of 4 and 6.

The smallest number common to both lists is 12. So, LCM(4, 6) = 12.

Method 2: Prime Factorization

This method is systematic and works well for any pair of numbers, especially larger ones.

  1. Find the prime factorization of each number.
  2. Identify all the unique prime factors that appear in either factorization.
  3. For each unique prime factor, take the highest power that appears in any of the factorizations.
  4. Multiply these highest powers together. The result is the LCM.

Example: Find the LCM of 12 and 18.

The unique prime factors are 2 and 3.

LCM(12, 18) = 2² × 3² = 4 × 9 = 36.

Method 3: Using the Greatest Common Divisor (GCD)

There's a direct relationship between the LCM and the Greatest Common Divisor (GCD) of two numbers. The GCD is the largest positive integer that divides both numbers without leaving a remainder.

The formula is: LCM(a, b) = (|a × b|) / GCD(a, b)

Where '|a × b|' represents the absolute value of the product of 'a' and 'b'. Since we are usually dealing with positive integers, it's simply a × b.

To use this method, you first need to find the GCD. The Euclidean algorithm is an efficient way to find the GCD.

Example: Find the LCM of 8 and 12 using the GCD formula.

  1. Find the GCD of 8 and 12.
    • Factors of 8: 1, 2, 4, 8
    • Factors of 12: 1, 2, 3, 4, 6, 12
    • The GCD(8, 12) is 4.
  2. Apply the formula: LCM(8, 12) = (8 × 12) / 4
  3. LCM(8, 12) = 96 / 4 = 24.

So, the LCM of 8 and 12 is 24.

Special Cases

Summary

Understanding how to calculate the LCM is a fundamental skill in arithmetic and number theory. Whether you prefer listing multiples, using prime factorization, or applying the GCD formula, each method provides a pathway to finding the smallest positive integer that is a multiple of two given numbers. Choose the method that feels most comfortable and efficient for the numbers you are working with.

Sources

  1. Least common multiple - WikipediaCC-BY-SA-4.0
  2. LCM and GCD - Mathematics LibreTextsCC BY-NC-SA 4.0
  3. Least common multiple (LCM) | Arithmetic (practice) | Khan Academyfair-use

Missing an answer?

Suggest a question and we'll generate an answer for it.