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
Key Facts
- The LCM is always a positive integer.
- The LCM of two numbers will always be greater than or equal to the larger of the two numbers.
- Prime factorization is a reliable method to find the LCM, especially for larger numbers.
- The formula LCM(a, b) = |a * b| / GCD(a, b) is efficient.
- The LCM is crucial in various mathematical contexts, including fraction addition and solving certain types of equations.
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.
- List out the multiples of the first number.
- List out the multiples of the second number.
- Identify the smallest number that appears in both lists. This is the LCM.
Example: Find the LCM of 4 and 6.
- Multiples of 4: 4, 8, 12, 16, 20, 24, ...
- Multiples of 6: 6, 12, 18, 24, 30, ...
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.
- Find the prime factorization of each number.
- Identify all the unique prime factors that appear in either factorization.
- For each unique prime factor, take the highest power that appears in any of the factorizations.
- Multiply these highest powers together. The result is the LCM.
Example: Find the LCM of 12 and 18.
- Prime factorization of 12: 2 × 2 × 3 = 2² × 3¹
- Prime factorization of 18: 2 × 3 × 3 = 2¹ × 3²
The unique prime factors are 2 and 3.
- The highest power of 2 is 2² (from the factorization of 12).
- The highest power of 3 is 3² (from the factorization of 18).
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.
- 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.
- Apply the formula: LCM(8, 12) = (8 × 12) / 4
- LCM(8, 12) = 96 / 4 = 24.
So, the LCM of 8 and 12 is 24.
Special Cases
- LCM of a number and 1: The LCM of any number 'n' and 1 is always 'n' itself. (e.g., LCM(7, 1) = 7)
- LCM of a number and itself: The LCM of a number 'n' and itself is 'n'. (e.g., LCM(5, 5) = 5)
- LCM involving zero: The LCM is typically defined for non-zero integers. If one or both numbers are zero, the LCM is often considered to be 0, as 0 is a multiple of every integer. However, in many contexts focusing on positive multiples, this case might be excluded or handled specifically.
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.
More How To in Daily Life
Also in Daily Life
More "How To" Questions
Trending on WhatAnswers
Browse by Topic
Browse by Question Type
Sources
- Least common multiple - WikipediaCC-BY-SA-4.0
- LCM and GCD - Mathematics LibreTextsCC BY-NC-SA 4.0
- Least common multiple (LCM) | Arithmetic (practice) | Khan Academyfair-use
Missing an answer?
Suggest a question and we'll generate an answer for it.