Skip to content

LCM calculator

Math & numbers

What is the least common multiple?

The smallest number that two to ten whole numbers all divide, with their greatest common divisor and the working.

Result to show first

2 to 10 whole numbers, separated by commas or spaces

Least common multiple

360

The least common multiple of 24, 36, 60 is 360.

The other answer

Greatest common divisor
12

Euclidean algorithm

36 = 1 × 24 + 12
12
24 = 2 × 12 + 0
0
gcd(24, 36)
12
60 = 5 × 12 + 0
0
gcd(12, 60)
12

Sponsored Links

The smallest number that two to ten whole numbers all divide, with their greatest common divisor and the working.

How to use

  1. Type two to ten whole numbers, separated by commas or spaces.
  2. Read the greatest common divisor (GCD) or the least common multiple (LCM), and switch which one comes first.
  3. Open the Euclidean algorithm below to see how the GCD was found, or copy the link to share the same numbers.

Sponsored Links

How it works

The greatest common divisor of some whole numbers is the largest number that divides every one of them without a remainder: the GCD of 24 and 36 is 12. The least common multiple is the smallest positive number that every one of them divides: the LCM of 4 and 6 is 12. The GCD is what you divide by to simplify a fraction, and the LCM is the common denominator for adding fractions.

The Euclidean algorithm finds the GCD by repeated division: divide the larger number by the smaller, then the smaller by the remainder, and so on until the remainder is 0. The last divisor is the GCD. For 48 and 18: 48 = 2 × 18 + 12, then 18 = 1 × 12 + 6, then 12 = 2 × 6 + 0, so the GCD is 6. The LCM then follows from lcm(a, b) = a ÷ gcd(a, b) × b, which gives 48 ÷ 6 × 18 = 144.

For more than two numbers the answer is built pair by pair: gcd(a, b, c) = gcd(gcd(a, b), c), and the same for the LCM. The signs of numbers are ignored. The GCD of 0 and a number is that number, gcd(0, 0) is defined as 0, and the LCM is 0 whenever one of the numbers is 0. Calculations are exact, for numbers of up to 40 digits.

Worked example

What are the GCD and LCM of 12 and 18?

  1. Divide with remainder: 18 = 1 × 12 + 6.
  2. The last nonzero divisor is 6.

GCD = 6; LCM = 12 ÷ 6 × 18 = 36.

Frequently asked questions

How do I find the least common multiple?

Divide the product of two numbers by their greatest common divisor: lcm(a, b) = a × b ÷ gcd(a, b). For 4 and 6 that is 24 ÷ 2 = 12. For more numbers, repeat the step pair by pair.

How is the LCM used to add fractions?

The LCM of the denominators is the smallest common denominator. For 1/4 + 1/6 it is 12, so the sum is 3/12 + 2/12 = 5/12.

Sponsored Links

Sponsored Links