LCM & GCD Calculator

Find the greatest common divisor and least common multiple of two or more numbers, with Euclid’s steps.

Runs instantly in your browser — results update as you type.

How do you find the GCD and LCM?

The GCD is the largest number that divides all the numbers; Euclid’s algorithm finds it by repeated division with remainder. The LCM is the smallest number they all divide into: LCM(a, b) = a × b ÷ GCD(a, b). For 12, 18 and 30 the GCD is 6 and the LCM is 180.

How to use the GCD & LCM Calculator

    Frequently asked questions

    Is GCD the same as HCF?

    Yes — greatest common divisor, greatest common factor and highest common factor are the same thing.

    What does co-prime mean?

    Numbers whose GCD is 1, like 8 and 15.

    How large can the numbers be?

    Any size — it uses exact big-integer arithmetic.