Mathematics

How to Find the Least Common Multiple of Two Numbers

The least common multiple (LCM) of two numbers is the product of the two numbers divided by their greatest common factor — a shortcut that avoids listing out multiples one by one.

The formula: LCM = (a × b) ÷ GCF

For 12 and 18, the GCF is 6 (found via the Euclidean algorithm). The LCM is (12 × 18) ÷ 6 = 216 ÷ 6 = 36 — the smallest number that both 12 and 18 divide into evenly.

A second example

For 8 and 12, the GCF is 4, so the LCM is (8 × 12) ÷ 4 = 96 ÷ 4 = 24.

When the two numbers share no common factor

For 9 and 16, which share no common factor other than 1 (their GCF is 1), the LCM is simply their straight product: (9 × 16) ÷ 1 = 144. Whenever two numbers are coprime (GCF of 1), their LCM is always just their product — there's no smaller shared multiple to find.

Why the LCM formula depends on the GCF

The formula works because any common multiple must be divisible by everything both numbers share — dividing out that shared part (the GCF) before multiplying avoids double-counting it. This is why LCM and GCF are always computed together rather than independently — one formula naturally produces both.