STUDENTS GUIDE

How to Find LCM and HCF (3 Methods with Examples)

By Gobind·Last reviewed 2026-10-09·4 min read
Executive Summary

The Highest Common Factor (HCF / GCD) is the largest positive integer that divides each number without remainder. The Least Common Multiple (LCM) is the smallest positive integer divisible by all numbers. For any two positive integers a and b, HCF(a, b) × LCM(a, b) = a × b.

Interactive Calculation Tool

Calculate your own numbers with our LCM and HCF Calculator (2 to 6 Numbers)

Instant calculations with real-time sliders and full schedules.

Open LCM and HCF Calculator (2 to 6 Numbers)

Quick Answer: How to Find LCM and HCF

The Highest Common Factor (HCF) is the greatest divisor shared by all given numbers, while the Lowest Common Multiple (LCM) is the smallest multiple shared by all given numbers. For two numbers 24 and 36: • Prime factors of 24 = 2³ × 3¹ • Prime factors of 36 = 2² × 3² • HCF = product of lowest powers of common prime factors: 2² × 3¹ = 4 × 3 = 12. • LCM = product of highest powers of all prime factors: 2³ × 3² = 8 × 9 = 72. Notice the universal law for two numbers: HCF(24, 36) × LCM(24, 36) = 12 × 72 = 864, which exactly matches 24 × 36 = 864. Calculate results for 2 to 6 numbers with our free [LCM and HCF Calculator](/lcm-hcf-calculator).

Method 1: Prime Factorization Method

Prime factorization is the most intuitive method for understanding why LCM and HCF work: 1. Express each number as a product of prime powers (e.g. 60 = 2² × 3¹ × 5¹; 84 = 2² × 3¹ × 7¹). 2. For HCF: Take only the common prime factors, each raised to its lowest exponent present: 2² × 3¹ = 12. 3. For LCM: Take every prime factor that appears in any number, raised to its highest exponent: 2² × 3¹ × 5¹ × 7¹ = 4 × 3 × 5 × 7 = 420.

Method 2: Euclidean Algorithm for HCF (Fastest for Large Numbers)

For large numbers where prime factorization is tedious, the Euclidean algorithm finds HCF in logarithmic steps using repeated division: Example: Find HCF of 252 and 105: • Step 1: 252 ÷ 105 = 2 remainder 42 • Step 2: 105 ÷ 42 = 2 remainder 21 • Step 3: 42 ÷ 21 = 2 remainder 0 The last non-zero remainder is 21. Therefore, HCF(252, 105) = 21! Once HCF is known, LCM is easily found: LCM = (252 × 105) / 21 = 26,460 / 21 = 1,260.

Worked Example with 3 Numbers: 18, 24, and 30

Let us find the HCF and LCM of three numbers: • 18 = 2¹ × 3² • 24 = 2³ × 3¹ • 30 = 2¹ × 3¹ × 5¹ 1. HCF: Common primes across all three are 2 and 3. Lowest powers: 2¹ and 3¹. HCF(18, 24, 30) = 2 × 3 = 6. 2. LCM: All prime factors present: 2, 3, 5. Highest powers: 2³, 3², 5¹. LCM(18, 24, 30) = 8 × 9 × 5 = 360.

Common Traps and Mathematical Rules

• The formula HCF(a, b) × LCM(a, b) = a × b holds strictly for TWO numbers. It does not apply directly to three or more numbers! • Co-prime numbers are numbers whose HCF is 1 (e.g. 8 and 15). The LCM of two co-prime numbers is always their direct product (8 × 15 = 120). • HCF of fractions = HCF of numerators / LCM of denominators. • LCM of fractions = LCM of numerators / HCF of denominators.

Disclaimer: LCM and HCF are defined strictly for positive integers. Zero and negative inputs do not have standard elementary factorizations.

Frequently Asked Questions

What is the relationship between HCF and LCM?

For any two positive numbers a and b, the product of their HCF and LCM is always equal to the product of the numbers: HCF(a, b) × LCM(a, b) = a × b.

Does the product formula work for three numbers?

No. For three numbers a, b, and c, HCF(a,b,c) × LCM(a,b,c) does not generally equal a × b × c due to overlapping pairwise common factors.

What is the HCF of two consecutive integers?

The HCF of any two consecutive integers (like 14 and 15) is always 1, because no integer greater than 1 can divide both n and n+1.

What if input numbers are negative or zero?

LCM and HCF are conventionally defined for positive integers. Our calculator validates inputs and rejects zero or negative values with clear guidance.

Can this calculator handle up to 6 numbers?

Yes, our tool supports between 2 and 6 numbers simultaneously, computing pairwise Euclidean steps and full prime factorizations.

G

Gobind

(Founder & Lead Developer)

Gobind, Founder & Lead Developer. A web developer with 10 years of experience who builds QuickCalcNook’s private, in-browser tools. Rates are checked against official sources and dated on each page. Not financial advice.