πŸ”’ Math & Science

LCM & GCD Calculator

Find the least common multiple (LCM) and greatest common divisor (GCD) of two or more numbers, using the prime-factor and Euclidean methods.

GCD (greatest common divisor)

6

also called the GCF

LCM (least common multiple)

72

For 12, 18, 24: the largest number that divides all of them is 6, and the smallest number all of them divide into is 72.

The GCD is found with the Euclidean algorithm, applied across all the numbers. The LCM uses the identity LCM(a, b) = (a Γ— b) Γ· GCD(a, b), folded across the list.

Frequently Asked Questions

What is the difference between LCM and GCD?

The GCD (greatest common divisor) is the largest number that divides all your numbers evenly. The LCM (least common multiple) is the smallest number that all your numbers divide into evenly. For 12 and 18, the GCD is 6 and the LCM is 36.

How do I find the GCD of two numbers?

Use the Euclidean algorithm: divide the larger number by the smaller and keep replacing the pair with (smaller, remainder) until the remainder is zero. The last non-zero remainder is the GCD. This calculator does it instantly for two or more numbers.

How do I find the LCM of two numbers?

Multiply the two numbers and divide by their GCD: LCM(a, b) = (a Γ— b) Γ· GCD(a, b). For 4 and 6, that's (4 Γ— 6) Γ· 2 = 12. For more than two numbers, fold this rule across the whole list.

Is GCF the same as GCD?

Yes. 'Greatest common factor' (GCF) and 'greatest common divisor' (GCD) are two names for exactly the same thing β€” the largest integer that divides all the given numbers without a remainder.

What are LCM and GCD used for?

The LCM is used to find a common denominator when adding fractions and to figure out when repeating events line up. The GCD is used to simplify fractions to lowest terms and to split things into the largest equal groups.