EasyMathTools

LCM and GCD: Complete Guide with Examples

Published January 22, 2025 • Last updated January 29, 2025 • 7 min read

LCM (Least Common Multiple) and GCD (Greatest Common Divisor) are fundamental concepts in mathematics used in fractions, ratios, time calculations, and real-world problem-solving. This guide explains both concepts with multiple calculation methods and practical examples.

What is GCD (Greatest Common Divisor)?

The GCD (also called HCF - Highest Common Factor) is the largest number that divides all given numbers without leaving a remainder.

Example: GCD of 12 and 18

Factors of 12: 1, 2, 3, 4, 6, 12

Factors of 18: 1, 2, 3, 6, 9, 18

Common factors: 1, 2, 3, 6

GCD = 6 (the greatest common factor)

What is LCM (Least Common Multiple)?

The LCM is the smallest number that all given numbers divide into evenly.

Example: LCM of 12 and 18

Multiples of 12: 12, 24, 36, 48, 60, 72...

Multiples of 18: 18, 36, 54, 72, 90...

Common multiples: 36, 72, 108...

LCM = 36 (the least common multiple)

Method 1: Prime Factorization (Best for Understanding)

Finding GCD Using Prime Factorization

Example: GCD of 48 and 60

48 = 2 × 2 × 2 × 2 × 3 = 2⁴ × 3¹

60 = 2 × 2 × 3 × 5 = 2² × 3¹ × 5¹

Take the LOWEST power of common primes:

Common primes: 2 and 3

GCD = 2² × 3¹ = 4 × 3 = 12

Finding LCM Using Prime Factorization

Example: LCM of 48 and 60

48 = 2⁴ × 3¹

60 = 2² × 3¹ × 5¹

Take the HIGHEST power of all primes:

LCM = 2⁴ × 3¹ × 5¹ = 16 × 3 × 5 = 240

Method 2: Euclidean Algorithm (Fastest for GCD)

The Euclidean algorithm finds GCD by repeatedly dividing and taking remainders.

Steps:

  1. Divide the larger number by the smaller
  2. Replace the larger with the smaller, and the smaller with the remainder
  3. Repeat until remainder is 0
  4. The last non-zero remainder is the GCD
Example: GCD of 48 and 60

60 ÷ 48 = 1 remainder 12

48 ÷ 12 = 4 remainder 0

GCD = 12 (last non-zero remainder)

Method 3: Using the GCD-LCM Relationship

There's a useful relationship between GCD and LCM:

LCM(a, b) = (a × b) ÷ GCD(a, b)

Example: Find LCM of 48 and 60 (we know GCD = 12)

LCM = (48 × 60) ÷ 12

= 2880 ÷ 12

= 240

Real-World Applications

1. Scheduling Problems (LCM)

Problem: Bus A arrives every 12 minutes, Bus B every 18 minutes. When do they arrive together?

Solution: LCM(12, 18) = 36 minutes

They arrive together every 36 minutes.

2. Cutting Materials into Equal Parts (GCD)

Problem: You have wooden planks of 48 cm and 60 cm. What's the longest piece you can cut both into without waste?

Solution: GCD(48, 60) = 12 cm

Cut both into 12 cm pieces.

3. Simplifying Fractions (GCD)

Problem: Simplify 48/60

Solution: GCD(48, 60) = 12

48 ÷ 12 = 4, 60 ÷ 12 = 5

Simplified: 4/5

4. Adding Fractions (LCM)

Problem: Add 1/12 + 1/18

Solution: LCM(12, 18) = 36 (common denominator)

= 3/36 + 2/36 = 5/36

Calculate LCM & GCD Instantly

Free LCM & GCD Calculator →

LCM and GCD for More Than 2 Numbers

Example: GCD of 24, 36, 48

24 = 2³ × 3¹

36 = 2² × 3²

48 = 2⁴ × 3¹

GCD = 2² × 3¹ = 4 × 3 = 12

Example: LCM of 24, 36, 48

LCM = 2⁴ × 3² = 16 × 9 = 144

Common Mistakes to Avoid

Mistake 1: Confusing GCD and LCM

Remember: GCD is always ≤ smallest number. LCM is always ≥ largest number.

Mistake 2: Missing Prime Factors

For LCM, include ALL prime factors from all numbers, not just common ones.

Mistake 3: Wrong Powers in Prime Factorization

GCD uses LOWEST powers, LCM uses HIGHEST powers.

Quick Reference Table

Numbers GCD LCM
12, 18 6 36
15, 25 5 75
8, 12 4 24
20, 30 10 60
14, 21 7 42

Practice Problems

  1. Find GCD and LCM of 24 and 36
  2. Two gears with 40 and 60 teeth. After how many rotations do they sync?
  3. Simplify the fraction 72/96 using GCD
  4. Add 1/8 + 1/12 using LCM for the denominator

Check Your Answers Instantly

Use Our Calculator →