LCM Calculator
Find the least common multiple (LCM) of two or more numbers and see the prime factors, a Venn diagram and the working step by step.
What is the least common multiple (LCM)?
The least common multiple (LCM) of two or more whole numbers is the smallest positive number that every one of them divides into exactly. It is also called the lowest common multiple. The multiples of 4 are 4, 8, 12, 16 and so on, and the multiples of 6 are 6, 12, 18 and so on. The first number in both lists is 12, so the LCM of 4 and 6 is 12. This LCM calculator finds the answer for two or more numbers, shows the prime factor working step by step, and draws a Venn diagram of the prime factors for two numbers.
Properties of the LCM
- The LCM is never smaller than the largest of the numbers.
- If one number is a multiple of the others, the LCM is that number: LCM(3, 6, 12) = 12.
- For coprime numbers the LCM is just their product: LCM(7, 9) = 63.
- GCD(a, b) × LCM(a, b) = a × b, so LCM(a, b) = a × b ÷ GCD(a, b).
- The order of the numbers does not matter.
How to find the LCM with prime factors
Write each number as a product of primes, then take every prime that appears and keep its highest power. Multiply those together. Here is 12 and 18.
- Factorise: 12 = 2² × 3 and 18 = 2 × 3².
- List the primes that appear: 2 and 3.
- Take the highest power of each: 2² (from 12) and 3² (from 18).
- Multiply: 2² × 3² = 4 × 9 = 36.
- Check: 36 ÷ 12 = 3 and 36 ÷ 18 = 2, and no smaller number works, so LCM(12, 18) = 36.
How to find the LCM with the GCD
For two numbers, multiply them and divide by their GCD. For 48 and 18 the GCD is 6, so the LCM is 48 × 18 ÷ 6 = 864 ÷ 6 = 144. Dividing before multiplying (48 ÷ 6 × 18 = 8 × 18 = 144) keeps the numbers smaller.
LCM of three or more numbers
With prime factors, just include every number. For 8, 12 and 20: 8 = 2³, 12 = 2² × 3, 20 = 2² × 5. The highest powers are 2³, 3 and 5, so the LCM is 8 × 3 × 5 = 120. Check: 120 ÷ 8 = 15, 120 ÷ 12 = 10 and 120 ÷ 20 = 6, all whole numbers.
Where the LCM is used
- Adding and subtracting fractions: the LCM of the denominators is the smallest common denominator. For 1/6 + 1/8, LCM(6, 8) = 24, so 4/24 + 3/24 = 7/24.
- Scheduling: if one bus leaves every 15 minutes and another every 20 minutes, they leave together every LCM(15, 20) = 60 minutes.
- Repeating patterns: gears, lights and cycles with different lengths line up again after the LCM of their lengths.
- Problems about the smallest number that leaves the same remainder or is divisible by several numbers.
Formulas Used
Prime factor method
LCM = product of every prime, each to its highest powerLCM(12, 18): 12 = 2² × 3 and 18 = 2 × 3², so the LCM is 2² × 3² = 36.
Using the GCD
LCM(a, b) = (a × b) ÷ GCD(a, b)LCM(48, 18) = 48 × 18 ÷ 6 = 144.
Several numbers
LCM(a, b, c) = LCM(LCM(a, b), c)Combine the numbers in pairs. LCM(4, 6, 10): LCM(4, 6) = 12, then LCM(12, 10) = 60.
Variables Explained
a, b
The positive whole numbers you want the common multiple of.
p (prime)
A prime factor that appears in at least one of the numbers.
e (exponent)
The power of a prime. The LCM uses the largest exponent each prime has in any of the numbers.
LCM
The least (lowest) common multiple of the numbers.
Important Notes
This calculator works with positive whole numbers up to 1,000,000,000,000 and gives exact results. It is meant for learning, homework checks and everyday use.
For legal, financial or engineering work, check the result with a second method before you rely on it.
Frequently Asked Questions
Related Calculators
Basic Arithmetic Calculator
ArithmeticAddition Calculator
ArithmeticSubtraction Calculator
ArithmeticMultiplication Calculator
ArithmeticDivision Calculator
ArithmeticLong Division Calculator
ArithmeticAverage Calculator
ArithmeticRounding Calculator
ArithmeticGCD Calculator
ArithmeticLCM Calculator
ArithmeticRange Calculator
ArithmeticAbsolute Value Calculator
ArithmeticCeiling & Floor Calculator
ArithmeticQuick Tips
- 1Double-check your input values for accuracy
- 2Use the correct units of measurement
- 3Round results to appropriate decimal places
- 4Consider the context when interpreting results