LCM Calculator

Find the least common multiple of two, three or more numbers, the smallest value they all divide into, plus their greatest common factor.

Your numbers

Enter two or more whole numbers. The LCM is the smallest positive number that every value divides into evenly.

Least common multiple
—
Enter some numbers
Numbers used
—
GCF (greatest common factor)
—
Count
—
Product of all
—

The LCM is useful for adding fractions (a common denominator) and for problems where events repeat on different cycles. It uses whole numbers; decimals are rounded.

How to Find the LCM of 3 Numbers

Work in pairs: find the LCM of the first two numbers, then find the LCM of that answer and the third. For 4, 6 and 8, the LCM of 4 and 6 is 12, and the LCM of 12 and 8 is 24. That is the smallest number all three divide into evenly.

  1. LCM of the first pair: 4 × 6 ÷ GCF 2 = 12.
  2. Pair that with the next number: 12 × 8 ÷ GCF 4 = 24.
  3. Repeat until every number is used. The last result is the LCM.

Formula: For two numbers, LCM(a, b) = |a × b| ÷ GCF(a, b), where GCF is found with the Euclidean algorithm (repeatedly replacing the larger number with the remainder of dividing it by the smaller, until the remainder reaches 0). For a list of three or more numbers, the calculator applies this pairwise formula in sequence, combining the first two numbers, then combining that result with the next number, and so on until every value has been included. Decimal inputs are rounded to whole numbers first, and zeros are excluded.

  • Numbers: the list of two or more whole numbers you want the LCM (and GCF) of, separated by commas, spaces, or new lines

LCM and GCF Examples

NumbersLCMGCF
4, 6122
6, 8242
4, 6, 8242
5, 10, 15305
9, 12363
7, 3211

LCM and GCF Word Problems

Most LCM and GCF word problems come down to adding fractions or working out when repeating events line up.

  • Fractions. To add 5/12 and 7/18, you need the lowest common denominator, which is the LCM of 12 and 18: 36. That gives 15/36 + 14/36 = 29/36, with no reducing needed afterwards.
  • Schedules. If one bus leaves every 12 minutes and another every 18, they depart together every 36 minutes. Any “when do they coincide” question works the same way.
  • Gears and cycles. Two gears with 20 and 30 teeth return to their starting positions after 60 teeth have passed, the LCM of the two counts.

How to Find the LCM of Two Numbers by Hand

Divide the product of the two numbers by their GCF, since LCM × GCF equals the product of a pair. For 12 and 18, 36 × 6 = 216 = 12 × 18. This shortcut only works for a pair; with three or more numbers, work through them in sequence. The least common multiple article on Wikipedia shows the prime-factor method as a cross-check.

Common questions about the least common multiple

How do you find the LCM of 3 numbers?Find the LCM of the first two, then find the LCM of that result and the third number. For 4, 6 and 8: LCM(4, 6) = 12, then LCM(12, 8) = 24.
What is the LCM of 12 and 18?The LCM of 12 and 18 is 36. Their GCF is 6, and 12 × 18 = 216, so 216 ÷ 6 = 36.
What is the LCM of 4 and 6?The LCM of 4 and 6 is 12, the first number both divide into evenly. Their GCF is 2.
What’s the difference between LCM and GCF?The LCM is the smallest number every value divides into, so it’s always equal to or larger than your biggest number. The GCF is the largest number that divides into every value, so it’s always equal to or smaller than your smallest number.
Why is the LCM useful for adding fractions?Fractions with different denominators need a common denominator before you can add them. Using the LCM of the denominators keeps the numbers as small as possible, so there’s less reducing afterwards.
What happens if I enter a decimal or a 0?Decimals are rounded to the nearest whole number first, since the LCM is only defined for whole numbers. Zeros are left out, and the LCM is worked out from the remaining numbers.

Related Calculators

Need just the greatest common factor on its own? The GCF calculator handles that half of the pair. If your LCM is meant for combining fractions, the fraction simplifier can reduce the result afterward, and the fraction calculator can carry out the full addition once you have a common denominator.

Related Calculators