GCD and LCM defined
The greatest common divisor (GCD, also GCF or HCF) of two numbers is the largest whole number that divides both exactly. The least common multiple (LCM) is the smallest positive number that both divide into. They're linked by a tidy identity:
So once you have the GCD, the LCM follows as a × b ÷ GCD. For more than two numbers, both are computed pairwise — fold the GCD (or LCM) across the list one number at a time.
Worked example
For 12, 18 and 30:
The Euclidean algorithm
The fastest way to find a GCD is the Euclidean algorithm: repeatedly replace the larger number with the remainder of dividing it by the smaller, until the remainder is 0 — the last non-zero value is the GCD. It's far quicker than listing every factor. The calculator shows the prime factorization of each input so you can see where the common and combined factors come from. GCD is handy for reducing fractions; LCM for finding common denominators or scheduling repeating events.