Header_blog

Learn Math

9 min read

How to Calculate LCM and GCF: Prime Factorisation & Worked Examples

Published: 21.05.2026·Updated: 15.10.2026
Nadia Rahmawati

Nadia Rahmawati

Math Curriculum Team, Algonova

How to Calculate LCM and GCF: Prime Factorisation & Worked Examples

How to calculate the LCM and GCF fastest: use prime factorisation. For the LCM take every prime factor with its highest power; for the GCF take only the shared factors with the lowest power. For example, LCM(12, 18) = 36 and GCF(12, 18) = 6. This is taught in Years 4 and 5 of Indonesian primary school.

What Are the LCM and GCF?

The LCM is the smallest number divisible by two or more numbers; the GCF is the largest number that divides two or more numbers exactly. The LCM is never smaller than the largest number, and the GCF is never larger than the smallest.

Prime Factorisation Method

Break each number into prime factors, then pick factors and multiply. For 12 = 2² × 3 and 18 = 2 × 3²: LCM = 2² × 3² = 36 and GCF = 2 × 3 = 6. Check: LCM × GCF = 36 × 6 = 216 = 12 × 18 (works for two numbers).

Worked Examples

  • LCM and GCF of 24 and 36: 24 = 2³ × 3, 36 = 2² × 3², LCM = 72, GCF = 12.
  • Two lights flash every 6 and 8 minutes, together at 08:00: LCM = 24, so again at 08:24.
  • 48 pencils and 36 erasers shared equally with none left: GCF = 12 groups, each with 4 pencils and 3 erasers.
  • Two buses leave every 10 and 15 minutes, together at 06:00: LCM = 30, so again at 06:30.

Common Mistakes

The most common mistake is swapping the power rule. The LCM uses the highest power, the GCF the lowest. For LCM(12, 25) the answer is 2² × 3 × 5² = 300; forgetting the 5² gives a wrong answer.

Summary

LCM answers repeating-schedule problems and GCF answers equal-sharing problems. Algonova has helped more than 1,000,000 students in 97 countries, with a free 45-minute maths diagnostic to find out where your child needs support.