Skip to content

Math

LCM

Enter your values and the result updates as you type. The formula and a worked example are below the calculator.

3 numbers read. Separate them with commas or new lines.

LCM(12, 15, 20)

60

60 is the smallest number that 12, 15, 20 all divide into exactly. Things that repeat every 12, 15, 20 units all coincide again after 60 units.

Least common multiple (LCM)
60
Greatest common factor (GCF)
1

Steps: prime factorization

12 = 2 × 2 × 3

15 = 3 × 5

20 = 2 × 2 × 5

The LCM takes every prime that appears, as many times as it appears in the number that has it most often.

LCM(12, 15, 20)

= 2 × 2 × 3 × 5

= 2² × 3 × 5

= 60

GCD(12, 15, 20) = 1

Greatest common factor method

LCM(a, b) = a × b ÷ GCD(a, b). With more than two numbers, combine them one at a time.

GCD(12, 15) = 3

LCM = 12 × 15 / 3 = 60

GCD(60, 20) = 20

LCM = 60 × 20 / 20 = 60

Division ladder

Divide by any prime that divides at least one number, carrying down the numbers it does not divide, until every number is 1. Multiply the primes on the left to get the LCM.

Division ladder for the least common multiple
2121520
261510
33155
5155
Left over111

Listing the multiples

12: 12, 24, 36, 48, 60

15: 15, 30, 45, 60

20: 20, 40, 60

The first number in every list is 60.

How to use

  1. Type or paste two or more whole numbers, separated by commas, spaces or new lines.
  2. Read the least common multiple, with the prime factorization of every number and how the answer is built from it.
  3. Open the other methods to see it again with the greatest common factor, the division ladder and a list of multiples.

Formula

LCM(a, b) = a x b / GCF(a, b). For more numbers, combine them one at a time: LCM(a, b, c) = LCM(LCM(a, b), c). By primes, take every prime that appears in any number, each to the highest power it has in any of them.

Example

For 12, 15 and 20: 12 = 2 x 2 x 3, 15 = 3 x 5, 20 = 2 x 2 x 5. The highest powers are 2 squared, 3 and 5, so the LCM is 4 x 3 x 5 = 60. Buses that leave every 12, 15 and 20 minutes all leave together again after 60 minutes.

Only whole numbers of 1 or more are accepted, up to 18 digits each and 50 numbers. The answer is exact even when it has far more digits than the numbers you typed. The LCM is also called the lowest common multiple (LCM) and is the denominator you need to add fractions without simplifying first.