How to hcf and lcm

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

Quick Answer: To find the Highest Common Factor (HCF) and Lowest Common Multiple (LCM) of two or more numbers, you can use prime factorization. The HCF is the product of the lowest powers of all common prime factors, while the LCM is the product of the highest powers of all prime factors present in any of the numbers.

Key Facts

Understanding HCF and LCM

The Highest Common Factor (HCF), also known as the Greatest Common Divisor (GCD), and the Lowest Common Multiple (LCM) are fundamental concepts in number theory. They are particularly useful in simplifying fractions, solving problems involving cycles or periodic events, and in various areas of mathematics and computer science.

What is the Highest Common Factor (HCF)?

The HCF of two or more integers is the largest positive integer that divides each of the integers without leaving a remainder. For instance, the HCF of 12 and 18 is 6, because 6 is the largest number that divides both 12 (12 ÷ 6 = 2) and 18 (18 ÷ 6 = 3) evenly.

Methods to find HCF:

  1. Listing Factors: List all the factors of each number and identify the largest factor that appears in all lists. For example, factors of 12 are 1, 2, 3, 4, 6, 12. Factors of 18 are 1, 2, 3, 6, 9, 18. The common factors are 1, 2, 3, 6. The highest common factor is 6.
  2. Prime Factorization: This is a more systematic method, especially for larger numbers. First, find the prime factorization of each number. Then, identify the common prime factors and multiply the lowest powers of these common factors. For 12 and 18:
    • 12 = 2² × 3
    • 18 = 2 × 3²
    The common prime factors are 2 and 3. The lowest power of 2 is 2¹ (from 18), and the lowest power of 3 is 3¹ (from 12). So, HCF(12, 18) = 2¹ × 3¹ = 6.
  3. Euclidean Algorithm: This is an efficient method for finding the HCF of two numbers. It involves repeatedly applying the division algorithm until a remainder of zero is obtained. The last non-zero remainder is the HCF. For 12 and 18:
    • 18 = 1 × 12 + 6
    • 12 = 2 × 6 + 0
    The last non-zero remainder is 6, so HCF(12, 18) = 6.

What is the Lowest Common Multiple (LCM)?

The LCM of two or more integers is the smallest positive integer that is a multiple of each of the integers. For example, the LCM of 4 and 6 is 12. Multiples of 4 are 4, 8, 12, 16, 20, 24... Multiples of 6 are 6, 12, 18, 24, 30... The smallest common multiple is 12.

Methods to find LCM:

  1. Listing Multiples: List the multiples of each number until a common multiple is found. This is practical for small numbers. For 4 and 6:
    • Multiples of 4: 4, 8, 12, 16, 20, 24...
    • Multiples of 6: 6, 12, 18, 24, 30...
    The smallest common multiple is 12.
  2. Prime Factorization: Find the prime factorization of each number. Then, identify all prime factors that appear in any of the factorizations. For each prime factor, take the highest power that appears in any factorization and multiply them together. For 4 and 6:
    • 4 = 2²
    • 6 = 2 × 3
    The prime factors involved are 2 and 3. The highest power of 2 is 2² (from 4), and the highest power of 3 is 3¹ (from 6). So, LCM(4, 6) = 2² × 3¹ = 4 × 3 = 12.
  3. Using the HCF: There's a useful relationship between HCF and LCM for two positive integers, a and b: HCF(a, b) × LCM(a, b) = a × b. This means you can find the LCM if you know the HCF: LCM(a, b) = (a × b) / HCF(a, b). Using the example of 12 and 18:
    • We found HCF(12, 18) = 6.
    • LCM(12, 18) = (12 × 18) / 6 = 216 / 6 = 36.
    Let's verify with prime factorization:
    • 12 = 2² × 3
    • 18 = 2 × 3²
    Highest power of 2 is 2², highest power of 3 is 3². LCM = 2² × 3² = 4 × 9 = 36. The formula works.

When are HCF and LCM Used?

Simplifying Fractions: The HCF is used to reduce fractions to their simplest form. For example, to simplify 12/18, you find HCF(12, 18) = 6. Then divide both numerator and denominator by 6: 12 ÷ 6 = 2, 18 ÷ 6 = 3. So, 12/18 simplifies to 2/3.

Problems Involving Time and Cycles: The LCM is useful for problems where events repeat at different intervals, and you need to find when they will occur simultaneously. For example, if two bells ring every 4 minutes and 6 minutes respectively, they will ring together every LCM(4, 6) = 12 minutes.

Solving Equations: HCF and LCM appear in various algebraic problems and number theory contexts.

Coprime Numbers

Two integers are considered coprime (or relatively prime) if their only common positive factor is 1. In other words, their HCF is 1. For example, 7 and 10 are coprime because HCF(7, 10) = 1. If two numbers are coprime, their LCM is simply their product.

Sources

  1. Greatest common divisor - WikipediaCC-BY-SA-4.0
  2. Least common multiple - WikipediaCC-BY-SA-4.0
  3. Greatest Common Factor (GCF)fair-use

Missing an answer?

Suggest a question and we'll generate an answer for it.