O-Level Guide

HCF & LCM Calculator: Step-by-Step Prime Factorisation Working

Interactive calculator to find HCF, LCM, and all factors of numbers with step-by-step prime factorisation method for Secondary 1-2 Math.

23 January 2026 7 min read
HCF & LCM Calculator: Step-by-Step Prime Factorisation Working

HCF & LCM Calculator

Find the Highest Common Factor (HCF) and Lowest Common Multiple (LCM) of any numbers with clear, step-by-step prime factorisation working — perfect for checking your Secondary 1-2 Math homework!

Try the Calculator

Enter 2 or 3 numbers to find their HCF, LCM, or all factors. The calculator shows the complete prime factorisation method that Singapore Math teachers expect to see in your working.

HCF & LCM Calculator

Find Highest Common Factor, Lowest Common Multiple, or all factors with step-by-step working


Understanding HCF and LCM

HCF and LCM are fundamental concepts in the Factors & Multiples topic, typically covered in Secondary 1 Math in Singapore. Let’s break down what each one means and when to use them.

What is HCF (Highest Common Factor)?

The Highest Common Factor (HCF), also called Greatest Common Divisor (GCD), is the largest number that divides two or more numbers exactly (with no remainder).

💡 When to Use HCF

Use HCF when you need to divide things into equal groups or simplify fractions:

  • Sharing items equally among people
  • Reducing fractions to lowest terms
  • Finding the largest square tile that fits a room perfectly

Example: Find the HCF of 24 and 36

StepWorking
1. Prime factorise 2424 = 2 × 2 × 2 × 3
2. Prime factorise 3636 = 2 × 2 × 3 × 3
3. Find common factorsBoth have: 2, 2, and 3
4. Multiply common factorsHCF = 2 × 2 × 3 = 12

What is LCM (Lowest Common Multiple)?

The Lowest Common Multiple (LCM) is the smallest number that is a multiple of two or more numbers.

💡 When to Use LCM

Use LCM when you need to find when events coincide or add fractions with different denominators:

  • Two buses leave at different intervals — when do they leave together again?
  • Finding a common denominator for fractions
  • Calculating when rotating patterns align

Example: Find the LCM of 24 and 36

StepWorking
1. Prime factorise 2424 = 2³ × 3
2. Prime factorise 3636 = 2² × 3²
3. Take highest power of each prime2³ and 3²
4. Multiply highest powersLCM = 2³ × 3² = 8 × 9 = 72

The Prime Factorisation Method

The prime factorisation method is the standard approach taught in Singapore secondary schools. Here’s how it works:

Step 1: Prime Factorise Each Number

Use the repeated division method:

  1. Divide by the smallest prime (2) as many times as possible
  2. Move to the next prime (3, 5, 7…) when division is no longer exact
  3. Continue until you reach 1

Prime Factorisation of 120

120 ÷ 2 = 60

60 ÷ 2 = 30

30 ÷ 2 = 15

15 ÷ 3 = 5

5 ÷ 5 = 1 ✓

Therefore: 120 = 2 × 2 × 2 × 3 × 5 = 2³ × 3 × 5

Step 2: Compare Prime Factors

For HCF: Take common factors at their lowest power For LCM: Take all factors at their highest power

⚠️ Common Mistake Alert

Students often confuse which powers to use:

  • HCF = Common primes × LOWEST power (think: what’s definitely shared)
  • LCM = All primes × HIGHEST power (think: what covers everything)

The Quick Check Formula

For two numbers only, there’s a useful relationship:

HCF×LCM=Product of the two numbers\text{HCF} \times \text{LCM} = \text{Product of the two numbers}

Example: For 24 and 36:

  • HCF = 12
  • LCM = 72
  • Check: 12 × 72 = 864 = 24 × 36 ✓

💡 Use This to Find LCM Quickly

If you know the HCF, you can find the LCM:

LCM=a×bHCF\text{LCM} = \frac{a \times b}{\text{HCF}}

For 24 and 36: LCM = (24 × 36) ÷ 12 = 864 ÷ 12 = 72


Worked Examples

Example 1: Finding HCF and LCM of Three Numbers

Find the HCF and LCM of 12, 18, and 30

Step 1: Prime Factorise

12 = 2² × 3

18 = 2 × 3²

30 = 2 × 3 × 5

Step 2: Find HCF

Common primes: 2 and 3

Lowest powers: 2¹ and 3¹

HCF = 2 × 3 = 6

Step 3: Find LCM

All primes: 2, 3, and 5

Highest powers: 2², 3², and 5¹

LCM = 4 × 9 × 5 = 180

Example 2: Real-World Application (HCF)

Tiling Problem

Problem:

A rectangular floor measures 120 cm by 150 cm. What is the largest square tile that can be used to cover the floor completely without cutting?

Solution:

We need the largest number that divides BOTH 120 and 150 exactly — that’s the HCF!

120 = 2³ × 3 × 5

150 = 2 × 3 × 5²

HCF = 2¹ × 3¹ × 5¹ = 30

Answer: The largest square tile is 30 cm × 30 cm

Example 3: Real-World Application (LCM)

Bus Schedule Problem

Problem:

Bus A leaves the terminal every 12 minutes. Bus B leaves every 18 minutes. If both buses leave together at 8:00 AM, when will they next leave together?

Solution:

We need the smallest time that is a multiple of BOTH 12 and 18 — that’s the LCM!

12 = 2² × 3

18 = 2 × 3²

LCM = 2² × 3² = 4 × 9 = 36

Answer: They will next leave together at 8:36 AM (36 minutes later)


Common Mistakes to Avoid

MistakeWhy It’s WrongCorrect Approach
Using highest powers for HCFThis gives LCM, not HCFUse LOWEST powers of COMMON factors
Using lowest powers for LCMThis gives HCF, not LCMUse HIGHEST powers of ALL factors
Forgetting a prime factorMissing factors in one numberList ALL primes from BOTH numbers for LCM
Including non-common factors in HCFHCF only uses shared factorsOnly include primes that appear in ALL numbers

Quick Reference: HCF vs LCM

HCFLCM
Full nameHighest Common FactorLowest Common Multiple
What it findsLargest shared divisorSmallest shared multiple
Prime factor ruleCommon primes, LOWEST powerAll primes, HIGHEST power
Use when…Dividing into equal groupsFinding when events coincide
Example useSimplifying fractionsAdding fractions
Result is…≤ smallest number≥ largest number

Practice Using the Calculator

Try these practice questions with the calculator above:

  1. Easy: Find HCF and LCM of 8 and 12
  2. Medium: Find HCF and LCM of 24, 36, and 48
  3. Challenge: Find all factors of 120

💡 Study Tip

After using the calculator, try solving similar problems WITHOUT it. Use the calculator to check your working — this builds exam confidence!


Master Factors & Multiples

Practice HCF, LCM, prime factorisation, and divisibility tests with our AI-powered tutor.

Start Practicing Now

Topics covered:

HCF calculator LCM calculator highest common factor lowest common multiple prime factorisation factors and multiples Secondary 1 Math O-Level Math Singapore Math step by step working

Want personalized AI tutoring?

Get step-by-step help with practice problems and instant feedback.

Sign up for free