Students

LCM and HCF Calculator (2 to 6 Numbers)

Calculate LCM and HCF for up to 6 numbers with prime factorizations and Euclidean algorithm steps.

LCM and HCF Calculator (2 to 6 Numbers)

Compute Greatest Common Divisor and Lowest Common Multiple with factorization and Euclidean steps

3 of 6 numbers
Quick Presets:
Highest Common Factor (HCF / GCD)
12
Greatest divisor common to all entered numbers
Lowest Common Multiple (LCM)
360
Smallest positive integer divisible by all numbers

Method 1: Prime Factorization Breakdown

Number 24
24 = 2^3 × 3
Number 36
36 = 2^2 × 3^2
Number 60
60 = 2^2 × 3 × 5
Step 1: 36 = (24 × 1) + 12
Step 2: 24 = (12 × 2) + 0
Step 3: HCF(24, 36) = 12

How Does It Work?

Free client-side LCM and HCF calculator for school and competitive exam math. Find the Least Common Multiple (LCM) and Highest Common Factor (HCF / GCD) for 2 to 6 numbers with full prime factorization breakdowns and step-by-step Euclidean algorithm divisions.

Mathematical Formula
HCF: Product of lowest powers of common prime factors | LCM: Product of highest powers of all prime factors

The Highest Common Factor (HCF) is the largest integer that divides all entered numbers without remainder. The Least Common Multiple (LCM) is the smallest positive integer divisible by all entered numbers.

Real-World Worked Example

Finding the HCF and LCM of three numbers: 24, 36, and 60.

Calculation Breakdown
  • •Prime Factorization of 24 = 2³ × 3¹
  • •Prime Factorization of 36 = 2² × 3²
  • •Prime Factorization of 60 = 2² × 3¹ × 5¹
  • •Common Prime Factors: 2 and 3
  • •HCF = 2^(min(3,2,2)) × 3^(min(1,2,1)) = 2² × 3¹ = 4 × 3 = 12
  • •All Prime Factors: 2, 3, 5
  • •LCM = 2^(max(3,2,2)) × 3^(max(1,2,1)) × 5^(max(0,0,1)) = 2³ × 3² × 5¹ = 8 × 9 × 5 = 360
  • •Euclidean Step for (24, 36): 36 = (24 × 1) + 12; 24 = (12 × 2) + 0 -> HCF(24, 36) = 12

Takeaway: HCF extracts the lowest exponent of shared primes, while LCM aggregates the highest exponent across every prime present in any number.

Complete Guide & Practical Explanations

Highest Common Factor (HCF, also known as Greatest Common Divisor or GCD) and Least Common Multiple (LCM) are fundamental pillars of arithmetic taught in middle school and tested extensively in competitive exams like CAT, SSC CGL, Bank PO, and GRE.

While the concepts are taught early, calculating them quickly for three, four, or five numbers often leads to errors. Understanding the distinct mathematical mechanisms behind both values is essential for mastering numerical aptitude.

Method 1: The Prime Factorization Method. To find the HCF and LCM of a group of numbers (such as 24, 36, and 60), we begin by breaking each number into prime factors with exponents: • 24 = 2³ × 3¹ • 36 = 2² × 3² • 60 = 2² × 3¹ × 5¹

To compute the HCF, take only the prime factors common to all numbers, raised to their lowest exponent: 2^(min(3,2,2)) × 3^(min(1,2,1)) = 2² × 3¹ = 4 × 3 = 12. Twelve is the largest integer that divides 24, 36, and 60 with no remainder.

To compute the LCM, take all prime factors present in any of the numbers, raised to their highest exponent: 2^(max(3,2,2)) × 3^(max(1,2,1)) × 5^(max(0,0,1)) = 2³ × 3² × 5¹ = 8 × 9 × 5 = 360. 360 is the smallest positive integer that is evenly divisible by 24, 36, and 60.

Method 2: The Euclidean Division Algorithm. For finding the HCF of two numbers, the Euclidean algorithm is the fastest method: divide the larger number by the smaller number. For 24 and 36: 36 = (24 × 1) + 12. Next, divide 24 by the remainder 12: 24 = (12 × 2) + 0. Because the remainder is 0, the last divisor (12) is the HCF.

For two numbers a and b, the celebrated formula `a × b = LCM(a, b) × HCF(a, b)` provides a swift check: 24 × 36 = 864, and LCM (72) × HCF (12) = 864. However, remember this identity applies only to two numbers, not three or more. Our calculator supports up to 6 numbers, displaying both prime factor representations and Euclidean steps.

Practical Tips

  • ✓For two numbers a and b, verify your answer with the fundamental theorem: a × b = LCM(a, b) × HCF(a, b). For example, 24 × 36 = 864 = 72 × 12.
  • ✓When simplifying algebraic fractions or finding common denominators, finding the LCM of the denominators is essential.
  • ✓Our tool safely handles positive integers up to 1,000,000 with instantaneous factorization.

Common Mistakes to Avoid

  • ⚠Multiplying numbers together directly to find common multiples, resulting in unnecessarily huge numbers instead of the smallest least common multiple.
  • ⚠Including prime factors with zero exponents in the HCF calculation.

Related Guides & Calculation Deep Dives

All guides
Frequently Asked Questions

LCM & HCF FAQs

Common questions, calculation formulas, and usage rules.

HCF (Highest Common Factor / GCD) is the largest number that divides into all given numbers evenly. LCM (Least Common Multiple) is the smallest positive number that all given numbers divide into without remainder.

The Euclidean algorithm computes the HCF of two numbers by repeatedly dividing the larger number by the smaller number and replacing the larger number with the remainder until the remainder reaches zero. The last non-zero divisor is the HCF.