Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Find the Least Common Multiple

The least common multiple is the smallest positive number that all the given numbers divide. Take every prime that appears in any of the numbers, each with its largest exponent; for two numbers you can also divide their product by their GCD.

Recognize the task

Wording such as "least common multiple", "smallest number divisible by both", "when do the two events happen together again", or a common denominator for fractions. Typical inputs: lcm⁡(4,6)\operatorname{lcm}(4, 6), lcm⁡(24,90)\operatorname{lcm}(24, 90), lcm⁡(12,15,20)\operatorname{lcm}(12, 15, 20). Test: if you need a number that each input goes into, it is an LCM; if you need a number that goes into each input, it is a GCD.
The LCM and the notation lcm⁡(a,b)\operatorname{lcm}(a, b) are defined in the LCM lesson.

Ways to do it

Prime factorizationusual
lcm⁡(a,b)=∏pmax⁡(αp,βp)\operatorname{lcm}(a, b) = \prod p^{\max(\alpha_p, \beta_p)}
Every prime of either number, with the larger exponent; works for any number of inputs.
Using the GCDtwo numbers
lcm⁡(a,b)=a⋅bgcd⁡(a,b)\operatorname{lcm}(a, b) = \dfrac{a \cdot b}{\gcd(a, b)}
The GCD–LCM relationship; fast when the GCD is easy, for example from the Euclidean algorithm.
Listing multiplessmall numbers
first number in both lists of multiples\text{first number in both lists of multiples}
List multiples of each number until one appears in every list (listing multiples).

Steps

StepOn lcm⁡(24,90)\operatorname{lcm}(24, 90)
1Factor each number into primes. Use prime factorization on each number.24=23⋅324 = 2^3 \cdot 3,   90=2⋅32⋅5\; 90 = 2 \cdot 3^2 \cdot 5
2List every prime that appears in any of them. A multiple of both numbers must contain all the primes of each.22, 33, 55
3Take the larger exponent of each prime. The LCM needs as many copies of each prime as the number that has the most of it.23⋅32⋅52^3 \cdot 3^2 \cdot 5
4Multiply, and check with the GCD. For two numbers, lcm⁡(a,b)⋅gcd⁡(a,b)=a⋅b\operatorname{lcm}(a, b) \cdot \gcd(a, b) = a \cdot b.lcm⁡(24,90)=360\operatorname{lcm}(24, 90) = 360; check: 24⋅906=360\frac{24 \cdot 90}{6} = 360

Worked examples

Example 1 · small numbers

listing
multiples of 44: 4,8,12,…4, 8, 12, \ldots
list the first few
multiples of 66: 6,12,…6, 12, \ldots
stop at the first match
lcm⁡(4,6)=12\operatorname{lcm}(4, 6) = 12
first common multiple

Example 2 · with the GCD

formula
gcd⁡(18,30)=6\gcd(18, 30) = 6
shared 2⋅32 \cdot 3
lcm⁡(18,30)=18⋅306=5406\operatorname{lcm}(18, 30) = \dfrac{18 \cdot 30}{6} = \dfrac{540}{6}
product over GCD
lcm⁡(18,30)=90\operatorname{lcm}(18, 30) = 90
divide

Example 3 · three numbers

three inputs
12=22⋅312 = 2^2 \cdot 3,   15=3⋅5\; 15 = 3 \cdot 5,   20=22⋅5\; 20 = 2^2 \cdot 5
factor all three
22⋅3⋅52^2 \cdot 3 \cdot 5
largest exponent of each prime
lcm⁡(12,15,20)=60\operatorname{lcm}(12, 15, 20) = 60
multiply
Check your answer with the LCM calculator.

See it happen

Picture two runners on a track, one finishing a lap every 2424 seconds and one every 9090 seconds. They pass the start line together again at the first time that is a whole number of laps for both, and that time must contain every prime block of 2424 and every prime block of 9090. Using the larger stack of each prime is just enough to cover both numbers, so 360360 seconds is the first meeting.

Common mistakes

Taking the smaller exponent

✗ lcm⁡(24,90)=2⋅3=6\operatorname{lcm}(24, 90) = 2 \cdot 3 = 6
✓ 66 is the GCD; the LCM takes the larger exponents: 23⋅32⋅5=3602^3 \cdot 3^2 \cdot 5 = 360

Multiplying the numbers

✗ lcm⁡(18,30)=18⋅30=540\operatorname{lcm}(18, 30) = 18 \cdot 30 = 540
✓ divide by the GCD: 5406=90\frac{540}{6} = 90
The product is the LCM only when the numbers are coprime.

Dropping a prime that only one number has

✗ lcm⁡(24,90)=23⋅32=72\operatorname{lcm}(24, 90) = 2^3 \cdot 3^2 = 72
✓ include the 55 from 9090: 23⋅32⋅5=3602^3 \cdot 3^2 \cdot 5 = 360