Skip to content
UnitFormula

The least common multiple (LCM) of two whole numbers is the smallest positive number that both divide into evenly. The quickest way to find it is from the greatest common factor: LCM(a, b) = a × b ÷ GCF(a, b). For 4 and 6, GCF is 2, so LCM = 4 × 6 ÷ 2 = 12 — the smallest number in both the 4- and 6-times tables.

LCM Calculator — least common multiple of two numbers

LCM of 4 and 6.

Least common multiple12

Quick examples

How it's calculated

  1. LCM = |a × b| ÷ GCF(a, b)lcm(a,b)=abgcd(a,b)\operatorname{lcm}(a, b) = \frac{|a \cdot b|}{\gcd(a, b)}
    a
    = 4
    b
    = 6
    12
Least common multiple12

How it works

The least common multiple (LCM) is the smallest positive whole number that is a multiple of both inputs — the first number where their times-tables meet. You could list multiples of each until one matches, but there's a shortcut using the greatest common factor:

LCM(a, b) = a × b ÷ GCF(a, b)

This works because a × b counts every common multiple's building blocks twice over the shared factor, and dividing by the GCF removes that double-count. It's fast even for large numbers, since finding the GCF (by Euclid's algorithm) is quick.

Worked example

Find the LCM of 4 and 6. Their multiples are 4, 8, 12, 16, … and 6, 12, 18, … — the first shared one is 12. By the formula, GCF(4, 6) = 2, so:

LCM = 4 × 6 ÷ 2 = 24 ÷ 2 = 12

When two numbers are coprime (no common factor but 1), the LCM is just their product: LCM(5, 7) = 5 × 7 = 35, because there's nothing to divide out.

Frequently asked questions

How do I find the least common multiple?

Two ways: list the multiples of each number until you hit a common one, or divide the product of the numbers by their greatest common factor. The formula method — a × b ÷ GCF(a, b) — is faster and always works, which is what this calculator uses.

What is the LCM used for?

Most often for **adding or subtracting fractions**: the least common multiple of the denominators is the least common denominator, the smallest one you can rewrite both fractions over. It also solves "when do two repeating events line up again?" problems, like two buses on 4- and 6-minute cycles meeting every 12 minutes.

How are the LCM and GCF related?

By the identity **GCF(a, b) × LCM(a, b) = a × b**. Knowing either one gives the other: LCM = a × b ÷ GCF. For 8 and 12, GCF is 4, so LCM = 8 × 12 ÷ 4 = 24, and indeed 4 × 24 = 96 = 8 × 12.

What if the two numbers are coprime?

Then their GCF is 1, so the LCM is simply their product. 9 and 10 share no factor, so LCM(9, 10) = 90. This is the largest the LCM can be relative to the two numbers — sharing factors makes it smaller.

Is the LCM always larger than both numbers?

It's at least as large as the bigger of the two, and equal to it only when the smaller divides the larger (LCM(4, 12) = 12). Otherwise it's strictly bigger, since it has to be a multiple of both.

Can I find the LCM of three or more numbers?

Yes — take the LCM of the first two, then the LCM of that with the next number, and so on. Order doesn't matter. This calculator handles two numbers; chain it for longer lists.

How we know this is right

Last reviewed
Aug 5, 2026
Precision
Rounded to 0 decimal places.
Read our methodology

Sources