Math Solver Free

LCM and HCF Calculator

Least common multiple and highest common factor โ€” with every step shown.

LCM
72
HCF (GCD)
6

Step 1: Find GCD of 18 and 12 using the Euclidean algorithm:

Step 2: 18 = 12 ร— 1 + 6

Step 3: 12 = 6 ร— 2 + 0

Step 4: Last non-zero remainder = 6, so GCD(12, 18) = 6.

LCM: (12 ร— 18 ร— 24) รท 6 = 72

Prime Factorization

12 = 2^2 ร— 3

12 รท 2 = 6

6 รท 2 = 3

18 = 2 ร— 3^2

18 รท 2 = 9

9 รท 3 = 3

3 รท 3 = 1

24 = 2^3 ร— 3

24 รท 2 = 12

12 รท 2 = 6

6 รท 2 = 3

How to Find LCM and HCF

The highest common factor (HCF), also called the greatest common divisor (GCD), is the biggest number that divides every number in your set. The least common multiple (LCM) is the smallest number that is a multiple of every number in the set. They are linked by a neat identity: LCM(a, b) ร— HCF(a, b) = a ร— b.

Two Reliable Methods

  • Prime factorization: break each number into primes; the HCF takes the lowest power of each shared prime, the LCM takes the highest power of every prime present.
  • Euclidean algorithm: repeatedly replace the larger number with the remainder of dividing it by the smaller โ€” the fastest route to the HCF, shown step by step above.

Where They Show Up

Adding fractions needs the LCM of the denominators; simplifying fractions needs the HCF of numerator and denominator. They also appear in scheduling problems (โ€œtwo buses leave together โ€” when next?โ€) and gear-ratio puzzles.

Simplifying a fraction with these results? Try our fraction calculator or the four-function calculator.

Frequently Asked Questions

What is the difference between LCM and HCF?

The HCF (highest common factor, also called GCD) is the largest number that divides all the given numbers exactly. The LCM (least common multiple) is the smallest number that all the given numbers divide into exactly. For 12 and 18, the HCF is 6 and the LCM is 36.

How do you find the LCM and HCF of three numbers?

Work pairwise: find the GCD of the first two numbers, then the GCD of that result with the third number. For the LCM, use LCM(a, b, c) = LCM(LCM(a, b), c). This calculator handles any count of numbers automatically.

What is the Euclidean algorithm?

It is the fastest way to find a GCD: divide the larger number by the smaller, replace the larger with the remainder, and repeat until the remainder is zero. The last non-zero remainder is the GCD. The calculator shows each division step.

Is this LCM and HCF calculator free?

Yes โ€” every tool on Math Solver Free is free with no sign-up, and all calculations run in your browser.