LCM and GCD Calculator
Find the least common multiple (LCM) and greatest common divisor (GCD or HCF) of two or more whole numbers, with each number's prime factorization shown. Free.
Runs in your browser. Nothing is uploaded.
About LCM and GCD Calculator
Enter two or more whole numbers to get their greatest common divisor (also called the GCD, HCF or greatest common factor) and their least common multiple. The prime factorization of each number is listed too, so you can check the answer by hand.
The GCD of 12, 18 and 30 is 6, the largest number that divides all three. Their LCM is 180, the smallest number all three divide into. You need the LCM to add fractions with different denominators, and the GCD to simplify fractions.
Big numbers are handled exactly with big-integer arithmetic.
How to use LCM and GCD Calculator
- Type or paste your text into the input box. Press Sample to see an example.
- The result appears instantly as you type.
- Copy the result, or press Use as input to chain another transformation.
Frequently asked questions
Is HCF the same as GCD?
Yes. Highest common factor, greatest common divisor and greatest common factor all mean the same thing.
What does coprime mean?
Two numbers are coprime when their GCD is 1, meaning they share no factor other than 1, like 8 and 15.
Is LCM and GCD Calculator free and private?
Yes. LCM and GCD Calculator is completely free with no sign-up. Everything runs in your browser, so whatever you type or paste never leaves your device.