Mans Kalkulators

GCD and LCM calculator

Greatest common divisor and least common multiple.

6
GCD

How this is calculated

LCM
36
GCD
6
Page updated 20/08/2026

Frequently asked questions

What is the greatest common divisor?

The greatest common divisor is the largest number that divides both given numbers with no remainder. 18 and 24 are both divisible by 1, 2, 3 and 6, so their GCD is 6. It is what you use to simplify fractions: divide numerator and denominator by the GCD and the fraction lands in lowest terms at once.

What is the least common multiple?

The least common multiple is the smallest number divisible by both given numbers. For 4 and 6 it is 12. In practice it is what you want when adding fractions with different denominators: the LCM gives the least common denominator, and therefore the smallest numbers to work with.

How are the GCD and LCM related?

For two numbers, their product always equals the product of their GCD and LCM: a × b = GCD(a, b) × LCM(a, b). For 18 and 24 that is 432 = 6 × 72. So knowing one gives you the other by division. The identity holds for two numbers only, not for three or more.

How does the Euclidean algorithm find the GCD?

Divide the larger number by the smaller and keep the remainder, then repeat with the smaller number and that remainder, until the remainder is zero. The last non-zero remainder is the GCD. For 48 and 18: 48 = 2 × 18 + 12, then 18 = 1 × 12 + 6, then 12 = 2 × 6 + 0, so the GCD is 6. It is far faster than listing divisors.