Menu

LCM & GCD Calculator

LCM & GCD Calculator

The LCM & GCD Calculator finds the Least Common Multiple and Greatest Common Divisor of two or more numbers, with the prime factorisation that explains the result.

GCD and LCM explained

The GCD (also called HCF) is the largest number that divides all your inputs exactly - it is what you use to simplify a fraction. The LCM is the smallest number they all divide into - it is what you use to add fractions with different denominators or to work out when repeating events line up again.

How they connect

For two numbers, GCD and LCM are linked by a neat identity: GCD(a, b) × LCM(a, b) = a × b. The calculator uses the fast Euclidean algorithm for the GCD and derives the LCM from it, then shows the prime factorisation so you can see exactly why the answer is what it is.

Frequently Asked Questions

What is the difference between LCM and GCD?

The GCD is the largest number dividing all inputs; the LCM is the smallest number all inputs divide into. GCD simplifies fractions; LCM finds common denominators.

Can it handle more than two numbers?

Yes. Enter three or more values and it computes the GCD and LCM of the whole set.

Is HCF the same as GCD?

Yes. Highest Common Factor (HCF) and Greatest Common Divisor (GCD) are two names for the same thing.

How are LCM and GCD related?

For any two numbers, their GCD multiplied by their LCM equals the product of the two numbers.

Related Calculators Tools

Browse all Calculators tools →

Privacy-first: client-side tools process your input in your browser. Free to use, no sign-up. See our Privacy Policy and Disclaimer.